UnixPedia : HPUX / LINUX / SOLARIS: Resolving Port conflict on Unix

Wednesday, December 28, 2016

Resolving Port conflict on Unix

Application port number 50304 been used by Unix dm_TL_adapter, this happen if port are not reserved on the system. Port is taken by dm_TL_adapter and application not be able to start it. To resolve it.

1 - Find what is using the port with lsof command

[root@horses:/sbin/init.d]#
#-> lsof -i :50304
COMMAND    PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
dm_TL_ada 6774 root    3u  IPv4 0xe000000223094ac0      0t0  TCP *:50304 (LISTEN)

2 - try to stop or kill the process or consult expert if not sure about your action.
[root@horses:/sbin/init.d]#
#-> /sbin/init.d/diagnostic stop

[root@horses:/sbin/init.d]#
#-> ps -ef |grep -i 6774
    root  6774     1  0  Dec 17  ?         0:06 /usr/sbin/stm/uut/bin/tools/monitor/dm_TL_adapter
    root 29184 18309  1 04:51:29 pts/4     0:00 grep -i 6774

[root@horses:/sbin/init.d]#
#-> grep -i dm_TL_adapter *

[root@horses:/sbin/init.d]#
#-> kill -9 6774

3 - Re-validate the process and port usage.
[root@horses:/sbin/init.d]#
#-> ps -ef |grep -i 6774
    root  4473 18309  0 04:51:55 pts/4     0:00 grep -i 6774

[root@horses:/sbin/init.d]#
#-> lsof -i :50304

4 - Ask application team to start the application as port is freed.

[root@horses:/sbin/init.d]#
#-> lsof -i :50304

5 - after application start port is taken by application service.
[root@horses:/sbin/init.d]#
#-> lsof -i :50304
COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
jlaunch 12666 tqaadm99u  IPv4 0xe00000023c54a040      0t0  TCP *:50304 (LISTEN)

[root@horses:/sbin/init.d]#

No comments:

Post a Comment