Wildfly 2x | Server resume - wildfly

I am experiencing an unexpected automatic EAR restart from Wildfly 23.0.2.Final (also verified with 22.0.1.Final and 23.0.0.Final).
Basically, what happens is that the application is started, but when everything is up and running, I receive a message that reads WFLYSRV0212: Resuming server and the deploy process starts over again. This also seems to jeopardize JMS queues definition (defined from within the EJB module as #JMSResourceDestinations).
Below the snippet of the logs when this happens (just a bit anonymized):
13:16:12,228 INFO [org.jboss.as.server] (ServerService Thread Pool -- 48) WFLYSRV0010: Deployed "XXXX.ear" (runtime-name : "XXXX.ear")
13:16:12,250 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0019: Stopped Driver service with driver-name = XXXXX.ear_org.postgresql.Driver_42_2
13:16:12,251 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
13:16:12,260 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 9) WFLYUT0022: Unregistered web context: '/api' from server 'default-server'
13:16:12,269 INFO [io.undertow.servlet] (ServerService Thread Pool -- 9) Closing Spring root WebApplicationContext
13:16:12,303 WARN [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 25) AMQ222061: Client connection failed, clearing up resources for session 1610e737-d282-11eb-9d4b-0242e77fb65d
13:16:12,309 WARN [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 25) AMQ222107: Cleared up resources for session 1610e737-d282-11eb-9d4b-0242e77fb65d
13:16:12,313 WARN [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ152005: Failure in broker activation org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter#9f1bfbc destination=java:global/XXXX/jms/queue/queue1 destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): ActiveMQUnBlockedException[errorType=UNBLOCKED message=AMQ219016: Connection failure detected. Unblocking a blocking call that will never get a response]
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:540)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:434)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:300)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:249)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionChannel(ClientSessionFactoryImpl.java:1401)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:705)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:316)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.ActiveMQResourceAdapter.createSession(ActiveMQResourceAdapter.java:1602)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.setupSession(ActiveMQActivation.java:491)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.setup(ActiveMQActivation.java:316)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation$SetupActivation.run(ActiveMQActivation.java:764)
at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter$WorkWrapper.run(ActiveMQResourceAdapter.java:161)
at org.jboss.ironjacamar.impl#1.4.27.Final//org.jboss.jca.core.workmanager.WorkWrapper.runWork(WorkWrapper.java:445)
at org.jboss.as.connector#23.0.2.Final//org.jboss.as.connector.services.workmanager.WildflyWorkWrapper.runWork(WildflyWorkWrapper.java:69)
at org.jboss.ironjacamar.impl#1.4.27.Final//org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:29)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:789)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:44)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:809)
at java.base/java.lang.Thread.run(Thread.java:829)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
13:16:12,329 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-5) WFLYMSGAMQ0006: Unbound messaging object to jndi name java:global/XXXX/jms/queue/queue1
The EAR was created with the specific Wildfly archetype. The configuration of the Wildfly instance is the standalone-full, as it comes out of the box.
Anyone who can help me understand what's happening?
UPDATE: Wildfly logs
Increasing the root log level and goinf through it, I've found the following:
2021-06-22 18:44:59,357 DEBUG [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) Deployment scan of [/home/xxxx/wildfly-23.0.2.Final/standalone/deployments] found update action [{
"operation" => "composite",
"address" => [],
"steps" => [
{
"operation" => "add",
"address" => [("deployment" => "togather-engine.ear")],
"content" => [{
"archive" => false,
"path" => "deployments/XXXX.ear",
"relative-to" => "jboss.server.base.dir"
}],
"persistent" => false,
"owner" => [
("subsystem" => "deployment-scanner"),
("scanner" => "default")
]
},
{
"operation" => "deploy",
"address" => [("deployment" => "XXXX.ear")],
"owner" => [
("subsystem" => "deployment-scanner"),
("scanner" => "default")
]
}
],
"operation-headers" => {"rollback-on-runtime-failure" => false}
}]
After a bit
2021-06-22 18:45:11,886 DEBUG [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) Deployment scan of [/home/xxxxx/wildfly-23.0.2.Final/standalone/deployments] found update action [{
"operation" => "redeploy",
"address" => [("deployment" => "XXXX.ear")],
"owner" => [
("subsystem" => "deployment-scanner"),
("scanner" => "default")
]
}]
It looks that it's actually that is going through the deployment twice.

Related

deploying a project to wildfly server getting issues with required service are not installed

I have created the maridb folder inside Wildfly/module.../mariadb/ and added the required module.xml file and appropriate jar file.
08:36:58,152 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "dgpa")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.mariadb-java-client-2_3_0_jar"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/Archive is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]",
"org.wildfly.data-source.dbpa is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]"
]
}
08:36:58,192 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "dbagpa")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.jdbc-driver.mariadb-java-client-2_3_0_jar",
"jboss.jdbc-driver.mariadb-java-client-2_3_0_jar"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/Archive is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]",
"org.wildfly.data-source.dbpa is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]",
"org.wildfly.data-source.dbpa is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]"
I am posting answer to my question, I messed up with my standalone.xml and I followed the below-mentioned link and it worked.
https://issues.redhat.com/browse/JBEAP-2405

Spring Cloud config client not picking values from Config server

My Config client is not picking the property values from config
server.
http://localhost:8888/customer_service/default
Above Config server endpoint is returning proper values for Config client,
{
"name": "customer_service",
"profiles": [
"default"
],
"label": null,
"version": "c7648db5662dc65aeaad9c91abbf58b41010be7c",
"state": null,
"propertySources": [
{
"name": "https://github.com/prasadrpm/MicroService_config.git/customer_service.properties",
"source": {
"customer.config.location": "XXXX",
"customer.config.name": "YYYY"
}
}
]
}
Config client bootstrap.properties
server.port=8080
spring.application.name=customer_service
spring.cloud.config.enabled=true
spring.cloud.config.name=config_server
spring.cloud.config.uri=http://localhost:8888
Config client Log
2020-04-10 16:47:00.725 INFO 14976 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2020-04-10 16:47:03.267 INFO 14976 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=config_server, profiles=[default], label=null, version=c7648db5662dc65aeaad9c91abbf58b41010be7c, state=null
2020-04-10 16:47:03.269 INFO 14976 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}]
2020-04-10 16:47:03.280 INFO 14976 --- [ main] com.customer.CustomerServiceApplication : No active profile set, falling back to default profiles: default
...
2020-04-10 16:47:05.164 INFO 14976 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1860 ms
2020-04-10 16:47:05.549 WARN 14976 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'customer.config.location' in value "${customer.config.location}"
2020-04-10 16:47:05.552 INFO 14976 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-04-10 16:47:05.577 INFO 14976 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-04-10 16:47:05.595 ERROR 14976 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'customer.config.location' in value "${customer.config.location}"
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar:5.2.5.RELEASE]
The URL that returns you correct properties/configuration is: localhost:8888/customer_service/default
Client application is querying for properties based on following data:
c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
c.c.c.ConfigServicePropertySourceLocator : Located environment: name=config_server, profiles=[default], label=null, version=c7648db5662dc65aeaad9c91abbf58b41010be7c, state=null
b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}]
com.customer.CustomerServiceApplication : No active profile set, falling back to default profiles: default
...
So, effectively, client application is calling:
localhost:8888/config_server/default
So, there are two solutions:
delete spring.cloud.config.name=config_server property in bootstrap.properties, and your application should be able to fetch properties.
update value of spring.cloud.config.name to customer_service service. But if you do not provide spring.cloud.config.name explicitly, then client will use spring.application.name as the default value for spring.cloud.config.name.
What annotation you had used here?
It can be easily retrieved like this.
#Value("${customer.config.location}")
private String someOtherProperty;
and it is not needed
spring.cloud.config.name=config_server

Jboss undeploy for deploying null

My jboss server starts without errors and deploys my ear but after some seconds it undeploys it:
16:03:34,762 DEBUG [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) Deployment scan of [U:\JBOSS_CFG\deployments] found update action
16:28:46,919 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "myear.ear" (runtime-name : "my-ear.ear")
[{
"operation" => "composite",
"address" => [],
"steps" => [
{
"operation" => "undeploy",
"address" => [("deployment" => "my-ear.ear")]
},
{
"operation" => "remove",
"address" => [("deployment" => "my-ear.ear")]
}
]
}]
16:28:51,014 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment null (runtime-name: my-ejb.jar) in 25ms
16:28:51,093 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment my-ear.ear (runtime-name: my-ear.ear) in 82ms
16:28:51,186 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018558: Undeployed "my-ear.ear" (runtime-name: "my-ear.ear")

Wildfly missing/unavailable dependencies

Wildfly 10 on deploy
Can you help me with such error
11:25:36,039 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "console-dev.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.naming.context.java.global.\"services-1.0.5\".\"api.ejb-1.1\".\"ActionsFacadeBean!by.common.api.IActionsService\""
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.module.console-dev.console-dev.env.\"by.abank.admin.ui.factory.EJBFactory\".iActionsService is missing [jboss.naming.context.java.global.\"services-1.0.5\".\"api.ejb-1.1\".\"ActionsFacadeBean!by.common.api.IActionsService\"]",
]
}
I have service.ear with
#Stateless #Remote ActionsFacadeBean
And console-dev.war
#EJB(lookup = "java:global/services-1.0.5/api.ejb-1.1/ActionsFacadeBean!by.common.api.IActionsService")
protected IActionsService iActionsService;

Wildfly 8.0.0-beta1 not showing OSGI bundles correcty

I am having problems with OSGI bundles on Wildfly (formerly known as JBoss) 8.0.0-beta1.
I installed OSGI without issues. Then, when I launch the application server, OSGI apparently starts correctly:
[org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011001: Bundle installed: org.apache.felix.log:1.0.1
[org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011001: Bundle installed: jboss-osgi-logging:1.0.0
[org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011001: Bundle installed: org.apache.felix.configadmin:1.6.0
[org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011001: Bundle installed: jbosgi-wildfly-configadmin:2.1.0
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011011: Starting bundles for start level: 1
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011002: Bundle started: jbosgi-wildfly-http:2.1.0
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011002: Bundle started: jbosgi-wildfly-jpa:2.1.0
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011002: Bundle started: org.apache.felix.log:1.0.1
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011002: Bundle started: jboss-osgi-logging:1.0.0
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011002: Bundle started: org.apache.felix.configadmin:1.6.0
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011002: Bundle started: jbosgi-wildfly-configadmin:2.1.0
[org.jboss.osgi.framework] (MSC service thread 1-13) JBOSGI011000: OSGi Framework started
However, when I use the management console, some important information on the bundles is apparently missing (check attached screen shot).
This is data I have using /subsystem=osgi:
{
"activation" => "eager",
"startlevel" => 1,
"bundle" => {
"0" => undefined,
"1" => undefined,
"10" => undefined,
"11" => undefined,
"12" => undefined,
"13" => undefined,
"14" => undefined,
"2" => undefined,
"3" => undefined,
"4" => undefined,
"5" => undefined,
"6" => undefined,
"7" => undefined,
"8" => undefined,
"9" => undefined
},
"capability" => {
"javax.jws.api" => undefined,
"javax.persistence.api" => undefined,
"javax.servlet.api" => undefined,
"javax.transaction.api" => undefined,
"javax.ws.rs.api" => undefined,
"javax.xml.bind.api" => undefined,
"javax.xml.ws.api" => undefined,
"org.apache.felix.log" => undefined,
"org.jboss.osgi.logging" => undefined,
"org.apache.felix.configadmin" => undefined,
"org.jboss.as.osgi.configadmin" => undefined,
"org.jboss.as.osgi.http" => undefined,
"org.jboss.as.osgi.jpa" => undefined
},
"property" => {"org.osgi.framework.startlevel.beginning" => undefined}
}