emeraldgold07
emeraldgold07

Reputation: 303

JMeter Perfmon Plugin Server Agent error: java.net.SocketException: Permission denied

I tried to use Jmeter Perfmon plugin to extract monitoring of CPU and Memory utilisation of Linux server. Server is hosted on Linux machine. Currently I connected to the Linux remotely using MobaXterm Personal Edition v21.2 (via SSH connection), and able to access the Linux machine successfully.

I already installed the Server Agent on the Linux.

Now, I want to change the server agent port number to 22 since the Linux machine is using port 22 using this command ServerAgent-2.2.3/ServerAgent-2.2.3/startAgent.sh --udp-port 0 --tcp-port 22. Please refer below error:

enter image description here

I changed the permission at the server agent file already:

enter image description here

Wondering why the permission is still denied? Until now I still unable to connect with port 22. If possible, I want to try this solution first before opt to JMeter SSHMon Listener. Appreciate your help.

Upvotes: 0

Views: 684

Answers (1)

Dmitri T
Dmitri T

Reputation: 168197

Now, I want to change the server agent port number to 22 since the Linux machine is using port 22

this assumption is wrong, you need to start the PerfMon Agent on a free port

The reason you're getting the error is trying to run a program which tries to bind to the privileged port as non-superuser account. Only root can use ports below 1024, normal users are restricted to the ports above 1024.

Even if you switch to root user I don't think you will be able to run PerfMon Agent on port 22 as most probably your OpenSSH server is running there so the port is busy.

So choose a free port above 1024, open it in firewall, run the ServerAgent and most probably you will be able to get the metrics by connecting PerfMon Metrics Collector listener to this host:port combination.

More information: How to Monitor Your Server Health & Performance During a JMeter Load Test

Upvotes: 0

Related Questions