Solved

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

Posted on 2008-10-03
15
510 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
 
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now