question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to launch Thorntail app du to jolokia and logging subsystem

See original GitHub issue

Description

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:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rhusscommented, Sep 5, 2018

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.

1reaction
rhusscommented, Sep 6, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 6. Known issues Red Hat build of Thorntail 2.7
6.1. Thorntail applications fail to boot due to logging issues · Description. Thorntail is based on WildFly. · Cause. The Thorntail application fails...
Read more >
1. Fractions - Thorntail Documentation
A Maven-based application with the logging fraction enabled. For more information, see Enabling logging. A writable directory on your file system. Procedure.
Read more >
Thorntail app on Heroku with JVM metrics enabled
When I enable Heroku's JVM metrics on my working Thorntail 2.2.0 app, the app fails at startup, and strange errors occur.
Read more >
OpenShift Maven Plugin - JKube - Eclipse
Undeploy and remove resources descriptors from a cluster. oc:log. Show the logs of the running application. oc:debug. Enable remote debugging ...
Read more >
Thorntail Runtime Guide - Fabric8 Launcher
The Thorntail runtime enables you to run Thorntail applications and ... fails to service a request due to connection loss, in a resilient...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found