http not starting up, nothing on port 80

admin0

Verified User
Joined
Nov 14, 2008
Messages
23
Hi,

I followed this and update apache/php
http://files.directadmin.com/services/custombuild/1.1/

After that, apache does not start anymore.

[root@web ~]# netstat -plan | grep :80

[root@web ~]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Tue Jun 22 15:57:09 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 15:57:09 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[ OK ]

[root@web ~]# netstat -plan | grep :80

[root@web ~]# /etc/init.d/httpd stop
Stopping httpd: [FAILED]

[root@web ~]# netstat -plan | grep :80

[root@web ~]# /etc/init.d/httpd start
Starting httpd: [Tue Jun 22 15:57:31 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 15:57:31 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[ OK ]
[root@web ~]# netstat -plan | grep :80

[root@web ~]#




There is nothing occupying port:80 :confused: at all, and the logs just show what it is showing there.. that it could not bind to address [::]:80 [is it ipv6 ?]

[root@web ~]# httpd
[Tue Jun 22 15:58:54 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 15:58:54 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[root@web ~]#



Please suggest.
 
Not sure if this info helps:

(gdb) run
Starting program: /usr/sbin/httpd
[Thread debugging using libthread_db enabled]
[New Thread 46986329156032 (LWP 4806)]
[Tue Jun 22 16:30:10 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 16:30:10 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[Detaching after fork from child process 4812. (Try `set detach-on-fork off'.)]

Program exited normally.
(gdb)



(gdb) set detach-on-fork off
(gdb) run
Starting program: /usr/sbin/httpd
[Thread debugging using libthread_db enabled]
[New Thread 47014538840512 (LWP 6244)]
[Tue Jun 22 16:41:21 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 16:41:21 2010] [warn] NameVirtualHost 116.12.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80

Program exited normally.
[Switching to process 6247] (gdb)
 
Last edited:
If nothing is on port 80 then maybe it cannot find the hostname.

Check that localhost line is in /etc/hosts

Check what the servername value is set to in the apache config.
 
Well then something is bound to the port.

You better go through all your settings in apache to make sure all your listen values are correct. Make sure your server supports ipv6 if you have ipv6 setup to listen.
 
Hi,

I don't see anything out of the ordinary on the listen values.

[root@web conf]# pwd
/etc/httpd/conf

[root@web conf]# grep Listen *
httpd.conf:Listen 80

[root@web conf]#

[root@web conf]# grep Listen */*
extra/httpd-ssl.conf:Listen 443

[root@web conf]#

grep 80 |443 * returns the same lines above.
 
Hi,

/usr/local/directadmin/data/users/*/httpd.conf also has the right values.

All was fine before I ran the upgrade script.

Isn't there a way to run httpd in very high debug mode, in foreground so that it could print the exact error ?
 
/usr/sbin/httpd -h

Then you can see what flags you can use.
 
So far I can see the port 443 is in-use not 80.
Try to do: lsof -ni tcp:443 or netstat -plan | grep :443

Then kill the process listed in PID, and start HTTPd again.
 
Hi,

I followed this and update apache/php
http://files.directadmin.com/services/custombuild/1.1/

After that, apache does not start anymore.

[root@web ~]# netstat -plan | grep :80

[root@web ~]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Tue Jun 22 15:57:09 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 15:57:09 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[ OK ]

[root@web ~]# netstat -plan | grep :80

[root@web ~]# /etc/init.d/httpd stop
Stopping httpd: [FAILED]

[root@web ~]# netstat -plan | grep :80

[root@web ~]# /etc/init.d/httpd start
Starting httpd: [Tue Jun 22 15:57:31 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 15:57:31 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[ OK ]
[root@web ~]# netstat -plan | grep :80

[root@web ~]#




There is nothing occupying port:80 :confused: at all, and the logs just show what it is showing there.. that it could not bind to address [::]:80 [is it ipv6 ?]

[root@web ~]# httpd
[Tue Jun 22 15:58:54 2010] [warn] module php5_module is already loaded, skipping
[Tue Jun 22 15:58:54 2010] [warn] NameVirtualHost xxx.xx.159.247:443 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
[root@web ~]#



Please suggest.
Code:
service exim stop && killall /usr/sbin/exim && service httpd start && service exim start
 
I ran a strace and the log was:


24294 close(29) = 0
24294 close(28) = 0
24294 close(27) = 0
24294 close(26) = 0
24294 close(25) = 0
24294 close(24) = 0
24294 close(23) = 0
24294 close(22) = 0
24294 close(21) = 0
24294 close(20) = 0
24294 close(19) = 0
24294 close(18) = 0
24294 close(17) = 0
24294 close(16) = 0
24294 close(15) = 0
24294 close(14) = 0
24294 close(13) = 0
24294 close(12) = 0
24294 close(11) = 0
24294 close(10) = 0
24294 setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [0], 4) = -1 EINVAL (Invalid argument)
24294 gettimeofday({1277258901, 271525}, NULL) = 0
24294 write(2, "[Wed Jun 23 10:08:21 2010] [crit] (22)Invalid argument: make_sock: for address [::]:80, apr_socket_opt_set: (IPV6_V6ONLY)\n", 122) = 122
24294 close(3) = 0
24294 setsockopt(7, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
24294 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
24294 setsockopt(7, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
24294 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
24294 bind(7, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
24294 listen(7, 511) = 0
24294 setsockopt(8, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
24294 setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
24294 setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0
24294 bind(8, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
24294 write(2, "(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80\n", 76) = 76
24294 close(8) = 0
24294 write(2, "no listening sockets available, shutting down\n", 46) = 46
24294 write(2, "Unable to open logs\n", 20) = 20
24294 select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
24294 munmap(0x2b6eff754000, 11657216) = 0
24294 munmap(0x2b6f00272000, 2276328) = 0
24294 munmap(0x2b6f0049e000, 2295648) = 0
24294 munmap(0x2b6f006cf000, 2631384) = 0
24294 munmap(0x2b6f00952000, 2341616) = 0
24294 munmap(0x36b2400000, 2194096) = 0
24294 munmap(0x2b6f00ba0000, 2414024) = 0
24294 munmap(0x2b6f00dee000, 3414072) = 0
24294 munmap(0x2b6f01130000, 2297584) = 0
24294 munmap(0x36b5000000, 2333872) = 0
24294 munmap(0x36b6000000, 2152168) = 0
24294 munmap(0x36c2a00000, 2198576) = 0
24294 close(9) = 0
24294 close(7) = 0
24294 close(32) = 0
24294 close(6) = 0
24294 close(5) = 0
24294 close(4) = 0
24294 brk(0xfe12000) = 0xfe12000
24294 exit_group(1) = ?





The error was solved after I commented the Listen 80 line in the httpd.conf
That was just what is required.
If I uncomment the Listen 80 , it will start to give the same errors again.

If anyone faces such issue again, try to comment the Listen 80 in the httpd.conf.

Thank you everyone.
 
I ran a strace and the log was:


24294 close(29) = 0
24294 close(28) = 0
24294 close(27) = 0
24294 close(26) = 0
24294 close(25) = 0
24294 close(24) = 0
24294 close(23) = 0
24294 close(22) = 0
24294 close(21) = 0
24294 close(20) = 0
24294 close(19) = 0
24294 close(18) = 0
24294 close(17) = 0
24294 close(16) = 0
24294 close(15) = 0
24294 close(14) = 0
24294 close(13) = 0
24294 close(12) = 0
24294 close(11) = 0
24294 close(10) = 0
24294 setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [0], 4) = -1 EINVAL (Invalid argument)
24294 gettimeofday({1277258901, 271525}, NULL) = 0
24294 write(2, "[Wed Jun 23 10:08:21 2010] [crit] (22)Invalid argument: make_sock: for address [::]:80, apr_socket_opt_set: (IPV6_V6ONLY)\n", 122) = 122
24294 close(3) = 0
24294 setsockopt(7, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
24294 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
24294 setsockopt(7, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
24294 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
24294 bind(7, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
24294 listen(7, 511) = 0
24294 setsockopt(8, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
24294 setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
24294 setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0
24294 bind(8, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
24294 write(2, "(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80\n", 76) = 76
24294 close(8) = 0
24294 write(2, "no listening sockets available, shutting down\n", 46) = 46
24294 write(2, "Unable to open logs\n", 20) = 20
24294 select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
24294 munmap(0x2b6eff754000, 11657216) = 0
24294 munmap(0x2b6f00272000, 2276328) = 0
24294 munmap(0x2b6f0049e000, 2295648) = 0
24294 munmap(0x2b6f006cf000, 2631384) = 0
24294 munmap(0x2b6f00952000, 2341616) = 0
24294 munmap(0x36b2400000, 2194096) = 0
24294 munmap(0x2b6f00ba0000, 2414024) = 0
24294 munmap(0x2b6f00dee000, 3414072) = 0
24294 munmap(0x2b6f01130000, 2297584) = 0
24294 munmap(0x36b5000000, 2333872) = 0
24294 munmap(0x36b6000000, 2152168) = 0
24294 munmap(0x36c2a00000, 2198576) = 0
24294 close(9) = 0
24294 close(7) = 0
24294 close(32) = 0
24294 close(6) = 0
24294 close(5) = 0
24294 close(4) = 0
24294 brk(0xfe12000) = 0xfe12000
24294 exit_group(1) = ?





The error was solved after I commented the Listen 80 line in the httpd.conf
That was just what is required.
If I uncomment the Listen 80 , it will start to give the same errors again.

If anyone faces such issue again, try to comment the Listen 80 in the httpd.conf.

Thank you everyone.
Not using Apache for more than a year.
 
The error was solved after I commented the Listen 80 line in the httpd.conf
That was just what is required.
If I uncomment the Listen 80 , it will start to give the same errors again.

If anyone faces such issue again, try to comment the Listen 80 in the httpd.conf.
What am I missing? Are you using something besides apache to serve websites? If apache isn't listening on port 80 it can't serve sites.

Jeff
 
Back
Top