I try to connect Jolokia to a running Java application (
corda).
Jolokia returns an error:
java -jar jolokia.jar --debug start corda.Node
Couldn't start agent for process matching "corda.Node" (PID: 43358)
Possible reason could be that port '8778' is already occupied.
Please check the standard output of the target process for a detailed error message.
However, actual application is happy:
D> /10.12.0.4<-- Listening for queries
D> /10.12.0.4<-- Waiting
Jolokia: Agent started with URL http://127.0.0.1:8778/jolokia/
And I can access jolokia over http:
wget http://127.0.0.1:8778/jolokia/ ; cat index.html
--2017-07-05 14:16:21-- http://127.0.0.1:8778/jolokia/
Connecting to 127.0.0.1:8778... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: ‘index.html’
2017-07-05 14:16:21 (1.24 MB/s) - ‘index.html’ saved [363]
{"request":{"type":"version"},"value":{"agent":"1.3.6","protocol":"7.2","config":{"maxDepth":"15","discoveryEnabled":"true","maxCollectionSize":"0","agentId":"10.12.0.4-43358-48fd34d3-jvm","debug":"true","agentType":"jvm","historyMaxEntries":"10","agentContext":"\/jolokia","maxObjects":"0","debugMaxEntries":"100"},"info":{}},"timestamp":1499264181,"status":200}
Any idea why?