problem in configuring jp@gc - PerfMon Metrics Collector

7,940 views
Skip to first unread message

Anand Matta

unread,
Jan 2, 2014, 8:56:03 AM1/2/14
to jmeter-...@googlegroups.com
Hi I am getting  ERROR: java.io.IOException: Agent is unreachable via TCP while using PerfMon Metrics Collector. Below are my configurations.

Server:

[root@v525400ebf488 ~]# cd ServerAgent
[root@v525400ebf488 ServerAgent]# sh startAgent.sh
INFO    2014-01-02 08:37:33.808 [kg.apc.p] (): Binding UDP to 4444
INFO    2014-01-02 08:37:34.808 [kg.apc.p] (): Binding TCP to 4444
INFO    2014-01-02 08:37:34.812 [kg.apc.p] (): JP@GC Agent v2.2.0 started

Configuration in Jmeter using JMeterPlugins-Standard. (http://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.1.2.zip)

<kg.apc.jmeter.perfmon.PerfMonCollector guiclass="kg.apc.jmeter.vizualizers.PerfMonGui" testclass="kg.apc.jmeter.perfmon.PerfMonCollector" testname="jp@gc - PerfMon Metrics Collector" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>false</xml>
              <fieldNames>false</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
            </value>
          </objProp>
          <stringProp name="filename">E:\JmeterTest\1Jan2014\2\PerfMon_Metrics_Collector.csv</stringProp>
          <longProp name="interval_grouping">1000</longProp>
          <boolProp name="graph_aggregated">false</boolProp>
          <stringProp name="include_sample_labels"></stringProp>
          <stringProp name="exclude_sample_labels"></stringProp>
          <collectionProp name="metricConnections">
            <collectionProp name="-2121049993">
              <stringProp name="-2088420726">9.12.207.128</stringProp>
              <stringProp name="1571004">4444</stringProp>
              <stringProp name="66952">CPU</stringProp>
              <stringProp name="0"></stringProp>
            </collectionProp>
          </collectionProp>
        </kg.apc.jmeter.perfmon.PerfMonCollector>

command prompt where Jmeter started:

E:\apache-jmeter-2.10\bin>set HEAP=-Xms2048m -Xmx2048m
[StatAggResultCollector] Test Started, host: *local*
[StatAggResultCollector] Test Ended, host: *local*
Uncaught Exception java.lang.AbstractMethodError. See log file for details.
Uncaught Exception java.lang.AbstractMethodError. See log file for details.
Uncaught Exception java.lang.AbstractMethodError. See log file for details.
Uncaught Exception java.lang.AbstractMethodError. See log file for details.
[StatAggResultCollector] Test Started, host: *local*
[StatAggResultCollector] Test Ended, host: *local*
[StatAggResultCollector] Test Started, host: *local*
[StatAggResultCollector] Test Ended, host: *local*


JMterer logs:

2014/01/02 18:43:03 INFO  - kg.apc.jmeter.perfmon.PerfMonCollector: Can't connect TCP transport for host: /9.12.207.128:3450 java.io.IOException: Agent is unreachable via TCP
at kg.apc.jmeter.perfmon.PerfMonCollector.getConnector(PerfMonCollector.java:245)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnector(PerfMonCollector.java:228)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnectors(PerfMonCollector.java:180)
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:133)
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:311)
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:26)
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:214)
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:336)
at java.lang.Thread.run(Thread.java:619)

2014/01/02 18:43:03 ERROR - kg.apc.jmeter.perfmon.PerfMonCollector: Problems creating connector java.io.IOException: Agent is unreachable via TCP
at kg.apc.jmeter.perfmon.PerfMonCollector.getConnector(PerfMonCollector.java:245)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnector(PerfMonCollector.java:228)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnectors(PerfMonCollector.java:180)
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:133)
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:311)
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:26)
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:214)
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:336)
at java.lang.Thread.run(Thread.java:619)

2014/01/02 18:43:03 INFO  - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*) 
2014/01/02 18:43:03 ERROR - kg.apc.jmeter.perfmon.PerfMonCollector: Perfmon plugin error: java.io.IOException: Agent is unreachable via TCP 


Please help me how to resolve this.

But no use




Andrey Pohilko

unread,
Jan 2, 2014, 2:25:04 PM1/2/14
to jmeter-...@googlegroups.com
Hi,
It seems you have configured your PerfMon Collector to connect to port 3450, while server Agent binding on port 4444. Those ports must be the same for the process to function properly.

