Error when starting apache


 
Thread Tools Search this Thread
Operating Systems HP-UX Error when starting apache
# 1  
Old 09-04-2016
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?
# 2  
Old 09-04-2016
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 01:14 PM..
# 3  
Old 09-04-2016
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.
This User Gave Thanks to MadeInGermany For This Post:
# 4  
Old 09-04-2016
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?
# 5  
Old 09-04-2016
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
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
This User Gave Thanks to bakunin For This Post:
# 6  
Old 09-05-2016
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?
# 7  
Old 09-05-2016
Where did you get that number (37274) from?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

2. Red Hat

Error while starting Apache after compiling PHP and Curl

Hello, I am facing an issue while starting the apache server after compiling php and curl. Below are the versions i am using. php-5.2.17 httpd-2.2.17 curl-7.16.0 CentOS5.5x64 Compiling above packages without curl working very fine but when trying to compile php with curl below error is... (1 Reply)
Discussion started by: sunnysthakur
1 Replies

3. UNIX for Advanced & Expert Users

Starting an Apache Server

Sir, I have installed an Apache server in Fedora 9 (packages) and when i go to etc folder and try the command httpd -k start it says command not found....can any one help me out!!! ---------- Post updated at 12:02 PM ---------- Previous update was at 11:46 AM ---------- When i... (4 Replies)
Discussion started by: bssandeshbs
4 Replies

4. Web Development

Problems starting Apache 2.0.54

Hi, I just installed Apache 2.0.54 and when I try and start httpd I get mohit@mohit-desktop:/sw/pkg/apache/bin$ ./httpd -k start httpd: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (13): make_sock: could not bind to address :80 no listening... (1 Reply)
Discussion started by: mojoman
1 Replies

5. UNIX for Dummies Questions & Answers

Error about SSLProtocol when starting Apache

I just installed Apache 2.2.6 & when trying to start it i got this: Invalid command 'SSLProtocol', perhaps misspelled or defined by a module not included in the server configuration Any help? (3 Replies)
Discussion started by: moe2266
3 Replies

6. Solaris

Problems starting apache 1.3 with mysql

I've been working on a project to replace one of the my group's primary NIS servers. It also runs mysql and apache, as it is the host for the our team's hardware tracking database and website. Its running apache 1.3, and for some odd reason, I can't get apache to start on system boot. The... (1 Reply)
Discussion started by: godspunk32
1 Replies

7. Shell Programming and Scripting

Docbase starting Error

Hi All, I am trying to start the docbase but i am getting the following error-: $ ./dm_start_ncsglorbiprd00 interpreter "/bin/sh" not found file link resolves to "/usr/bin/sh" sh: ./dm_start_ncsglorbiprd00: not found. Can anyone please help me in this regard. Thanks in advance ... (0 Replies)
Discussion started by: Divyac
0 Replies

8. Programming

starting with APR (Apache Portable Runtime)

Hi I am new to APR and I started programming using APR 1.2.2. So please guide me how to start learning it? (0 Replies)
Discussion started by: sumsin
0 Replies

9. UNIX for Dummies Questions & Answers

Starting Apache

I successfully installed Apache, but When I tried to start it I experienced problems. After installing and compiling, I typed the PREFIX "usr/local/ apache/bin/apachect1 start." The output was path not found. After checking the apachect1 file using vi, I found the file empty. There was no... (4 Replies)
Discussion started by: cstovall
4 Replies

10. UNIX for Dummies Questions & Answers

starting Apache on Solaris 8

I am not by any means a UNIX guru if you can't already tell by the question I'm about to ask. How do I launch Apache web server on my SOlaris 8 server without rebooting it? Any help would be much appreciated!!! -Thanks (5 Replies)
Discussion started by: jskillet
5 Replies
Login or Register to Ask a Question