Help Center/ Cloud Eye/ FAQs/ Server Monitoring/ What Should I Do If the Service Port Is Used by the Agent?
Updated on 2023-01-30 GMT+08:00

What Should I Do If the Service Port Is Used by the Agent?

Cloud Eye Agent uses HTTP requests to report data. Any port in the range obtained from path /proc/sys/net/ipv4/ip_local_port_range may be occupied. If any service port is used by the Agent, you can modify path /proc/sys/net/ipv4/ip_local_port_range and restart the Agent to solve the problem.

Procedure

  1. Log in an ECS or BMS as user root.
  2. Open the sysctl.conf file:

    vim /etc/sysctl.conf

  3. (Permanent change) Add new ports to the sysctl.conf file:

    net.ipv4.ip_local_port_range=49152 65536

  4. Make the modification take effect:

    sysctl -p /etc/sysctl.conf

    • The permanent change still takes effect after the ECS or BMS is restarted.
    • For temporary modification (which expires after the ECS or BMS is restarted), run # echo 49152 65536 > /proc/sys/net/ipv4/ip_local_port_range.
  5. Run the following command to restart the Agent if the early version of the Agent is used:

    /usr/local/telescope/telescoped restart

    For Windows, in the directory where the Agent installation package is stored, double-click the shutdown.bat script to stop the Agent, and execute the start.bat script to start the Agent.

    If the new version of the Agent is used, run the following command to check the PID of telescope:

    ps -ef |grep telescope

    After the process is forcibly stopped, wait for 3 to 5 minutes for the Agent to automatically restart. Figure 1 shows an operation example.

    kill -9 PID

    Figure 1 Restarting the Agent