[ZBX-12998] Trying JMX monitroing of Wildfly10 Unsupported protocol Created: 2017 Nov 07 Updated: 2017 Dec 07 Resolved: 2017 Dec 07 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Java gateway (J), Server (S) |
Affects Version/s: | 3.4.3 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Slava Nazin | Assignee: | Unassigned |
Resolution: | Workaround proposed | Votes: | 0 |
Labels: | items | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
RedHat2.6.32-573 |
Attachments: |
![]() ![]() ![]() ![]() |
Description |
Steps to reproduce: jmx[java.lang:type=OperatingSystem,Arch] service:jmx:remote+http://{HOST.CONN}:{HOST.PORT} from log file: 2017-11-07 18:20:44.671 [pool-1-thread-3] WARN com.zabbix.gateway.SocketProcessor - error processing request com.zabbix.gateway.ZabbixException: java.net.MalformedURLException: Unsupported protocol: remote+http at com.zabbix.gateway.JMXItemChecker.getValues(JMXItemChecker.java:97) ~[zabbix-java-gateway-3.4.3.jar:na] at com.zabbix.gateway.SocketProcessor.run(SocketProcessor.java:63) ~[zabbix-java-gateway-3.4.3.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] Caused by: java.net.MalformedURLException: Unsupported protocol: remote+http at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:357) ~[na:1.7.0_79] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267) ~[na:1.7.0_79] at com.zabbix.gateway.ZabbixJMXConnectorFactory$1.run(ZabbixJMXConnectorFactory.java:76) ~[zabbix-java-gateway-3.4.3.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_79] ... 3 common frames omitted 2017-11-07 18:20:44.671 [pool-1-thread-3] DEBUG c.z.gateway.BinaryProtocolSpeaker - sending the following data in response: {"response":"failed","error":"java.net.MalformedURLException: Unsupported protocol: remote+http"} |
Comments |
Comment by Vjaceslavs Bogdanovs [ 2017 Nov 10 ] |
Well, this is not exactly a bug in Zabbix. As far as I can tell from your description, Java Gateway cannot connect to specified endpoint because protocol remote+http is not supported. And we get to the point when I must say that libs that you are using does not imlement requested protocol. But just to not to leave you there, you can try to find correct library with this java test code: package jmxtest; import java.util.logging.Level; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; public class JmxTest { public static void main(String[] args) { try { JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:remote+http://<REST OF ENDPOINT GOES HERE>"), null); } catch (Exception ex) { java.util.logging.Logger.getLogger(JmxTest.class.getName()).log(Level.SEVERE, null, ex); } } } You can then try running it with different libs linked to find the one that works. |
Comment by Błażej Karabin [ 2017 Nov 21 ] |
you need to copy jboss-client.jar from wildfly/bin/client to your zabbix-java-gateway libs (default) => /usr/share/zabbix-java-gateway/lib/ and restart gateway. |
Comment by Ingus Vilnis [ 2017 Dec 07 ] |
As stated previously this is not a defect in Zabbix code as well as a workaround was proposed. Closing the issue as Workaround proposed. |