Unix/Linux Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Error when starting apache

HP-UX


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 09-04-2016
anaigini45 anaigini45 is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 28 June 2017, 12:16 AM EDT
Posts: 73
Thanks: 1
Thanked 0 Times in 0 Posts
Error when starting apache

Due to an activity scheduled on the server, I had stop the apache process and then restart when the activity completed. The activity started at 9am and ended around 9 pm.
To list the apache processes that were running on the server before I stopped it, I used ps -ef | grep apache, and these were the processes listed :


Code:
/opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
/opt/hpws/apache/bin/httpd -k start -DSSL -f /opt/hpsmh/conf/smhpd.conf

I stopped the processes by replacing 'start' with 'stop' in the commands above.
These processes were stopped.

However, when I attempted to restart the process later on, I received error :


Code:
(226)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs

I googled for solution, and they have suggested locating duplicate apache listening to port 80. I ran this command, and the output listed below that :


Code:
# find / -type f -name *apache*
/etc/rc.config.d/hpws_apacheconf
/tmp/nickel.L28dre01/rc.config.d/hpws_apacheconf
/opt/hpws/apache/LICENSES/apache.manual.LICENSE
/opt/hpws/apache/hpws_docs/apache.admin.guide
/opt/hpws/apache/hpws_docs/apache.release.notes
/opt/hpws/apache/man/man8/apachectl.8
/opt/hpws/apache/newconfig/etc/rc.config.d/hpws_apacheconf
/opt/hpws/apache/newconfig/opt/hpws/apache/bin/apachectl
/opt/hpws/apache/old/opt/hpws/apache/newconfig/etc/rc.config.d/hpws_apacheconf
/opt/hpws/apache/old/opt/hpws/apache/newconfig/opt/hpws/apache/bin/apachectl
/opt/hpws/apache/bin/apachectl
/opt/hpws/apache/bin/apache
/opt/hpws/apache/webproxy/bin/apachectl.wp
/opt/hpws/webmin/hpapache/apache-lib.pl
/sbin/init.d/hpws_apache

How do locate any duplicate apache entries listening on port 80?
Any other ways to resolve this problem?
Sponsored Links
    #2  
Old Unix and Linux 09-04-2016
RavinderSingh13 RavinderSingh13 is online now Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 28 June 2017, 8:18 AM EDT
Location: Chennai
Posts: 2,513
Thanks: 557
Thanked 1,188 Times in 1,069 Posts
Hello anaigini45,

Quote:
(226)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Above tell us there is some process which is definetly running on port 80 and occupying it. On first place you should check if there is any process or not. Also plese make sure there are no older processes related to apache is running already.

You could check by doing following which process is running or not on port 80 by following command(Not tested though).

Code:
netstat -nlp | grep :80
OR
lsof -i ":80" | grep "LISTEN"

Check also apache process is running or not by doing:

Code:
ps -ef | grep -v grep | grep apache

Last but not the least please check error.logs for apache and let us know if you see some specific errors there too.
I hope this helps.

Thanks,
R. Singh

Last edited by RavinderSingh13; 09-04-2016 at 12:14 PM..
Sponsored Links
    #3  
Old Unix and Linux 09-04-2016
MadeInGermany MadeInGermany is online now Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 28 June 2017, 8:25 AM EDT
Location: Simplicity
Posts: 3,584
Thanks: 282
Thanked 1,191 Times in 1,077 Posts
I doubt that HP-UX netstat has p and l options. But the following should work

Code:
netstat -n | grep -w 80

Also it might follow an old RFC and keep the port open for 10 minutes after a service stop.
The Following User Says Thank You to MadeInGermany For This Useful Post:
RavinderSingh13 (09-04-2016)
    #4  
Old Unix and Linux 09-04-2016
anaigini45 anaigini45 is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 28 June 2017, 12:16 AM EDT
Posts: 73
Thanks: 1
Thanked 0 Times in 0 Posts
lsof provides this output :


