When I am starting/restarting Wildfly 21 server, I am getting the following error
05:18:12,412 ERROR [stderr] (ServerService Thread Pool -- 96) javax.naming.NamingException: WFLYNAM0062: Failed to lookup mss-3.3.0-SNAPSHOT/ejbModule-3.3.0-SNAPSHOT/CompleteCallSessionBean!com.xim.mss.ejb.sessionbeans.completecall.CompleteCallRemoteInterface [Root exception is java.lang.RuntimeException: **org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended**]
But I am not getting this error when I am deploying the EAR ?
Can anyone tell me why this is happening?
Is this expected error or does this need to be resolved ?
This is an expected error, you are performing an EJB call before the EJB container is started and it is in suspended state (I reproduced the issue with a similar situation).
I have found a similar explanation for the error when the server is in shutdown (when the EJB container is also suspended).
https://issues.redhat.com/browse/JBEAP-444
The best solution is to delay this ejb call with a timer to wait the application to be fully started.
Related
I am trying to setup mysql to my keycloak instance and couldn't get that working due to the following exception:
Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'add' at address '[
("core-service" => "management"),
("management-interface" => "http-interface")
]'
14:34:42,546 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler#65d34517 for operation add-deployer-chains at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:522)
at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1518)
at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1472)
at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1445)
at org.jboss.as.controller.AbstractOperationContext$Step.access$400(AbstractOperationContext.java:1319)
at org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:876)
at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:726)
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412)
at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:521)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:472)
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:434)
at org.jboss.as.server.ServerService.boot(ServerService.java:435)
at org.jboss.as.server.ServerService.boot(ServerService.java:394)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:374)
at java.lang.Thread.run(Thread.java:748)
14:34:42,549 ERROR [org.jboss.as.controller.client] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler#65d34517 for operation add-deployer-chains at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException.
https://developer.jboss.org/thread/272010 in this question they also had a similar exception and got it solved after changing timeout from 300 to 600.
but where can i change this setting.
BTW i changed the transaction timeout as below but still facing the issue.
<coordinator-environment default-timeout="7200" />
As most of the people suggested, adding this parameter should do the fix for you.
-Djboss.as.management.blocking.timeout=3600
I use ubuntu 20.04 LTS on both my desktop and laptop. I noticed that mysql running on the docker container on the laptop while everything was fine on the desktop is running extremely slow, see MySQL bug#46959. If you're having a problem like mine, this solution might work.
At times, I get the following error while deploying the code through Netbeans.
Not sure why this is happening. Tried increasing time to 15000 in standalone.xml. Still facing this error.
Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'deploy' at address '[("deployment" => "server-1.0-SNAPSHOT.war")]'
Deploy of deployment "server-1.0-SNAPSHOT.war" was rolled back with the following failure message: "JBAS013487: Operation timed out awaiting service container stability"
ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS013413: Timeout after [5000] seconds waiting for service container stability while finalizing an operation.
Process must be restarted. Step that first updated the service container was 'deploy' at address '[("deployment" => "server-1.0-SNAPSHOT.war")]'
We are trying to get the boundAddress and boundPort for JBoss server at the time of the Jvm startup. We have a jvm agent which starts with JBoss server and while trying to get the boundPort and boundAddress through MBean we are getting exception as,
^[[0m^[[31m16:03:34,066 ERROR [stderr] (ServerService Thread Pool -- 54) javax.management.InstanceNotFoundException: jboss.as.expr:socket-binding-group=full-sockets,socket-binding=http
^[[0m^[[31m16:03:34,067 ERROR [stderr] (ServerService Thread Pool -- 54) at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:94)
^[[0m^[[31m16:03:34,067 ERROR [stderr] (ServerService Thread Pool -- 54) at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:171)
....
....
Same piece of code works if we deploy our agent after the server has initialized. I tried loop around the try-catch block where the exception is coming, assuming MBean server might be waiting for initialization but that also did not work.
I would like to know if there is any better way to get these values at the time of startup.
Thanks,
Rupesh
I'm getting below error message often and due to this error I'm suspecting my application creating outofMemory Error in permGen space.
Can someone help how to fix the below exception.
I'm using pure servlet and tomcat 7.
INFO: Illegal access: this web application instance has been stopped already. Could not load com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1745)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
at com.mchange.v2.resourcepool.BasicResourcePool.checkIdleResources(BasicResourcePool.java:1481)
at com.mchange.v2.resourcepool.BasicResourcePool.access$2000(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$CheckIdleResourcesTask.run(BasicResourcePool.java:1964)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Exception in thread "Timer-0" java.lang.NoClassDefFoundError: com/mchange/v2/resourcepool/BasicResourcePool$AsyncTestIdleResourceTask
at com.mchange.v2.resourcepool.BasicResourcePool.checkIdleResources(BasicResourcePool.java:1481)
at com.mchange.v2.resourcepool.BasicResourcePool.access$2000(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$CheckIdleResourcesTask.run(BasicResourcePool.java:1964)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
... 5 more
That message just occurs because the web application is still trying to load things after you have shut it down.
As such, it should not have "business impact" (you don't care about errors in an app that you shut down), especially if it happens in the process of shutting down the whole app server.
You may want to figure out why it does not shutdown more cleanly (maybe some background processing that needs to be stopped when the webapp is asked to terminate). If there is stuff still going on in there, that might cause problems for any other web apps still running.
If you did not intend to shut down the webapp, then there is probably another error earlier in the log.
When I deploy an application.war that contains a servlet to my weblogic server it runs fine. The servlet uses an instance of UniversalConnectionPoolManagerMBean and starts up without any problems.
In the administration console I use the "stop when work completes" command and in my destroy() method it calls:
UniversalConnectionPoolManagerImpl.getUniversalConnectionPoolManager()
.startConnectionPool(mConnectionPoolName);
When I then click on "start servicing requests" command in the administration console I get this exception:
java.sql.SQLException: Unable to start the Universal Connection Pool: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
at com.exzac.dal.jdbc.Database.getConnection(Database.java:134)
at com.exzac.dal.jdbc.Database.executeQuery(Database.java:161)
at com.exzac.profilesystem.ProfileSystemConfiguration.retrieveConfigurationTable(ProfileSystemConfiguration.java:214)
... 49 more
Caused by: java.sql.SQLException: Unable to start the Universal Connection Pool: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException(PoolDataSourceImpl.java:587)
at oracle.ucp.jdbc.PoolDataSourceImpl.startPool(PoolDataSourceImpl.java:276)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:646)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:613)
at oracle.ucp.jdbc.PoolDataSourceImpl.getConnection(PoolDataSourceImpl.java:607)
at com.exzac.dal.jdbc.Database.getConnection(Database.java:132)
... 51 more
Caused by: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
at oracle.ucp.util.UCPErrorHandler.newSQLException(UCPErrorHandler.java:541)
at oracle.ucp.jdbc.PoolDataSourceImpl.throwSQLException(PoolDataSourceImpl.java:587)
at oracle.ucp.jdbc.PoolDataSourceImpl.startPool(PoolDataSourceImpl.java:247)
... 55 more
Caused by: oracle.ucp.UniversalConnectionPoolException: MBean exception occurred while registering or unregistering the MBean
at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:421)
at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:389)
at oracle.ucp.admin.UniversalConnectionPoolManagerMBeanImpl.getUniversalConnectionPoolManagerMBean(UniversalConnectionPoolManagerMBeanImpl.java:149)
at oracle.ucp.jdbc.PoolDataSourceImpl.startPool(PoolDataSourceImpl.java:242)
... 55 more
Caused by: java.security.PrivilegedActionException: javax.management.InstanceAlreadyExistsException: oracle.ucp.admin:name=UniversalConnectionPoolManagerMBean
at java.security.AccessController.doPrivileged(Native Method)
at oracle.ucp.admin.UniversalConnectionPoolManagerMBeanImpl.getUniversalConnectionPoolManagerMBean(UniversalConnectionPoolManagerMBeanImpl.java:136)
... 56 more
Caused by: javax.management.InstanceAlreadyExistsException: oracle.ucp.admin:name=UniversalConnectionPoolManagerMBean
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:714)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
at weblogic.management.mbeanservers.internal.JMXContextInterceptor.registerMBean(JMXContextInterceptor.java:448)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:712)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
at weblogic.management.jmx.mbeanserver.WLSMBeanServer.registerMBean(WLSMBeanServer.java:462)
at oracle.ucp.admin.UniversalConnectionPoolManagerMBeanImpl$2.run(UniversalConnectionPoolManagerMBeanImpl.java:142)
... 58 more
From then on I hit this exception, even when I stop the server and restart and try to deploy. Only cleaning all published resources seems to clear the exception. I understand that a published resource was not properly cleaned in the destroy method, and I am thinking that the resource is the UniversalConnectionPoolManagerMBean instance, but I thought it would be clean up by the destroyConnectionPool method:
http://docs.oracle.com/cd/B28359_01/java.111/e11990/oracle/ucp/admin/UniversalConnectionPoolManagerMBean.html#destroyConnectionPool_java_lang_String_
How do I avoid hitting this exception?
Just as an interesting (yet unsafe) workaround: For some reason when I insert this into the initialization:
try {
UniversalConnectionPoolManagerImpl.getUniversalConnectionPoolManager().destroyConnectionPool(mConnectionPoolName);
} catch (final Exception e1) {
LOGGER.error(e1);
}
the exception is thrown and caught saying that it could not find a connectionPool with this name to destroy, but the original problem is gone. javax.management.InstanceAlreadyExistsException: oracle.ucp.admin:name=UniversalConnectionPoolManagerMBean is not thrown
This bug seems to have been fixed in versions 11.2.0.4 and 12.1.0.2. I couldn't find any documentation about it, but for me the error disappeared with the above mentioned versions.
JDBC/UCP Download Page:
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
This is from Oracle's 11.2.0.4 UCP.jar README.txt.
Fixes in 11.2.0.4
16805157 The name of the UniversalConnectionPoolManagerMBean is made
unique per classloader and hence unique to every UCP instance
even within the same JVM
This fixes the javax.management.InstanceAlreadyExistsException described in the original question. Every connection pool created with have a unique name and will not result in InstanceAlreadyExistsException. However, since you are restarting, you should look into figuring out how to close the connection pool MBean cleanly so you won't run into this problem.