LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-06-2012, 10:59 AM   #1
ocupado
LQ Newbie
 
Registered: Apr 2012
Posts: 9

Rep: Reputation: Disabled
Ubaled to start apache. no listening sockets available, shutting down Unable to open


I´m new in Linux & need some help to restart apache.

I stoped apache usind command # /etc/init.d/apache2 stop
and apache stopped well.

The problem is when i try to start o restart apache we have the following messages:

command:~# /etc/init.d/apache2 restart

Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 10.70.220.1 for ServerName
httpd (no pid file) not running
apache2: Could not reliably determine the server's fully qualified domain name, using 10.70.220.1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


If i take a look for another process using the port 80:

#lsof -i :80

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sh 1784 root 3u IPv6 27593263 TCP *:www (LISTEN)


Version od apache used in this server.
APACHE VERSION #:
================

apache2ctl -V
Server version: Apache/2.2.3
Server built: Sep 8 2008 09:03:05
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

More Info:
=========

Command httpd is unabled. I dont know where is it in order to try stop this service/process.

Any help?

ocupado

Last edited by ocupado; 04-06-2012 at 11:02 AM. Reason: aditional info
 
Old 04-06-2012, 11:18 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It is showing someone has a shell session open listing on port 80:

Quote:
lsof -i :80

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sh 1784 root 3u IPv6 27593263 TCP *:www (LISTEN)
Since web service by default listen on port 80 it can't open it.

Type "ps -ef |grep 1784" and see what it is. If it shows you a tty/pty (e.g. tty1, pts/6) you can run ps -ft on that tty/pty to see what else is running there. My guess is someone was doing a test to see if they could make port 80 work and forgot to ctrl-c out after they did it. You can use "kill 1784" to stop process 1784 (or kill -1 and finally kill -9) on the PID if the basic kill doesn't work but should check to make sure it wasn't something important first.
 
Old 04-06-2012, 11:33 AM   #3
ocupado
LQ Newbie
 
Registered: Apr 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hello MensaWater:

Thanks for yours response.

Regarding to you recommendation.

ps -ef |grep 1784
root 1784 1 0 Feb18 ? 00:00:00 sh -i
root 22556 22551 0 13:06 pts/0 00:00:00 grep 1784

Command: kill -9 1784 dont do anything.
 
Old 04-06-2012, 12:34 PM   #4
ocupado
LQ Newbie
 
Registered: Apr 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
MensaWater:

After kill 1 i try kill 9, then i restart the server and everything is ok.

Thanks,
 
Old 04-06-2012, 01:44 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
No problem. Please go to thread tools and mark this as Solved. It helps others with similar issues find solutions more quickly in web searches.

Also when people help you might consider click "yes" on the question about whether this was helpful or clicking on the scales to add reputation points.
 
1 members found this post helpful.
  


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
Unable to start apache Alex_Uconomy Linux - Server 5 04-29-2011 08:52 AM
Apache Webserver on Slackware - Failed to Start Apache - 'no listening sockets .." CCTVGuru Linux - Server 4 10-11-2009 01:14 AM
apache2 doesn't start after upgrade to confixx 3.2.1 "no listening sockets available" simon_haas Linux - Server 0 12-26-2006 08:07 AM
Unable to start Apache anjanesh Linux - General 14 01-03-2006 12:23 PM
Can't figure out how to be listening for data all the time with C sockets Eddie101 Programming 2 03-25-2005 10:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:09 AM.

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