Closed dcdh closed 5 years ago
@dcdh : Looks like a bug to me. Could you please provide us sample pom so that we can reproduce this issue?
You will find a sample in this repository : https://github.com/dcdh/thorntail-helloworld.git
You need to have an openshift running with a developer namespace having developer defined as password (if using the openshift-run-developer.sh script provided).
I guess that this bug impact wildfly swarm too.
However regarding Thorntail, you will need to update: https://github.com/fabric8io/fabric8-maven-plugin/blob/master/generator/thorntail-v2/src/main/java/io/fabric8/maven/generator/thorntail/v2/ThorntailV2Generator.java
By adding this :
ret.put("AB_OFF", "true");
ret.put("AB_JOLOKIA_OFF", "true");
This code correspond to what was defined before for the wildfly swarm genertor and the objective is to disable Jolokia started in the docker image. (Remark: I don't know what AB_OFF should disable)
I guess that a test with wildfly swarm should be done to ensure that their is no regression. Impacted generator can be found here: https://github.com/fabric8io/fabric8-maven-plugin/blob/master/generator/wildfly-swarm/src/main/java/io/fabric8/maven/generator/wildflyswarm/WildFlySwarmGenerator.java
Many thanks by advance. Regards, Damien
Actually the issue with Jolokia and Wildfly Swarm has been fixed in Jolokia 1.3.6 so these lines shouldn't be necessary anymore (and that was the reason why it has been removed).
I will investigate your sample project soonish (this week, just back from PTO).
@dcdh Unfortunately I can't reproduce the issue. When running your sample on minishift 1.23.0 with mvn -Popenshift fabric8:deploy
the pod starts up properly (but seems to have ab other issue)
The import part is Jolokia: Agent started with URL http://172.17.0.8:8778/jolokia/
which indicates that Jolokia could be started.
Any idea how I could reproduce the error ?
I have just try again with this following steps:
1/ git clone https://github.com/dcdh/thorntail-helloworld.git 2/ mvn clean fabric8:deploy -Popenshift OR ./openshift-run-developer.sh
Unfortunately the deployment keep failing.
I am using OpenShift Origin 3.9.0.
Here you will find my log.
And a screenshot
Regards,
Damien
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.
It is possible to configure the activitation of Jolokia using the configuration ?
For example it is possible to setup options in the Java Exec generator (https://maven.fabric8.io/#generator-java-exec) It is done in this java class https://github.com/fabric8io/fabric8-maven-plugin/blob/master/generator/java-exec/src/main/java/io/fabric8/maven/generator/javaexec/JavaExecGenerator.java using a Config enum constant and the magic is done in the customize method.
I guess it would be a good way to add the possibility to specify if we want to enable or not Jolokia in https://github.com/fabric8io/fabric8-maven-plugin/blob/master/generator/thorntail-v2/src/main/java/io/fabric8/maven/generator/thorntail/v2/ThorntailV2Generator.java by using the same kind of configuration.
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.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
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.
Info
mvn -v
) :Apache Maven 3.5.2