[ZBX-26134] Zabbix Java Gateway stops logging once WildFly "jboss-client.jar" file is copied to ZJG lib directory Created: 2025 Mar 05 Updated: 2025 Jun 19 Resolved: 2025 Jun 19 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Java gateway (J) |
| Affects Version/s: | 6.0.39, 7.2.4 |
| Fix Version/s: | None |
| Type: | Problem report | Priority: | Trivial |
| Reporter: | Tomass Janis Bross | Assignee: | Michael Veksler |
| Resolution: | Won't fix | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Team: | |||||
| Sprint: | Prev.Sprint, S25-W20/21, S25-W22/23 | ||||
| Story Points: | 1 | ||||
| Description |
|
If you attempt to set up WildFly Domain monitoring, and follow the steps as described in the template README page, then your Zabbix Java Gateway stops logging information. After you copy the WildFly "jboss-client.jar" file to the "/usr/share/zabbix-java-gateway/lib" directory (Step 2 in https://www.zabbix.com/integrations/wildfly#wildfly_domain_jmx), and restart the Zabbix Java Gateway service, then the ZJG service stops logging in it's logfile. When you check Zabbix-Java-Gateway status after copying the "jboss-client.jar" file, you notice these errors: Mar 05 21:08:57 zabbix zabbix_java_gateway_startup[2652607]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". Mar 05 21:08:57 zabbix zabbix_java_gateway_startup[2652607]: SLF4J: Defaulting to no-operation (NOP) logger implementation Mar 05 21:08:57 zabbix zabbix_java_gateway_startup[2652607]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Tested and reproduced on 6.0.39 and 7.2.4. |
| Comments |
| Comment by Hans-Georg Bork [ 2025 Apr 15 ] |
|
This happens also with 6.0.38. Downgrading zabbix-java-gateway to 6.0.37 solves it ... |
| Comment by Marco W. [ 2025 May 05 ] |
|
We thought we fixed this issue, but on our test system "jboss-client.jar" was not present, therefore the problem did not occur.
|
| Comment by Marco W. [ 2025 May 06 ] |
|
We found the following workaround, but later also a final solution. I post this workaround in case it's usefull for somebody. See the next comment for a final solution. It seems the order of loaded jar files matters in this case. The jboss-client.jar needs to be loaded last from the lib directory. The startup script automatically loads all jar files in alphabetical order. By renaming the jar file it's possible to manipulate the order in which the jars are loaded. We renamed "jboss-client.jar" to "zzzjboss-client.jar." So we added "zzz" in front of the file name. This way the file is the last in alphabetical order.
We changed the log level from "info" to "debug" in the file "/etc/zabbix/zabbix_java_gateway_logback.xml", in order to see more details.
As the file is not provided by the zabbix-java-gateway package, It also works after an update. This was tested with the following versions: 6.0.38 |
| Comment by Marco W. [ 2025 May 06 ] |
|
There is an easy fix which is obvious in hindsight: Just update the jboss-client.jar
Get the latest version of the jboss-client from: https://www.wildfly.org/downloads/ (The link is also in the zabbix documentation about the java gateway)
You have to download the zip or tar for "WildFly Distribution". Unpack the archiv and find the jar file under "bin/client/ jboss-client.jar". Replace the file under "/usr/share/zabbix-java-gateway/lib" with this new file.
We had version 7.3 of jboss-client.jar (myabe it was from JBoss EAP or it's very very old). With the new version it works without any problems.
You can check the version of the jar like this: our old version: #> unzip -p jboss-client.jar META-INF/MANIFEST.MF Manifest-Version: 1.0 Implementation-Title: WildFly: EJB and JMS client combined jar Implementation-Version: 7.3.3.GA-redhat-00004 Java-Version: 1.8.0_121 Built-By: PNC-Builder-0.4.0 Scm-Connection: scm:git:[email protected]:wildfly/wildfly.git/client/wild fly-client-all Specification-Vendor: JBoss by Red Hat Os-Arch: amd64 Specification-Title: WildFly: EJB and JMS client combined jar Implementation-Vendor-Id: org.jboss.eap JBossAS-Release-Version: 7.3.3.GA-redhat-00004 Java-Vendor: Oracle Corporation Os-Name: Linux Scm-Url: https://github.com/wildfly/wildfly Implementation-Vendor: JBoss by Red Hat Os-Version: 3.10.0-1127.19.1.el7.x86_64 Scm-Revision: 0a22160f2b73feb9785fe8c201ad5202b5158ede Multi-Release: true JBossAS-Release-Codename: N/A Created-By: Apache Maven 3.3.9 Build-Jdk: 1.8.0_121 Specification-Version: 7.3 Implementation-URL: http://www.jboss.org/jboss-eap-parent/client/wildfly-client-all the newest version: #> unzip -p jboss-client_wildfly-36.0.0.jar META-INF/MANIFEST.MF Manifest-Version: 1.0 Created-By: Maven JAR Plugin 3.4.2 Build-Jdk-Spec: 17 Specification-Title: Galleon shading of WildFly: Jakarta Enterprise Beans and Jakarta Messaging client combined jar Specification-Version: 36.0 Specification-Vendor: JBoss by Red Hat Implementation-Title: Galleon shading of WildFly: Jakarta Enterprise Beans and Jakarta Messaging client combined jar Implementation-Version: Unknown Implementation-Vendor: JBoss by Red Hat Implementation-URL: http://www.jboss.org JBossAS-Release-Codename: N/A JBossAS-Release-Version: 36.0.0.Final Java-Version: 17.0.14 Scm-Connection: scm:git:[email protected]:wildfly/wildfly.git Scm-Revision: b6f8e1f589ba3f560b08282cad1cd8e3f9581b4e Scm-Url: https://github.com/wildfly/wildfly Export-Package: * Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.jboss.client Bundle-Version: 1.0 Bundle-Name: Jakarta Enterprise Beans and Jakarta Messaging client library Fragment-Host: org.openjdk.jmc.rjmx Automatic-Module-Name: org.jboss.client Multi-Release: true We renamed our new file, so that we know the version without checking in the future.
As the file is not provided by the zabbix-java-gateway package, It also works after an update. This was tested with the following versions: 6.0.38 |
| Comment by Michael Veksler [ 2025 Jun 06 ] |
|
HI Marco W. Thanks a lot for your notes and results of tests. Closing this for now, if you have any more questions, feel free to reopen this ticket! |