Port is already occupied when connecting to ElasticSearch with the help of Jolokia jvm agent

I want to monitor jvm health of Elasticsearch 6x with the help of jolokia java jvm agent 1.5.0. For taking all metrics from Jolokia I use Metricbeat-6.2.3 and then will put all of them to Elasticsearch. Everything is installed on Centos system.
according to this instruction https://jolokia.org/reference/html/agents.html#jvm-agent I do such command:
su -c "java -jar /tmp/jolokia-jvm-1.5.0-agent.jar --verbose --debug --port=10000 toggle org.elasticsearch.bootstrap.Elasticsearch" -s /bin/bash elasticsearch
and get such notification
Couldn't start agent for process matching "org.elasticsearch.bootstrap.Elasticsearch" (PID: 5166)
Possible reason could be that port '10000' is already occupied.
Please check the standard output of the target process for a detailed error message.
And there is no effect when I change a port - still the same problem.

When I try to connect to Tomcat - everythings works fine and I get successful response on
What can be the problem of connection to Elastic?

Can you share the output of the java -jar call over here plus any log files?

I assume that there is an issue with Elasticsearch using the Java Security Manager, so that jolokia might have problems to bind to a port, but this is just a guess for now, without further evidence.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.