Closed beemi closed 4 years ago
2020-08-21 15:54:18,970 ERROR c.g.j.l.PrometheusListener: Couldn't start http server 2020-08-21 15:56:19,542 ERROR c.g.j.l.PrometheusListener: Couldn't stop http server
Here is my Prometheus config
`scrape_configs:
job_name: prometheus scheme: https static_configs:
job_name: jmeter static_configs:
Tried passing IP as a command-line argument as below
jmeter -Dprometheus.ip={metricsHOST_IP} -f -n -t healthCheck.jmx
Getting exception
2020-08-26 15:05:22,175 ERROR c.g.j.l.PrometheusListener: Couldn't start http server java.net.BindException: Can't assign requested address at sun.nio.ch.Net.bind0(Native Method) ~[?:?] at sun.nio.ch.Net.bind(Net.java:461) ~[?:?] at sun.nio.ch.Net.bind(Net.java:453) ~[?:?] at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) ~[?:?] at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) ~[?:?] at sun.net.httpserver.ServerImpl.bind(ServerImpl.java:134) ~[jdk.httpserver:?] at sun.net.httpserver.HttpServerImpl.bind(HttpServerImpl.java:54) ~[jdk.httpserver:?] at com.github.johrstrom.listener.PrometheusServer.start(PrometheusServer.java:154) ~[jmeter-prometheus-plugin-0.6.0.jar:?] at com.github.johrstrom.listener.PrometheusListener.testStarted(PrometheusListener.java:142) [jmeter-prometheus-plugin-0.6.0.jar:?] at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:206) [ApacheJMeter_core.jar:5.2.1] at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:381) [ApacheJMeter_core.jar:5.2.1] at java.lang.Thread.run(Thread.java:834) [?:?]
Hi sorry for the delay. -Dprometheus.ip={metricsHOST_IP}
this should be the IP of the jmeter server (where the jmeter process is running), not the prometheus host. The idea here is that it you can bind the jmeter server to say 0.0.0.0 to bind to all interfaces.
Hi John,
No problem, thanks for the plugin.
Its works with -Dprometheus.ip=0.0.0.0
I see metrics now.
@johrstrom is that possible multiple JMX on same machine can write metric on localhost:9270.
I have 6 project and all 6 project need to run parallel .is that possible all 6 JMX file can write data on localhost:9270/metrics
I have 6 project and all 6 project need to run parallel .is that possible all 6 JMX file can write data on localhost:9270/metrics
No, becuase each jmeter server (jmx file) would be a different port. Seems like you need to combine all 6 projects (use cases?) into 1 jmx file for the type of thing you're looking to do.
Hi,
I have added IP and Port number in user.properties file in JMETER_BIN but I get NPE, Prometheus running in another ser er.
user.properties prometheus.ip=
prometheus.port=9270
2020-08-20 16:45:45,921 ERROR c.g.j.l.PrometheusListener: Couldn't start http server java.lang.NullPointerException: null at com.github.johrstrom.listener.PrometheusServer.start(PrometheusServer.java:148) ~[jmeter-prometheus-plugin-0.6.0.jar:?] at com.github.johrstrom.listener.PrometheusListener.testStarted(PrometheusListener.java:142) [jmeter-prometheus-plugin-0.6.0.jar:?] at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:206) [ApacheJMeter_core.jar:5.2.1] at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:381) [ApacheJMeter_core.jar:5.2.1] at java.lang.Thread.run(Thread.java:834) [?:?] 2020-08-20 16:45:46,192 ERROR c.g.j.l.PrometheusListener: Couldn't stop http server java.lang.NullPointerException: null at com.github.johrstrom.listener.PrometheusServer.stop(PrometheusServer.java:166) ~[jmeter-prometheus-plugin-0.6.0.jar:?] at com.github.johrstrom.listener.PrometheusListener.testEnded(PrometheusListener.java:109) [jmeter-prometheus-plugin-0.6.0.jar:?] at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfEnd(StandardJMeterEngine.java:218) [ApacheJMeter_core.jar:5.2.1] at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:492) [ApacheJMeter_core.jar:5.2.1] at java.lang.Thread.run(Thread.java:834) [?:?]