Created 05-11-2018 07:07 AM
/var/log/ambari-agent/ambari-agent.out:
/var/run/ambari-agent/ambari-agent.pid already exists, exiting
it only appears on 1 datanode
Created 05-11-2018 07:37 AM
- Are you running ambari agent as a non root user?
- Can you try removing the file "/var/run/ambari-agent/ambari-agent.pid" and then try starting the agent again? Please check the permission on the PID file.
# ls -l /var/run/ambari-agent/ambari-agent.pid # ls -ld /var/run/ambari-agent # rm -f /var/run/ambari-agent/ambari-agent.pid
- Can you please share following files:
/var/log/ambari-agent/ambari-agent.out /var/log/ambari-agent/ambari-agent.log
Created 05-11-2018 07:37 AM
- Are you running ambari agent as a non root user?
- Can you try removing the file "/var/run/ambari-agent/ambari-agent.pid" and then try starting the agent again? Please check the permission on the PID file.
# ls -l /var/run/ambari-agent/ambari-agent.pid # ls -ld /var/run/ambari-agent # rm -f /var/run/ambari-agent/ambari-agent.pid
- Can you please share following files:
/var/log/ambari-agent/ambari-agent.out /var/log/ambari-agent/ambari-agent.log
Created 05-11-2018 07:51 AM
I'm running it as root user.
[root@datanode4 ~]# ls -ld /var/run/ambari-agent
drwxr-xr-x 2 root root 4096 May 11 15:45 /var/run/ambari-agent
[root@datanode4 ~]# ls -l /var/run/ambari-agent/ambari-agent.pid
-rw-r--r-- 1 root root 5 May 11 15:45 /var/run/ambari-agent/ambari-agent.pid
[root@datanode4 ~]# cat /var/log/ambari-agent/ambari-agent.out
Failed to start ping port listener of: Could not open port 8670 because port already used by another process: UID PID PPID C STIME TTY TIME CMD root 19874 10487 57 15:31 ? 00:00:16 /usr/bin/python /usr/lib/python2
Created 05-11-2018 08:41 AM
Looks like some other process is using port 8670 which is used by Agents hence agent is not able toi startup.
Please find which process is using the port 8670 and then kill it then try the start Agent again.
Ambari Agent uses this port 8670 as Ping Port So that port should be free before we attempt to start the agent.
# netstat -tnlpa | grep 8670<br> # kill -9 $PID_from_above_command # ambari-agent start
.
OR you will need to change the "ping_port" of ambari agent in the following file:
# grep '8670' /etc/ambari-agent/conf/ambari-agent.ini ping_port=8670
Created 05-11-2018 01:17 PM
can I just use any port for ping port as long as it is not used by any application?
Created 05-11-2018 02:19 PM
Netstat show only 1 PID running from 8671
Created 05-11-2018 02:03 PM
I tried to change the port but the error still appears. I change the port to 8671. .
Failed to start ping port listener of: Could not open port 8671 because port already used by another process: