?
Solved

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

Posted on 2008-10-03
15
Medium Priority
?
532 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

719 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