When "lsof" Utility Is Not Installed, How To Determine Which Process is Using a TCP Port on Sun Solaris Platforms? (Doc ID 839919.1)

Last updated on OCTOBER 24, 2016

Applies to:

Web Cache - Version 10.1.2.0.2 to 10.1.2.3.0 [Release AS10gR2]
Oracle Fusion Middleware - Version 10.1.2.0.2 to 10.1.3.4.0 [Release AS10gR2 to AS10gR3]
Oracle HTTP Server - Version 10.1.2.0.2 to 10.1.3.4.0 [Release AS10gR2 to AS10gR3]
Oracle Solaris on SPARC (64-bit)
Oracle Application Server 10g Enterprise Edition - Version: 10.1.2.0.2 to 10.1.3.4.0
Sun Solaris SPARC (64-bit)


Goal

It is required to determine which process is listening on specific TCP port but lsof utility was not installed on Sun Solaris Platform and Web Administrator does not have privileges to install it.

This process may be preventing one of Oracle Application Server components from starting, for example, HTTP Server failed to start with the error reported in $ORACLE_HOME/Apache/Apache/logs/error_log:

Address already in use: make_sock: could not bind to address 127.0.0.1 port 7778


This means that another process is listening on port 7778 which is HTTP Server listening port and it will not be able to start until freeing this port.

The command "netstat -an | grep 7778" can be used to verify if the port is in use, but now it is required to know which process is listening on this port.

netstat does not provide the PID of the process using the port, the command pfiles can provide this info using the below script.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms