LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-20-2007, 07:49 AM   #16
the_ajp
LQ Newbie
 
Registered: Apr 2007
Location: Groningen
Distribution: Slackware >7 , Ubuntu , Gentoo , Debian
Posts: 20

Rep: Reputation: 0

killall httpd
apachectl sslstart
 
Old 07-30-2007, 12:20 PM   #17
smiams
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
I shut down apache:

-> sudo /etc/init.d/apache2 stop

I could not start apache back up.

-> sudo /etc/init.d/apache2 start
-> error

I had some apache processes running that needed to be shut down:

-> ps aux | grep apache | awk '{print $2}' | sudo xargs kill -9

Then I started apache

-> sudo /etc/init.d/apache2 start
-> success
 
Old 07-30-2007, 12:21 PM   #18
smiams
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
ooops, I accidentally posted the reply 3x. Wish there was a delete button.

Last edited by smiams; 07-30-2007 at 12:24 PM.
 
Old 07-30-2007, 12:23 PM   #19
smiams
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
My solution -> stop apache processes then restart

ooops, I accidentally posted the reply 3x. Wish there was a delete button.
 
Old 07-31-2007, 01:16 PM   #20
divide by zero
LQ Newbie
 
Registered: Jul 2007
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by andrabr
My GUESS is Apache was already grabbing this port via a virtual host in another config file, and a second attempt to hold onto it confues good old Apache to such an extent that it would just totally give up. This could be happening to you ;-)
im having the same problem, however this is not the case. the only directive that tells apache to listen is Listen. having an ip : port in a VirtualHost directive does NOT actually make apache listen on that ip : port.

my problem is similar, only i have 2 listen directives, one for 80 and one for 443. there are no others in any conf file. on top of that, no other process is bound to port 443. this is a real WTF right here.

Last edited by divide by zero; 07-31-2007 at 01:17 PM.
 
Old 09-23-2007, 10:47 AM   #21
attilahooper
LQ Newbie
 
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
Thumbs up

I have FC6 with the apache package and it was blowing up on port 80 'cannot bind' etc. I registered to thank Watski for posting this fix. I see that this was his only post too, good going bro'. thxthxthx

I too was confused as hell cause netstat showed no active processes using 80.

This worked beautifully:

Quote:
Originally Posted by watski View Post
I had this problem too. It turned out that i had the "Listen 80" directive in two config files:

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/system-config-httpd.conf

The latter comes from the Fedora Core system configurator for httpd. Removing "Listen 80" from httpd.conf solved the problem. I tried the above descriptions but I had noone listening on port 80 which got me confused.


Cheers,
Johan
 
Old 10-17-2007, 10:48 PM   #22
optikfiberz
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by pushkarbhatkoti View Post
Why this problem comes:
-------------------------------
this problem is comes only if u started the weberver and than made some modification or tried to load the jsp or asp support than u will find http locked when u tried to restart it .

so don't be confussed. just kill th process and than put ur configuration (original file) which has port 80 or 443.

it will work fine......

else mail me on my personal mail ilel
pushkar_bhatkoti@rediffmail.com
yahooo: pushkarbhatkoti@yahoo.com

My mobile is : 9810774912
I lives in New Delhi India.
cheers!!
pushkarbhatkot: thanks a lot for your post and info about lsof. Here is the shell output I got when performing the task.

Code:
box:/usr/local/apache/conf# lsof -i :80
COMMAND   PID   USER   FD   TYPE   DEVICE SIZE NODE NAME
bash    28009 apache    3u  IPv6 58865005       TCP *:www (LISTEN)
box:/usr/local/apache/conf# kill -9 28009
box:/usr/local/apache/conf# /etc/init.d/apachectl start
box:/usr/local/apache/conf#
So its all working now, thanks to your info about lsof.

The question I have is, why would a bash process be using port 80? Is it a freak of nature for apache to do that every so often or is there something more serious at work here. I just don't want to see it happen again..

Thanks.

- Alex
 
Old 11-14-2007, 02:06 AM   #23
sneghi
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
Re:

hi guys,
I am new here!!!

This is due to two web servers running in the same ports(80/443)..
stop httpd if use apache web server!

It is caused due to port conflicts of the web server's!!
Try assigning different ports to different web server's..
Hope this will help!
 
Old 03-05-2008, 07:10 AM   #24
ste101
LQ Newbie
 
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by watski View Post
I had this problem too. It turned out that i had the "Listen 80" directive in two config files:

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/system-config-httpd.conf

The latter comes from the Fedora Core system configurator for httpd. Removing "Listen 80" from httpd.conf solved the problem. I tried the above descriptions but I had noone listening on port 80 which got me confused.


Cheers,
Johan
I'm running Apache on ubuntu gutsy. I had the same issue, and like watski, it was because Listen 80 was included within multiple config files. commenting it out of httpd.conf solved my issues.

cheers,
Ste.
 
Old 10-02-2008, 08:59 AM   #25
netweblogic
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 1
One working solution

Quote:
Originally Posted by watski View Post
I had this problem too. It turned out that i had the "Listen 80" directive in two config files:

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/system-config-httpd.conf

The latter comes from the Fedora Core system configurator for httpd. Removing "Listen 80" from httpd.conf solved the problem. I tried the above descriptions but I had noone listening on port 80 which got me confused.


Cheers,
Johan
Yep that worked for me too Johan!

It's a shame that instead of seeing your post, I went over each step of the first posts, then figured it out when I changed the httpd.conf file to listen to port 88.
 
Old 01-23-2009, 09:48 AM   #26
javahaxxor
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 1
Quote:
Originally Posted by divide by zero View Post
im having the same problem, however this is not the case. the only directive that tells apache to listen is Listen. having an ip : port in a VirtualHost directive does NOT actually make apache listen on that ip : port.

my problem is similar, only i have 2 listen directives, one for 80 and one for 443. there are no others in any conf file. on top of that, no other process is bound to port 443. this is a real WTF right here.
Check for similar Listen directives in other httpd.conf files (updatedb;locate httpd.conf)
That was my problem, I had to comment out the last two:
Listen soleshop.x.com:80
Listen soleshop.x.com:443
Listen soleshop.x.com:8000
Listen soleshop.x.com:8002
Listen soleshop.x.com:8004
Listen soleshop.x.com:8006
Listen soleshop.x.com:8007
#Listen ebusiness.x.com:80
#Listen ebusiness.x.com:443

I guess that this can be "fixed" by saying:
Listen *:80
Listen *:443
Listen soleshop.x.com:8000
Listen soleshop.x.com:8002
Listen soleshop.x.com:8004
Listen soleshop.x.com:8006
Listen soleshop.x.com:8007
#Listen ebusiness.x.com:80
#Listen ebusiness.x.com:443
 
Old 05-25-2009, 08:33 AM   #27
boogiebogdy
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: CentOS 5.3
Posts: 3

Rep: Reputation: 0
Hey,

I know this topic is a little bit old, but i'll try my chance.
The server was working fine, the load was small, uptime a few weeks, and in a minute every died, only the ping and ssh remained alive.
I have received this error
"(98)Address already in use: make_sock: could not bind to address [::]:443" so i stopped httpd and i have looked to see who was listening on port 443. It was sshd. I really don't have any ideas how that was possible.

I didn't had any choice and i had to reboot the server. Now everything is fine, but i don't want things like this to happend in the future. Any idea somebody?

Last edited by boogiebogdy; 05-25-2009 at 08:35 AM.
 
Old 07-04-2009, 11:57 PM   #28
stryker_oz
LQ Newbie
 
Registered: Mar 2005
Location: Brisvegas, Australia
Distribution: Fedora 15 & 17, Raspbian & openELEC
Posts: 26

Rep: Reputation: 15
Quote:
Originally Posted by watski View Post
I had this problem too. It turned out that i had the "Listen 80" directive in two config files:

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/system-config-httpd.conf

The latter comes from the Fedora Core system configurator for httpd. Removing "Listen 80" from httpd.conf solved the problem. I tried the above descriptions but I had noone listening on port 80 which got me confused.


Cheers,
Johan
Johan, thankyou. Just installed FC11 with apache and this was precisely the issue I had. That was far from an obvious resolution - apache was in fact clashing with itself after all.
 
Old 10-12-2009, 10:58 AM   #29
sreejithedl
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 0
I found the solution here. Its perfect.

<<advertising link removed>>

Last edited by pixellany; 10-13-2009 at 03:47 AM.
 
Old 03-30-2010, 06:36 AM   #30
buffe
LQ Newbie
 
Registered: Mar 2010
Posts: 3

Rep: Reputation: 0
Hi,
I have applied some configurations to my httpd.conf file and restarted the server and the following error has come,

Starting httpd: [Tue Mar 30 16:13:40 2010] [warn] module php5_module is already loaded, skipping
(98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs

the configurations I have added are as follows,

JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/app_name.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/app_name.key
JkMount /app_name* ajp13

</VirtualHost>

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

I couldn't figure out the problem. It would be nice If some one can help me with this.

Thank you
 
  


Reply

Tags
apache, bind, http


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
[crit] (98) Address already in use: make_sock could not bind to port 3339. ForumKid Linux - Networking 4 06-10-2008 02:38 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
how can i remove an address bind sibu_rajappan Linux - Networking 0 12-24-2004 01:50 AM
bind : Address already in use sheni Linux - Networking 1 11-11-2004 12:41 PM
cannot bind to socket: address already in use exfacior Linux - Wireless Networking 0 09-27-2004 12:34 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration