Port in use on Solaris 9

  • Follow


Hello everyone,

I have a litte problem on my V440 running solaris 9.
Everytime I want to restart the apache, I can't, because it
says, that the listening port (80) ist already in use.

Now, I had a look into netstat:
TCP: IPv4
    Local Address        Remote Address    Swind Send-Q Rwind Recv-Q  State
-------------------- -------------------- ----- ------ ----- ------
       *.80                 *.*                0      0 49152      0 LISTEN

So, there is my port 80.
Now I wanted to determine, which application still holds it,
so I tried lsof:
root@ORAHOST-440> lsof | grep LISTEN | grep IPv4
inetd       214     root   22u  IPv4 0x30002f5a1d0         0t0 
TCP *:32771 (LISTEN)
inetd       214     root   23u  IPv4 0x30002f5a050         0t0 
TCP *:32772 (LISTEN)
inetd       214     root   31u  IPv4 0x30002f919d8         0t0 
TCP *:32773 (LISTEN)
inetd       214     root   32u  IPv4 0x30002f91858         0t0 
TCP *:32774 (LISTEN)
inetd       214     root   33u  IPv4 0x30002f916d8         0t0 
TCP *:32775 (LISTEN)
inetd       214     root   34u  IPv4 0x30002f91558         0t0

Here is no port 80 shown.

I hope someone has any suggestions on how to try to solve this problem.

Greetings Markus
0
Reply Markus 6/14/2005 6:34:00 AM

Hi,

Try :
lsof -i:80

@NS


"Markus Boehmer" <boehmerm@gmx.de> a �crit dans le message de
news:d8m19n$it8$1@news.dtag.de...
> Hello everyone,
>
> I have a litte problem on my V440 running solaris 9.
> Everytime I want to restart the apache, I can't, because it
> says, that the listening port (80) ist already in use.
>
> Now, I had a look into netstat:
> TCP: IPv4
>     Local Address        Remote Address    Swind Send-Q Rwind Recv-Q
State
> -------------------- -------------------- ----- ------ ----- ------
>        *.80                 *.*                0      0 49152      0
LISTEN
>
> So, there is my port 80.
> Now I wanted to determine, which application still holds it,
> so I tried lsof:
> root@ORAHOST-440> lsof | grep LISTEN | grep IPv4
> inetd       214     root   22u  IPv4 0x30002f5a1d0         0t0
> TCP *:32771 (LISTEN)
> inetd       214     root   23u  IPv4 0x30002f5a050         0t0
> TCP *:32772 (LISTEN)
> inetd       214     root   31u  IPv4 0x30002f919d8         0t0
> TCP *:32773 (LISTEN)
> inetd       214     root   32u  IPv4 0x30002f91858         0t0
> TCP *:32774 (LISTEN)
> inetd       214     root   33u  IPv4 0x30002f916d8         0t0
> TCP *:32775 (LISTEN)
> inetd       214     root   34u  IPv4 0x30002f91558         0t0
>
> Here is no port 80 shown.
>
> I hope someone has any suggestions on how to try to solve this problem.
>
> Greetings Markus


0
Reply ns 6/14/2005 7:29:20 AM


On 2005-06-14, Markus Boehmer <boehmerm@gmx.de> wrote:
> I have a litte problem on my V440 running solaris 9.
> Everytime I want to restart the apache, I can't, because it
> says, that the listening port (80) ist already in use.
>
> Now, I had a look into netstat:
> TCP: IPv4
>     Local Address        Remote Address    Swind Send-Q Rwind Recv-Q  State
> -------------------- -------------------- ----- ------ ----- ------
>        *.80                 *.*                0      0 49152      0 LISTEN
>
> So, there is my port 80.
> Now I wanted to determine, which application still holds it,
> so I tried lsof:
> root@ORAHOST-440> lsof | grep LISTEN | grep IPv4

This works better using ``lsof -i :80'' (as already pointed out
by another follow-up). Please note that port 80 is not necessarily
in the LISTEN state.

> Here is no port 80 shown.

Please note that port 80 can continue to be unavailable for some
time period even if the web server process is no longer alive for
one of following reasons:

 - Port 80 is in a TIME_WAIT state. This is required to avoid
   packages for the old TCP connection to be delivered to a
   new socket. You can check your current setting by taking a
   look at

      ndd /dev/tcp tcp_time_wait_interval

   (This, however, does not seem to be the case in your scenario
   as netstat reports a LISTEN state).

 - If your webserver does not pass the flag SO_REUSEADDR to
   setsockopt(), the port remains unavailable for some
   time period.

Andreas.
0
Reply comp 6/17/2005 5:55:48 PM

solaris you can use pfiles command to find out whcih process using port
80

you can use this script to find the process id.


cd /proc
for i in [0-9]*
do
        echo $i
        pfiles $i | grep 80
done

Here is my notes on pfiles

http://www.sfgroups.com/support/viewtopic.php?t=31

SR

0
Reply Sun 6/17/2005 7:06:14 PM

3 Replies
1257 Views

(page loaded in 0.066 seconds)

Similiar Articles:













7/19/2012 6:43:44 PM


Reply: