Unable to launch Thorntail app du to jolokia and logging subsystem
See original GitHub issueDescription
By reenabling Jolokia (https://github.com/fabric8io/fabric8-maven-plugin/issues/1217) my thorntail application can’t be launched du to an issue between the logger used by Jolokia and Thorntail.
exec java -Dswarm.http.port=8080 -Deventstore.username=devuser -Deventstore.password=devpassword -Deventstore.database=eventstoredb -Deventstore.remote-host=eventstore-database.developer.svc -Deventstore.remote-port=27017 -javaagent:/opt/agent-bond/agent-bond.jar=jolokia{{host=0.0.0.0}},jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp . -jar /deployments/noteapp-write-thorntail.jarI> No access restrictor found, access to any MBean is allowed Jolokia: Agent started with URL http://172.17.0.4:8778/jolokia/ … Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property “java.util.logging.manager” and set it to “org.jboss.logmanager.LogManager”
Info
- f-m-p version : 3.5.41
- Maven version (
mvn -v
) :Apache Maven 3.5.2
- Kubernetes / OpenShift setup and version : 3.9.0
- If it’s a bug, how to reproduce : mvn clean fabric8:deploy
- If it’s a feature request, what is your use case :
- Sample project : [GitHub Clone URL]
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
Thanks, I could reproduce it now.
It looks like that Thorntail again has changed how the logging system is initialized so that the fix in Jolokia 1.3.6 which was added specifically for the strange way how JBoss handles logging was introduced.
As background info, it all boils down that the JBoss logging subsystem needs to be initialized before java.util.logging has been used the first time, but Jolokia as a Java agent starts very early. Jolokia itself doesnt use java.util.logging but it used classes (the java http server) which in turn uses these classes.
So its in issue for Jolokia and Thorntail to fix this, so we would need another release from either Thorntail or Jolokia.
In the meantime I again recommend to switch off Jolokia in the Thorntail generator as mentioned above.
You can easily add the environment variables on your own to the deployment config --> https://github.com/rhuss/fabric8-maven-plugin/blob/a7ea12022b03b4730b8111dcd4bdaac525ba9216/samples/thorntail/pom.xml#L78-L83
I added a PR https://github.com/fabric8io/fabric8-maven-plugin/pull/1371 to add your sample to the fmp sample. I hope this ok 😉
It starts up now, but I can’t still reach the endpoint via the service (i added a type NodePort to test in on minikube). Not sure what is going on here.