четверг, 2 января 2014 г., 17:56:03 UTC+4 пользователь Anand Matta написал:

Anand Matta

unread,
Jan 6, 2014, 2:10:52 AM1/6/14
to jmeter-...@googlegroups.com
No I am not configured wrongly. I tried both portds and both were not working

Andrey Pohilko

unread,
Jan 6, 2014, 7:24:09 AM1/6/14
to jmeter-...@googlegroups.com
So there may be some firewall issue. The fastest way to check for firewall issue is to run "telnet 9.12.207.128 4444" from JMeter machine. It should connect and answer "Yep" if you type him "test".

Post here the results for telnet check.

--
Andrey

понедельник, 6 января 2014 г., 11:10:52 UTC+4 пользователь Anand Matta написал:

agr.ba...@gmail.com

unread,
Sep 5, 2014, 4:47:46 AM9/5/14
to jmeter-...@googlegroups.com
Hi Audrey, I am having the same issue. when I ran telnet 9.12.207.128 4444 from cmd it says "could not open connection to the host", on port:4444, connect failed

Basanta 

Andrey Pohilko

unread,
Sep 5, 2014, 5:36:11 AM9/5/14
to jmeter-...@googlegroups.com, agr.ba...@gmail.com
So this is firewall issue. Consult with your network administrator.

--
Andrey

пятница, 5 сентября 2014 г., 12:47:46 UTC+4 пользователь agr.ba...@gmail.com написал:

yangxi...@cn-acg.com

unread,
Nov 26, 2014, 2:21:21 AM11/26/14
to jmeter-...@googlegroups.com
Hi Anand,

Did you solve it? I got the same issue. Can you help me?

jmeter.log:
ERROR - kg.apc.jmeter.perfmon.PerfMonCollector: Problems creating connector java.io.IOException: Agent is unreachable via TCP
at kg.apc.jmeter.perfmon.PerfMonCollector.getConnector(PerfMonCollector.java:245)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnector(PerfMonCollector.java:228)
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnectors(PerfMonCollector.java:180)
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:133)
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:316)
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:28)
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:214)
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:336)
at java.lang.Thread.run(Thread.java:722)

2014/11/26 09:33:06 INFO  - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*) 
2014/11/26 09:33:06 ERROR - kg.apc.jmeter.perfmon.PerfMonCollector: Perfmon plugin error: java.io.IOException: Agent is unreachable via TCP 


Thanks,
Xiaojuan

haripr...@gmail.com

unread,
Feb 1, 2016, 3:16:03 AM2/1/16
to jmeter-plugins, yangxi...@cn-acg.com
Hi Xiaojuan,

     Whether this issue got resolved in your environment? Even I am also facing the same issue in my environment



Thanks,
Hari

Vincent Daburon

unread,
Feb 1, 2016, 8:53:17 AM2/1/16
to jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com
Hi,
Documentation :
http://jmeter-plugins.org/wiki/PerfMonAgent/
Extract :

Server Agent uses simple plain-text protocol, anyone can use agent's capabilities implementing client, based on kg.apc.perfmon.client.Transport interface. If anyone's interested, start the topic on the support forums and I'll describe how to connect third-party client app to agent.

ServerAgent has simple text protocol and can work on UDP and TCP transports. Most of cases will use TCP.

To have your first talk with the agent, start it locally. Then use telnet utility to connect to it:

user@ubuntu:~$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

If connection has succeeded, you should see "Accepting new TCP connection" message in ServerAgent console log. Type "test" and press Enter in telnet chat, server should answer with short "Yep":

test
Yep

Type "exit":

exit
Connection closed by foreign host.

Regards.
Vincent D.

gli...@gmail.com

unread,
Feb 1, 2016, 12:20:57 PM2/1/16
to jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com
A well-behaved server agent installation should look like:

See How to Monitor Your Server Health & Performance During a JMeter Load Test for comprehensive installation and troubleshooting instructions.


prav...@gmail.com

unread,
Mar 10, 2016, 1:37:42 AM3/10/16
to jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com
Hi Vincent,

I 'm able to connect to agent through telnet, but the Jmeter plugin throws the unreachable via TCP error. SSH tunneling is being used to connect to the server where agent is running as I don't have direct access to the server. See that the agent receives the TCP connection, a test command and immediately closes the connection. Any idea what is getting wrong here ?

Thanks
Praveesh

al.nik....@gmail.com

