LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2010, 11:20 AM   #1
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Rep: Reputation: 0
Exclamation httpd no start


root@HOST [~]# /etc/init.d/httpd start
Starting httpd: no listening sockets available, shutting down
Unable to open logs
[FAILED]
--------------------------------------------------------------------
root@HOST [~]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: no listening sockets available, shutting down
Unable to open logs
[FAILED]
--------------------------------------------------------------------
root@HOST [~]# tail -n 10 /var/log/messages
Sep 29 17:59:30 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv4 for mDNS.
Sep 29 17:59:30 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv4 with address 196.219.240.236.
Sep 29 17:59:30 localhost avahi-daemon[2870]: Registering new address record for 196.219.240.236 on wlan0.
Sep 29 17:59:31 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv6 for mDNS.
Sep 29 17:59:31 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::223:cdff:fecb:9c5e.
Sep 29 17:59:31 localhost avahi-daemon[2870]: Registering new address record for fe80::223:cdff:fecb:9c5e on wlan0.
Sep 29 17:59:31 localhost NetworkManager: <info> (wlan0): device state change: 7 -> 8
Sep 29 17:59:31 localhost NetworkManager: <info> Policy set 'Sunsoft1' (wlan0) as default for routing and DNS.
Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) successful, device activated.
Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
---------------------------------------------------
What is the problem I have a local server
CentOS Linux
 
Old 09-29-2010, 11:31 AM   #2
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
root@localhost [~]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
[FAILED]
root@localhost [~]#
 
Old 09-29-2010, 11:37 AM   #3
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166

Rep: Reputation: 10
Check your apache logs file permission. also check whether port 80 or whatever port you configured is using by some other service or not,
 
Old 09-29-2010, 11:38 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

There is another process listening on port 80. You can check with
Code:
netstat -tanpl|grep 80
and kill the offending process(es)

Regards
 
Old 09-29-2010, 12:02 PM   #5
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
thank you

but

root@localhost [~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
[FAILED]
root@localhost [~]#
 
Old 09-29-2010, 12:11 PM   #6
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
I think the problem in

domain name, using 127.0.0.1 for ServerName
 
Old 09-29-2010, 12:19 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I think the problem in

domain name, using 127.0.0.1 for ServerName
You didn't say your distro, but I guess it's Centos as in your profile.
The above message is just a warning.
To eliminate it, check /etc/hosts to what is your fully qualified hostname and then edit /etc/httpd/conf/httpd.conf, look for the ServerName and use the same.

Now post the output of the following commands
Code:
service httpd status
netstat -tanpl|grep 80
 
Old 09-29-2010, 12:30 PM   #8
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
@ bathory

thanks

root@localhost [~]# service httpd status
httpd is stopped


root@localhost [~]# netstat -tanpl|grep 80
tcp 0 0 196.219.240.236:44635 209.85.229.154:80 ESTABLISHED 3386/firefox
tcp 0 0 196.219.240.236:37092 65.54.48.42:80 ESTABLISHED 3386/firefox
tcp 0 0 196.219.240.236:60386 213.144.182.31:80 ESTABLISHED 3386/firefox
tcp 0 0 196.219.240.236:54448 209.85.229.166:80 ESTABLISHED 3386/firefox
tcp 0 0 196.219.240.236:48123 209.85.229.102:80 ESTABLISHED 3386/firefox
tcp 0 0 196.219.240.236:49114 209.85.229.101:80 ESTABLISHED 3386/firefox
root@localhost [~]#
 
Old 09-29-2010, 12:32 PM   #9
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
::1 localhost6.localdomain6 localhost6
196.219.240.283 localhost
196.219.240.263 localhost.localdomain localhost

Last edited by sunsoft; 09-29-2010 at 12:47 PM.
 
Old 09-29-2010, 12:34 PM   #10
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
/etc/httpd/conf/httpd.conf,

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
</IfModule>


<VirtualHost 196.219.240.238>
ServerName localhost.localdomain
DocumentRoot /home
</VirtualHost>
 
Old 09-29-2010, 12:42 PM   #11
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
What is the problem

[QUOTE=sunsoft;4112861]/etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
::1 localhost6.localdomain6 localhost6
196.219.240.283 localhost
196.219.240.263 localhost.localdomain localhost
---------
and

etc/httpd/conf/httpd.conf,

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
</IfModule>


<VirtualHost 196.219.240.238>
ServerName localhost.localdomain
DocumentRoot /home
</VirtualHost>

Last edited by sunsoft; 09-29-2010 at 12:48 PM.
 
Old 09-29-2010, 12:46 PM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I guess 196.219.240.236 is your IP address but you use 196.219.240.238 for the vhost:
Quote:
<VirtualHost 196.219.240.238>
Which one is the correct IP?
Maybe that's why apache cannot start. Fix the IP and try to start it again.
You can also take a look at error_log to see if you find something
 
Old 09-29-2010, 12:52 PM   #13
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
root@localhost [~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
[FAILED]
root@localhost [~]# tail -n 10 /var/log/messages
Sep 29 19:53:32 localhost NetworkManager: <info> Policy set 'Sunsoft1' (wlan0) as default for routing and DNS.
Sep 29 19:53:32 localhost NetworkManager: <info> Activation (wlan0) successful, device activated.
Sep 29 19:53:32 localhost NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
Sep 29 19:53:33 localhost avahi-daemon[2853]: New relevant interface wlan0.IPv6 for mDNS.
Sep 29 19:53:33 localhost avahi-daemon[2853]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::223:cdff:fecb:9c5e.
Sep 29 19:53:33 localhost avahi-daemon[2853]: Registering new address record for fe80::223:cdff:fecb:9c5e on wlan0.
Sep 29 20:12:07 localhost kernel: Removing netfilter NETLINK layer.
Sep 29 20:16:48 localhost nm-system-settings: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...
Sep 29 20:16:48 localhost nm-system-settings: ifcfg-rh: read connection 'System eth0'
Sep 29 20:16:48 localhost nm-system-settings: ifcfg-rh: updating /etc/sysconfig/network-scripts/ifcfg-eth0
root@localhost [~]#
 
Old 09-29-2010, 12:59 PM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Please don't be impatient.
First of all, find your server correct IP. Now we have 3 of them
Quote:
/etc/hosts:
196.219.240.263 localhost.localdomain localhost

/etc/httpd/conf/httpd.conf:
<VirtualHost 196.219.240.238>

netstat -tanpl|grep 80
tcp 0 0 196.219.240.236 ...
Run
Code:
ifconfig
to find the correct IP and use that in /etc/hosts and /etc/httpd/conf/httpd.conf
 
Old 09-29-2010, 01:07 PM   #15
sunsoft
LQ Newbie
 
Registered: Sep 2010
Posts: 25

Original Poster
Rep: Reputation: 0
root@nameserver [~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:1D:30:7F:3D
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:233 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4038 errors:0 dropped:0 overruns:0 frame:0
TX packets:4038 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5106456 (4.8 MiB) TX bytes:5106456 (4.8 MiB)

wlan0 Link encap:Ethernet HWaddr 00:23:CD:CB:9C:5E
inet addr:196.219.240.236 Bcast:196.219.240.239 Mask:255.255.255.248
inet6 addr: fe80::223:cdff:fecb:9c5e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1030 errors:0 dropped:0 overruns:0 frame:0
TX packets:1202 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:488163 (476.7 KiB) TX bytes:273265 (266.8 KiB)

root@nameserver [~]#
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
httpd will not start gotminein89 Linux - Server 3 08-06-2010 12:03 PM
start httpd en vsftpd at start zerocool22 Linux - Server 11 04-25-2008 07:50 AM
httpd won't start jim.thornton Linux - Newbie 2 01-06-2008 02:57 PM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
need help with httpd start MaX-PaYnE Linux - Newbie 6 11-29-2006 11:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration