Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-03
15
Medium Priority
?
535 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
  • 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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 1500 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

926 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