Solved

getting apache error when restarting the service (98)Address already in use:

Posted on 2008-10-03
15
524 Views
Last Modified: 2010-04-21
The only way I seem to be able to correct this is by restarting the server.
I can restart Apache only right after the restart of the server. But it seems to happen after a little bit of time..
I am so confused as to who it is doing this...

Thank you for your help.
-J
0
Comment
Question by:jbrashear72
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
15 Comments
 
LVL 9

Expert Comment

by:khaledf
ID: 22637361
can you please paste the complete error message?
0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22637397
That was the complete error I got when I did httpd restart
0
 
LVL 9

Expert Comment

by:khaledf
ID: 22637540
can you restart apache again and make sure if there is any missing part of the error message
what changes have you made recently to apache httpd.conf?
can you provide the follwoing info.?
operating system, version.
number of domains hosted. ie: 1 or more
is your website popular? heavy traffic?
hope this will be sufficient to anser
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
LVL 9

Expert Comment

by:khaledf
ID: 22637559
and version of your apache server.
0
 
LVL 9

Expert Comment

by:khaledf
ID: 22637617
if you can't see the complete error message then check it in the error log. it should be there.
0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22637698
I can't see the error in the logs...
Apache/2.2.3 (CentOS)
User/Group       apache(48)/48
Max Requests       Per Child: 4000 - Keep Alive: off - Max Per Connection: 100
Timeouts       Connection: 120 - Keep-Alive: 15
Virtual Server       Yes

Multiple vhosts.

System       Linux server.XXXXXXXX.com 2.6.18-53.1.21.el5 #1 SMP Tue May 20 09:35:07 EDT 2008 x86_64
Build Date       Sep 20 2007 10:05:56

'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'


0
 
LVL 9

Expert Comment

by:khaledf
ID: 22637730
execute this command to see the error log
cat /var/log/httpd/error_log
0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22637761
Its full of crap like this:
[Wed Oct 01 21:15:20 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:20 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:20 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:21 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:21 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:21 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:22 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sqlweb
[Wed Oct 01 21:15:22 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:22 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/tools
[Wed Oct 01 21:15:23 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/admin
[Wed Oct 01 21:15:23 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/phpmyadmin2
[Wed Oct 01 21:15:23 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/phpMyAdmin2
[Wed Oct 01 21:15:24 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/PHPmyadmin
[Wed Oct 01 21:15:24 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/pma
[Wed Oct 01 21:15:24 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/PMA
[Wed Oct 01 21:15:24 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:25 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:25 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:25 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Wed Oct 01 21:15:26 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sqlmanager
[Wed Oct 01 21:15:26 2008] [error] [client 87.9.222.112] File does not exist: /var/www/html/sql
[Thu Oct 02 23:01:37 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:01:52 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:01:55 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:02:27 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:02:58 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:03:00 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:03:21 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:03:37 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Thu Oct 02 23:03:37 2008] [error] [client 221.192.199.36] script '/var/www/html/azenv.php' not found or unable to stat
[Fri Oct 03 10:03:12 2008] [notice] caught SIGTERM, shutting down
[Fri Oct 03 11:18:46 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 03 11:18:46 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 03 11:18:46 2008] [notice] Digest: done
[Fri Oct 03 11:18:47 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Oct 03 11:18:47 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Oct 03 14:52:07 2008] [notice] caught SIGTERM, shutting down
[Fri Oct 03 14:52:08 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 03 14:52:08 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 03 14:52:08 2008] [notice] Digest: done
[Fri Oct 03 14:52:08 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Oct 03 14:52:09 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Oct 03 14:52:11 2008] [notice] caught SIGTERM, shutting down
[Fri Oct 03 14:52:11 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 03 14:52:11 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 03 14:52:11 2008] [notice] Digest: done
[Fri Oct 03 14:52:11 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Oct 03 14:52:11 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Oct 03 14:54:06 2008] [notice] caught SIGTERM, shutting down
[Fri Oct 03 14:54:06 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 03 14:54:07 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 03 14:54:07 2008] [notice] Digest: done
[Fri Oct 03 14:54:07 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Oct 03 14:54:07 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Oct 03 15:19:54 2008] [notice] caught SIGTERM, shutting down
[Fri Oct 03 15:19:54 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 03 15:19:54 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 03 15:19:54 2008] [notice] Digest: done
[Fri Oct 03 15:19:54 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Oct 03 15:19:54 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Fri Oct 03 15:26:42 2008] [notice] caught SIGTERM, shutting down
[Fri Oct 03 15:26:42 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 03 15:26:42 2008] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 03 15:26:42 2008] [notice] Digest: done
[Fri Oct 03 15:26:42 2008] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Oct 03 15:26:43 2008] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[root@server log]#      


But as you can see from the 1st to now it doesnt show that error.. But I got it today.

0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22637771
right now since the reboot I can restart the service...
But later tonight or tomorrow I will not be able to. I will get that message.
0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22637780
But this is the exact error that prints to screen:

 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22637848
apt-cache policy httpd
httpd:
  Installed: 2.2.3-11.el5_1.centos.3
  Candidate: 2.2.3-11.el5_1.centos.3
  Version Table:
 *** 2.2.3-11.el5_1.centos.3 0
        100 RPM Database


netstat -lnp | grep :::80
tcp        0      0 :::80                       :::*                        LISTEN      22411/httpd  
0
 
LVL 9

Expert Comment

by:khaledf
ID: 22637880
I see, this indicates that apache is not shutting down completely before starting again

0
 
LVL 9

Accepted Solution

by:
khaledf earned 500 total points
ID: 22638072
when you try to restart apache next time and get the same error
try to execute the command

netstat -lnp | grep '0.0.0.0:80'

and then kill that process id
example:
kill -9 22411
try to restart apache and see if it restarts successfully

0
 
LVL 3

Author Comment

by:jbrashear72
ID: 22638291
OK I will try that later tonight or in the morning to give it time to fail..
0
 
LVL 3

Author Closing Comment

by:jbrashear72
ID: 31502824
That helped to locate the issue.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question