unread,
Mar 15, 2016, 8:39:47 AM3/15/16
to jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com, prav...@gmail.com, Aliaksandr Kavaliou

Hi colleagues.
I have the same issue with JMeter Perfmon. I can connect 4444 port using telnet command but at the moment I see ERROR: java.io.IOException: Agent is unreachable via TCP. 

Best regards, Aliaksandr

четверг, 10 марта 2016 г., 9:37:42 UTC+3 пользователь prav...@gmail.com написал:

sumanth...@gmail.com

unread,
May 23, 2016, 9:33:37 AM5/23/16
to jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com, prav...@gmail.com, al.nik....@gmail.com
I had the the same issue but when I looked at the Agents creation one of my agent's port was set to XXXX instead of 4444, I changed it back to 4444 and it worked for me :)

go2r...@gmail.com

unread,
Aug 12, 2016, 12:28:44 PM8/12/16
to jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com, prav...@gmail.com, al.nik....@gmail.com, sumanth...@gmail.com
Can you please elaborate what steps you did ?

Aliaksandr Kavaliou

unread,
Aug 12, 2016, 12:54:46 PM8/12/16
to go2r...@gmail.com, jmeter-plugins, yangxi...@cn-acg.com, haripr...@gmail.com, prav...@gmail.com, sumanth...@gmail.com

Thank you for the response. Actually, after some magic restarts of JMeter and server agent the problem had gone.

Apologies for keeping silent about the issue resolving.

 

Kind regards,

Aliaksandr

er.har...@gmail.com

unread,
Jul 12, 2017, 1:10:13 PM7/12/17
to jmeter-plugins

Hi , i am able to start my agent and telnet as weel from server where my jmeter is runnning


bash-4.1$ ./startAgent.sh --udp-port 0 --tcp-port 3450
INFO    14998   [kg.apc.p] (): Binding TCP to 3450
INFO    14998   [kg.apc.p] (): JP@GC Agent v2.2.0 started
INFO    14998   [kg.apc.p] (): Accepting new TCP connection


But when i start my jmeter test it says connection refused and agent log says:

INFO    14998   [kg.apc.p] (): Binding TCP to 3450
INFO    14998   [kg.apc.p] (): JP@GC Agent v2.2.0 started
INFO    14998   [kg.apc.p] (): Accepting new TCP connection
INFO    14998   [kg.apc.p] (): Yep, we received the 'test' command
INFO    14998   [kg.apc.p] (): Starting measures: cpu:
INFO    14998   [kg.apc.p] (): Client disconnected
INFO    14998   [kg.apc.p] (): Accepting new TCP connection
INFO    14998   [kg.apc.p] (): Yep, we received the 'test' command
INFO    14998   [kg.apc.p] (): Starting measures: cpu:system
INFO    14998   [kg.apc.p] (): Client disconnected
INFO    14998   [kg.apc.p] (): Accepting new TCP connection
INFO    14998   [kg.apc.p] (): Yep, we received the 'test' command
INFO    14998   [kg.apc.p] (): Starting measures: cpu:system
INFO    14998   [kg.apc.p] (): Client disconnected



Andrey Pokhilko

unread,
Jul 13, 2017, 4:42:53 AM7/13/17
to jmeter-...@googlegroups.com

Hi,

Does your JMeter test has any requests in it? Monitoring will work only if your test has any duration.

--

Andrey Pokhilko

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

er.har...@gmail.com

unread,
Jul 13, 2017, 6:10:51 AM7/13/17
to jmeter-plugins
Yes Andrey

My Apologies, its always a port issue!! Thanks for replying!! Again my bad to waste your time.

pramo...@gmail.com

unread,
Aug 8, 2017, 6:29:40 AM8/8/17
to jmeter-plugins
We got this issue and resolved by Load balancer issues...there were issues in firewall.

itikamal...@gmail.com

unread,
Mar 7, 2018, 3:31:49 AM3/7/18
to jmeter-plugins
Hi!

I am facing the same issue. Can u please help me to resolve this ASAP.

andres.g...@avature.net

unread,
May 28, 2019, 12:26:07 PM5/28/19
to jmeter-plugins
I faced the same error. The problem is that sadly the perfmon agent has a hardcoded timeout value of 500 ms (https://github.com/undera/perfmon-agent/blob/master/src/kg/apc/perfmon/client/TransportFactory.java#104).

I had to download the code, change this value, compile the package, copy the binary in the jmeter library and restart jmeter. Then it worked.

Regards
Reply all
Reply to author
Forward
0 new messages