Code:
# /usr/local/bin/lsof -i ":80" | grep "LISTEN"
top     13106  www    3u  IPv6 0xe00000038137cac0      0t0  TCP *:http (LISTEN)
top     13179  www    3u  IPv6 0xe00000038137cac0      0t0  TCP *:http (LISTEN)
#

netstat provides this output :


Code:
# netstat -n | grep -w 80
tcp        0      0  10.61.1.121.80         192.168.11.41.15379     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.20437     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15260     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52677     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.28178     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.29.19.52765     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.32385     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.53631     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58821     ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.29779     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.1139      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26145     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.39307     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52984     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17701     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.18276     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19250     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55205     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55023     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55223     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.41927     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.1585      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48341     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.3975      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.5131      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48492     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55608     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37757     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55392     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.39411     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40343     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.60208     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34374     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.13250     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34282     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34326     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40915     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52613     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22009     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.38335     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19741     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.20664     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40784     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36310     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.38.135.50706    CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.20467     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.38.135.50468    CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26706     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48730     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17070     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.59711     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.57807     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.49527     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.35323     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.62922     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.42475     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.63082     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.2499      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40554     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.63161     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.65441     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.43394     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.65437     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.59469     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.62198     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.62402     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15476     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19536     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15394     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.53409     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.54672     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15670     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.54808     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52930     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48392     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52437     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37194     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37922     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.63.13.58848     ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.37163     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52543     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22854     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17340     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17164     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17203     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.57065     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37603     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37581     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37544     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34038     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.33650     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.33958     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52044     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15261     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15367     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.27338     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48018     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.46531     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.59247     ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.59609     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.12383     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.38.135.50456    CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17456     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.29.19.52768     ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.12308     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.57223     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19631     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40162     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.63253     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.63411     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.63597     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.16791     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19851     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.29.19.52764     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55941     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.28796     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55433     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.53802     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52404     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.3801      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.3332      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.4360      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.42679     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37366     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.13147     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.13019     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48803     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.14510     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17001     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17053     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17159     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34804     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55345     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.88.56.55904     ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.34668     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17655     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.14908     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.10660     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.54339     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48287     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17465     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.61831     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55131     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48629     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34972     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17410     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.64829     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22823     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.53006     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.24551     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40972     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.24875     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.41373     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.1114      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.6718      ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.64096     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.64313     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37605     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.35729     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37604     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37693     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58803     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.51912     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.31674     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.13464     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.29510     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.47272     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48739     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.31298     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19708     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.27417     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26896     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.28213     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.53588     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.35898     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17800     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15926     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.39106     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.15866     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.30983     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.44072     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37104     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37091     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.45966     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.46704     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37166     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.62699     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.11276     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.56826     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.48396     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58720     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.38.135.64298    CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58912     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.62559     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.32979     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.62608     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.20141     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19847     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.19764     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.61921     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.60425     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.61001     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.16838     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.16894     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.16827     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.16643     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.16661     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36374     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37363     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37462     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37526     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26014     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22885     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.25710     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22715     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.25738     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22277     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.5649      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36854     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58124     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36920     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36925     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17127     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.29365     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.49091     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52063     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.12518     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.12912     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.13320     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.34433     CLOSE_WAIT
tcp        0      0  127.0.0.1.80           127.0.0.1.50177         ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.29.19.52769     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.38.135.50476    CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.17431     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.38.135.50563    CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55475     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55750     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.55806     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58441     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.40487     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.51225     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.25950     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.22444     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.7024      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.52833     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.20325     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.5144      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.20146     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.6814      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26047     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.23231     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26086     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.26157     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.23087     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.23025     CLOSE_WAIT
tcp        0      0  127.0.0.1.50177        127.0.0.1.80            ESTABLISHED
tcp        0      0  10.61.1.121.80         192.168.11.41.28793     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.61069     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36277     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.11898     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.8030      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36132     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.9910      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36207     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.64955     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.64341     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.63273     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.58940     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.57689     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.56153     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.25527     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.25204     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.25508     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.7029      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.51442     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.9175      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.53487     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.13740     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.6749      CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36726     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36398     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.36632     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.56069     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37359     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37317     CLOSE_WAIT
tcp        0      0  10.61.1.121.80         192.168.11.41.37274     CLOSE_WAIT
#

