LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-02-2004, 07:19 PM   #1
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Rep: Reputation: 30
apache failing to start for strange reason


hi, i have just installed apache and it wont start for a reason that im not sure about.

when i run httpd -k start i get this error

Code:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:81
no listening sockets available, shutting down
Unable to open logs
does anyone know why it would have this error ?

thanks in advance
 
Old 10-02-2004, 07:37 PM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
the socket is occupied by another process. there is another program listening on port 81.

netstat -an | grep :81
to see if it is used.

sl mritch.
 
Old 10-02-2004, 07:39 PM   #3
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
u will have to edit the httpd.conf file to bind to the ip-address of ur computer .. or u could make it bind to 127.0.0.1 [loopback address] for testing...
 
Old 10-02-2004, 07:45 PM   #4
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
nothing worked
Code:
root@myroom ben # netstat -an | grep :81
root@myroom ben # httpd -k start
(98)Address already in use: make_sock: could not bind to address 192.168.0.160:81
no listening sockets available, shutting down
Unable to open logs
 
Old 10-02-2004, 07:59 PM   #5
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
first do ps aux | grep httpd
if one is running kill it ("kill <process-id>" / see man kill)

try to connect to your pc with a browser. "http://your_ip_address:81".
if it fails and there really is no prog listening on port 81 there's something messed up. reboot your pc and try again. then try to start your httpd.
if this doesn't work (same error) use another port the way Usual mentioned.
port 81 usually isn't used by a program, but you may have configured something to use this port, so another process won't be able to use it too.

sl mritch.

Last edited by mritch; 10-02-2004 at 08:01 PM.
 
Old 10-02-2004, 08:05 PM   #6
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
the only reason im using port 81 is so it is still accessable from outside my network because i have a server and amongst other things its running a webserver.

Code:
ben@myroom ben $ ps aux | grep httpd
ben      22832  0.0  0.0  1436  452 pts/2    S+   02:03   0:00 grep httpd
which is the process id ?
 
Old 10-02-2004, 08:27 PM   #7
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
this is your grep call.

btw. havn't you something in /etc/init.d/.. or somewhere in /etc to start/stop/restart/reload services you're running in bsd? i think there should be.

sl mritch.

Last edited by mritch; 10-02-2004 at 08:32 PM.
 
Old 10-02-2004, 08:34 PM   #8
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
ok the problems im having are on gentoo not Fbsd. my server runs fine, it has a web server running on port 80 and that is my main webserver. the problems are on gentoo which i have set apache to run on port 81 as port 80 is already forwarded to my server and i want a web-server on my box to have simple php-stats page etc.
 
Old 10-02-2004, 08:42 PM   #9
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
it wont let me kill it. i just did the "ps aux | grep httpd" repeatdly and the id changes every time.

Code:
root@myroom ben # ps aux | grep httpd
root     23245  0.0  0.0  1432  456 pts/2    S+   02:41   0:00 grep httpd
root@myroom ben # ps aux | grep httpd
root     23259  0.0  0.0  1436  460 pts/2    S+   02:41   0:00 grep httpd
root@myroom ben # ps aux | grep httpd
root     23273  0.0  0.0  1436  460 pts/2    S+   02:41   0:00 grep httpd
root@myroom ben #
connection was refused when trying http://localhost:81 though
 
Old 10-02-2004, 08:54 PM   #10
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
have a closer look at the output. it's your own "grep httpd" call.

is the server on port 80 working?

try another port in your httpd.conf.php. start it to use the right config file.

sl mritch.
 
Old 10-02-2004, 08:56 PM   #11
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
what my freeBSD webserver ? yes it is (it is a whole different system btw not a second web-server on one machine)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NForce sound failing in a strange way MrMorden Linux - Hardware 1 03-03-2005 02:09 AM
Help USB keyboard failing for no reason tested&WORKING carl0ski Linux - Hardware 2 12-07-2004 05:42 AM
"execute will not start for security reason" - how to start then!? ungua SUSE / openSUSE 2 11-26-2004 05:59 AM
Squid Failing to Start WarlockofVirgo Linux - Networking 2 09-03-2004 03:59 AM
X failing to start... Tayl Linux - Newbie 5 07-19-2002 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:33 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