undera / perfmon-agent

Server metrics fetching agent, based on SIGAR
Apache License 2.0
397 stars 138 forks source link

Server Agent is giving Error reading from the network layer #26

Open sumabris opened 2 years ago

sumabris commented 2 years ago

Hi All,

I am trying to connect to Server Agent from Jmeter perfmon plugin. I am getting below error.

I can do telnet ip 4444 successfully

ERROR 2022-07-21 00:20:54.686 [kg.apc.p] (): Error reading from the network layer java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at kg.apc.perfmon.PerfMonWorker.read(PerfMonWorker.java:171) at kg.apc.perfmon.PerfMonWorker.processCommands(PerfMonWorker.java:87) at kg.apc.perfmon.AgentTool.processParams(AgentTool.java:75) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:63) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:174)

Full logs:

C:\Users\Administrator\Downloads\ServerAgent-2.2.3\ServerAgent-2.2.3>startAgent.bat --loglevel DEBUG DEBUG 2022-07-21 00:26:21.224 [kg.apc.p] (): Start accepting connections INFO 2022-07-21 00:26:21.280 [kg.apc.p] (): Binding UDP to 4444 INFO 2022-07-21 00:26:22.286 [kg.apc.p] (): Binding TCP to 4444 INFO 2022-07-21 00:26:22.294 [kg.apc.p] (): JP@GC Agent v2.2.3 started INFO 2022-07-21 00:26:33.778 [kg.apc.p] (): Accepting new TCP connection DEBUG 2022-07-21 00:26:51.996 [kg.apc.p] (): Creating new metric getter DEBUG 2022-07-21 00:26:52.011 [kg.apc.p] (): Read: java.nio.DirectByteBuffer[pos=0 lim=5 cap=1024] DEBUG 2022-07-21 00:26:52.013 [kg.apc.p] (): Command line is: test

DEBUG 2022-07-21 00:26:52.020 [kg.apc.p] (): Got command line: test INFO 2022-07-21 00:26:52.027 [kg.apc.p] (): Yep, we received the 'test' command DEBUG 2022-07-21 00:26:52.033 [kg.apc.p] (): Done executing command DEBUG 2022-07-21 00:26:52.037 [kg.apc.p] (): Command line is: INFO 2022-07-21 00:26:52.040 [kg.apc.p] (): Accepting new TCP connection DEBUG 2022-07-21 00:26:52.042 [kg.apc.p] (): Creating new metric getter ERROR 2022-07-21 00:26:52.048 [kg.apc.p] (): Error reading from the network layer java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at kg.apc.perfmon.PerfMonWorker.read(PerfMonWorker.java:171) at kg.apc.perfmon.PerfMonWorker.processCommands(PerfMonWorker.java:87) at kg.apc.perfmon.AgentTool.processParams(AgentTool.java:75) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:63) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:174) DEBUG 2022-07-21 00:26:52.063 [kg.apc.p] (): Read: java.nio.DirectByteBuffer[pos=0 lim=5 cap=1024] DEBUG 2022-07-21 00:26:52.078 [kg.apc.p] (): Command line is: test

DEBUG 2022-07-21 00:26:52.079 [kg.apc.p] (): Got command line: test INFO 2022-07-21 00:26:52.080 [kg.apc.p] (): Yep, we received the 'test' command DEBUG 2022-07-21 00:26:52.085 [kg.apc.p] (): Done executing command DEBUG 2022-07-21 00:26:52.086 [kg.apc.p] (): Command line is: ERROR 2022-07-21 00:26:52.090 [kg.apc.p] (): Error reading from the network layer java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at kg.apc.perfmon.PerfMonWorker.read(PerfMonWorker.java:171) at kg.apc.perfmon.PerfMonWorker.processCommands(PerfMonWorker.java:87) at kg.apc.perfmon.AgentTool.processParams(AgentTool.java:75) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:63) at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:174)

undera commented 2 years ago

Looks like the client side aborts the connection in the middle of communication. Check the client logs (JMeter I guess), to see if it runs well.