Killing the processes from the lsof output seems easy.
However, how do I remove/kill all the "CLOSE_WAIT" and "ESTABLISHED" status of port 80 from the netstat output? (Since there is so many listed).

Is killing the process the option in the first place?
Sponsored Links
    #5  
Old Unix and Linux 09-04-2016
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 28 June 2017, 7:04 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,451
Thanks: 100
Thanked 1,510 Times in 1,120 Posts
I am by no means an HP-UX expert, so please take my explanations cum grano salis.

First: stopping/starting/monitoring the apache process: On all systems i used Apache on (various Linuxes, AIX, Solaris) Apache was started and stopped by the apachectl command. I would be astonished if this is not the case on HP-UX.

Also, the processes are usually not named "apache" but "httpd". Might it be possible that you haven't stopped the (real) Apache-processes at all and this is why all the sockets are in use?

Quote:
Originally Posted by anaigini45 View Post
Killing the processes from the lsof output seems easy.
However, how do I remove/kill all the "CLOSE_WAIT" and "ESTABLISHED" status of port 80 from the netstat output? (Since there is so many listed).

Is killing the process the option in the first place?
A process uses a socket to create a connection. Once this connection is up and running, it appears in the netstat-list in the status "ESTABLISHED". When this connection is decomissioned again, it goes into the status "fin_wait" (actually there are FIN_WAIT_1 and FIN_WAIT_2 because this is a 4-way handshake process) and the socket is freed up after a certain time. This time can be configured (usually in units of half-seconds) in some kernel-tuning parameter. I don't know how to do that in HP-UX but with this information you should find it by searching the documentation.

CLOSE_WAIT is similar to FIN_WAIT in that the connection is in the process of closing. It means that the local host has received a termination request and has already acknowledged it. If you want to know more details about TCP/IP i suggest W. Richard Stevens excellent book "TCP/IP Illustrated" (3 volumes) - what is not in there isn't worth knowing.

After this little theory excursion: you can kill the processes, but do it by sending SIGTERM (kill -15) instead of the all-too-common SIGKILL (kill -9)! The difference is that SIGTERM tells a process to end, so it can clean up what it has allocated (that includes closing open connections hence freeing the sockets). SIGKILL will kill the process immediately and all this cleanup work will not be done at all.

I hope this helps.

bakunin
The Following User Says Thank You to bakunin For This Useful Post:
RavinderSingh13 (09-05-2016)
Sponsored Links
    #6  
Old Unix and Linux 09-05-2016
anaigini45 anaigini45 is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 28 June 2017, 12:16 AM EDT
Posts: 73
Thanks: 1
Thanked 0 Times in 0 Posts
Hi,

I tried killing one of the processes listed from the netstat command like this :


Code:
# kill -15 37274
kill: 37274: The specified process does not exist.
#

The error is as shown.

How else can I clear all these hogging processes?
Also are these processes the cause of port 80 being blocked? Clearing them will resolve this problem and allow me to start apache without any problem?
Sponsored Links
    #7  
Old Unix and Linux 09-05-2016
RudiC RudiC is online now Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 28 June 2017, 8:06 AM EDT
Location: Aachen, Germany
Posts: 10,972
Thanks: 280
Thanked 3,373 Times in 3,106 Posts
Where did you get that number (37274) from?
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Error while starting Apache after compiling PHP and Curl sunnysthakur Red Hat 1 12-03-2013 09:47 AM
Starting an Apache Server bssandeshbs UNIX for Advanced & Expert Users 4 11-21-2009 01:00 PM
Problems starting Apache 2.0.54 mojoman Web Programming 1 01-14-2009 08:49 PM
Error about SSLProtocol when starting Apache moe2266 UNIX for Dummies Questions & Answers 3 11-03-2007 03:25 AM
Starting Apache cstovall UNIX for Dummies Questions & Answers 4 12-04-2002 09:18 AM



All times are GMT -4. The time now is 08:26 AM.