Weblog entry #1 for zorgrian

Can't get Bamboo going
Posted by zorgrian on Thu 6 Oct 2005 at 23:30
Tags: none.
I can't get bamboo going on a debian sarge instalation.

This despite spending some hours investigating the problem.

I have got stuck on problems with apache2 which complains of the following

mur:/home/zorgrian# /etc/init.d/apache2 force-reload
Forcing reload of web server: Apache2 ... no pidfile found! not running?(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
mur:/home/zorgrian#

if anyone knows what the F@ck is going on please email me on zorgrian@yahoo.co.uk

Also please don't assume that I've got everything working correctly and yes I've read the following....

=Creating simple websites with Bamboo

Posted by Steve in the Packages section on Sun 4 Sep 2005 at 07:20

*this articel unfortunately assumes that you actually have been serving websites for years or that you were born inside a linux box....


 

Comments on this Entry

Posted by Steve (82.41.xx.xx) on Fri 7 Oct 2005 at 00:05
[ Send Message | View Steve's Scratchpad | View Weblogs ]

YOu have two errors there:

  • Can't shut down - no pid file found.
  • Address in use.

The first means that you've not got apache running so you shouldn't run "/etc/init.d/apache2 restart". Instead run "/etc/init.d/apache start" - however first we need to deal with the second error.

The second error "cannot bind" suggests that you have something running and listening upon port 80 already. Simplest way to find out what process that might be is to run:

apt-get install lsof
lsof -i :80

That should get you the process which is listening upon port 80. (If run as root).

Kill it. And then start Apache.

That should help a little, but let us know if it doesnt. It could be that you have apache2 running and the pid file has gone away, in that case you can run "killall apache2" to terminate them.

Steve
--

[ Parent | Reply to this comment ]

Posted by zorgrian (81.33.xx.xx) on Fri 7 Oct 2005 at 11:17
[ Send Message | View Weblogs ]
Thanks for getting back to me about this... I've tried the stuff that you suggested...

But first, for some reason I decided to completely remove and then re-install apache2 which seemed to go well all though I have no idea if it is working properly.

Now, assuming that it is working properly (It said so upon finalization of the install) then I went on to do the things that you said. the first 5 lines here are output of the command lsof -i :80 before I used killall apache2

Then... I try again but I get the same 'no pidfile found' message

What the F@ck have I done wrong? I would very much appriaciate your help as I really do want to investigate Bamboo... It seems to be ACE but not much good if I can't run it? Still I am deturmined to get there in the end...



apache2 9135 www-data 3u IPv4 88678 TCP *:www (LISTEN)
apache2 9136 www-data 3u IPv4 88678 TCP *:www (LISTEN)
apache2 9137 www-data 3u IPv4 88678 TCP *:www (LISTEN)
apache2 9138 www-data 3u IPv4 88678 TCP *:www (LISTEN)
apache2 9139 www-data 3u IPv4 88678 TCP *:www (LISTEN)
mur:/home/zorgrian# killall apache2
mur:/home/zorgrian# lsof -i :80
mur:/home/zorgrian# pico /etc/apache2/sites-available/myhost.com
mur:/home/zorgrian# a2ensite myhost.com
Site myhost.com installed; run /etc/init.d/apache2 reload to enable.
mur:/home/zorgrian# /etc/init.d/apache2 force-reload
Forcing reload of web server: Apache2 ... no pidfile found! not running?.
mur:/home/zorgrian#

[ Parent | Reply to this comment ]

Posted by Anonymous (213.164.xx.xx) on Fri 7 Oct 2005 at 12:01
Is this a virtual server?

What does netstat -pnt say?

While apache is running, what does
ls -la $(grep ^Pid /etc/apache2/* -h|sed "s/PidFile//")
say?

Can you also post the output of dpkg -l|grep apache

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 7 Oct 2005 at 12:04
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Looks like you started doing good.

You killed the running server, added the new site, but then you made the mistake of running "apache2 reload".

That only reloads a previously running Apache process - now you want to run:

/etc/init.d/apache start

As you don't have any apache processes running - you killed them!

Steve
--

[ Parent | Reply to this comment ]

Posted by zorgrian (81.33.xx.xx) on Fri 7 Oct 2005 at 18:17
[ Send Message | View Weblogs ]
Ok, well I've been out.... and then now I'm back on the case...

I would like to see if I can fix this before tomorrow morning as I am going to drive to France from Montblanc,Tarragona tomorrow morning...

Still no joy, but here is the output......

mur:/home/zorgrian# man apache2
Reformatting apache2(8), please wait...
mur:/home/zorgrian# /etc/init.d/apache start
bash: /etc/init.d/apache: No such file or directory
mur:/home/zorgrian# /etc/init.d/apache2 start
Starting web server: Apache2httpd (pid 11989) already running
.
mur:/home/zorgrian#
mur:/home/zorgrian# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
firefox-b 4636 zorgrian 37u IPv4 1283295 TCP 192.168.1.33:46758->64.233.161.147:www (ESTABLISHED)
firefox-b 4636 zorgrian 45u IPv4 1283941 TCP 192.168.1.33:46773->public-25-250.lax.ws.untd.com:www (ESTABLISHED)
firefox-b 4636 zorgrian 46u IPv4 1284187 TCP 192.168.1.33:46777->track.lax.qa1.untd.com:www (ESTABLISHED)
firefox-b 4650 zorgrian 37u IPv4 1283295 TCP 192.168.1.33:46758->64.233.161.147:www (ESTABLISHED)
etc.

SO then I did this as apache2 was already running

mur:/home/zorgrian# killall apache2
mur:/home/zorgrian# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
firefox-b 4636 zorgrian 45u IPv4 1283941 TCP 192.168.1.33:46773->public-25-250.lax.ws.untd.com:www (ESTABLISHED)
firefox-b 4636 zorgrian 46u IPv4 1284187 TCP 192.168.1.33:46777->track.lax.qa1.untd.com:www (CLOSE_WAIT)
firefox-b 4650 zorgrian 45u IPv4 1283941 TCP 192.168.1.33:46773->public-25-250.lax.ws.untd.com:www (ESTABLISHED)
etc

then I did....

mur:/home/zorgrian# /etc/init.d/apache2 start
Starting web server: Apache2.
mur:/home/zorgrian#
mur:/home/zorgrian# netstat -pnt
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 1 0 192.168.1.33:42141 85.65.155.205:6348 CLOSE_WAIT 15965/java
tcp 0 0 127.0.0.1:631 127.0.0.1:32777 ESTABLISHED1220/cupsd
tcp 0 0 192.168.1.33:46345 70.30.138.118:6346 ESTABLISHED15965/java

I am running limewire in the background I can kill this if you like



[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 7 Oct 2005 at 18:21
[ Send Message | View Steve's Scratchpad | View Weblogs ]

This looks good:

mur:/home/zorgrian# /etc/init.d/apache2 start
Starting web server: Apache2. 

So .. is it working? Can you open your browser? See anything in the logfiles, etc?

Steve
--

[ Parent | Reply to this comment ]

Posted by zorgrian (81.33.xx.xx) on Fri 7 Oct 2005 at 18:36
[ Send Message | View Weblogs ]
firefox with the line

http://mysite.com

seems to resolve to some horrible webspace vendor site

http://home.mysite.com/

so not so good on that level but maybe ther is actually some very good reason for this?

what can I try now?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 7 Oct 2005 at 19:06
[ Send Message | View Steve's Scratchpad | View Weblogs ]

If you've not setup DNS then http://localhost, or http://your.ip.address/ should be OK.

That really depends on how you configured your virtual host though ..

Steve
--

[ Parent | Reply to this comment ]

Posted by zorgrian (81.33.xx.xx) on Fri 7 Oct 2005 at 19:53
[ Send Message | View Weblogs ]
Ok something's good then becuase when I put

http://localhost

in firefox, at least it resolves to

http://localhost/apache2-default/

this brings up the apache screen with the apache logo that says
If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page. etc

which at least means that apache2 is serving up something.

Its not quite there though is it? apache2 doesn't seem to know about bamboo.

By the way still nothing in the logs

what now?

Please help... I am trying to read the docs but I'm running out of time

Thanks for all the help so far.......I could use some more

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 7 Oct 2005 at 20:04
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I suggest you find somebody local to help you!

It looks like your Apache setup is still reading the default things from /etc/apache2/sites-enabled/000-default and ignoring the things you added in myshost.com. From your previous comment I guess that's because you don't have DNS setup properly.

Trying to work out what you have in your new configuration file, and the default one, and get them fixed is going to be an involved process .. So if you're under time pressure you're not going to get much more luck here I'm afraid.

Examining the settings that I showed in the article will probably help - especially if you look at the files /var/log/apache2/access.log and /var/log/apache2/error.log.

Steve
--

[ Parent | Reply to this comment ]

Posted by zorgrian (81.33.xx.xx) on Fri 7 Oct 2005 at 20:29
[ Send Message | View Weblogs ]
well I must say thanks again for getting me this far....

I'm a musician and I want to use bamboo for a community project here in Spain...

I will carry on for a few more hours though because it will be better to run the website like this than to use a static system with content added by dreamweaver or some other html editor... I want to keep tight control over content but keep the site available for trusted additions etc

you can check out the current site at http://www.vinaixa.co.uk/

I don't mind doing away with all the fancy flash stuff that I put in this site if the content can be managed more easily


Cheers!

[ Parent | Reply to this comment ]

Posted by zorgrian (81.33.xx.xx) on Fri 7 Oct 2005 at 20:35
[ Send Message | View Weblogs ]
contents of /var/log/apache2/access.log


127.0.0.1 - - [07/Oct/2005:20:43:33 +0200] "GET / HTTP/1.1" 302 302 "-" "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.10) $127.0.0.1 - - [07/Oct/2005:20:43:34 +0200] "GET /apache2-default/ HTTP/1.1" 200 1457 "-" "Mozilla/5.0 (X11; U; Linux i686; e$127.0.0.1 - - [07/Oct/2005:20:43:34 +0200] "GET /apache2-default/apache_pb.gif HTTP/1.1" 200 2326 "http://localhost/apache2-$127.0.0.1 - - [07/Oct/2005:20:43:34 +0200] "GET /favicon.ico HTTP/1.1" 404 294 "-" "Mozilla/5.0 (X11; U; Linux i686; en-GB; $

contents of the error log is

[Fri Oct 07 11:03:55 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) configured -- resuming normal operations
[Fri Oct 07 11:06:26 2005] [notice] SIGUSR1 received. Doing graceful restart
[Fri Oct 07 11:06:26 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) configured -- resuming normal operations
[Fri Oct 07 11:56:04 2005] [notice] caught SIGTERM, shutting down
[Fri Oct 07 12:02:26 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) configured -- resuming normal operations
[Fri Oct 07 18:51:20 2005] [notice] caught SIGTERM, shutting down
[Fri Oct 07 18:52:53 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) configured -- resuming normal operations
[Fri Oct 07 20:01:22 2005] [notice] caught SIGTERM, shutting down
[Fri Oct 07 20:01:33 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) configured -- resuming normal operations
[Fri Oct 07 20:02:01 2005] [notice] caught SIGTERM, shutting down
[Fri Oct 07 20:43:04 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) configured -- resuming normal operations
[Fri Oct 07 20:43:34 2005] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico




[ Parent | Reply to this comment ]

Posted by Anonymous (24.227.xx.xx) on Tue 22 Nov 2005 at 21:31
Hi Steve,

I was searching google for help on a similar problem and just wanted to say thanks. I am using Gentoo Linux, but some program kept taking over my port 80. It may be a virus or something, I am still looking. But now I know how to find out whats on a port and how to use the killall statement. I couldn't find that anywhere. So to all others who read this post, if you are using Gentoo Linux, do this :

emerge lsof

Then to find out whats on a port, use Steve's code above:
lsof -i :80 (where 80 is the port your looking for)

If you don't like whats on it,

kill $processid (processids will be listed by the above statement)

or if you know the service bothering you (like apache)

killall apache

Another great program to check out whats going on your ports is "nmap"

Gentoo install: emerge nmap
Then run, nmap localhost or nmap your-ip-address
Maybe Steve can show everyone how to install it on Debian.

Thanks again,

Paul Crinigan
http://afcommerce.com - Free Open Source Shopping Cart

[ Parent | Reply to this comment ]

Posted by miguel (201.12.xx.xx) on Fri 7 Oct 2005 at 22:43
[ Send Message | View Weblogs ]
Take a look at the file ports.conf, inside /etc/apache2, apache2.conf includes this file, and maybe you are declaring the port again.



[ Parent | Reply to this comment ]

Posted by suspended user gg234 (195.14.xx.xx) on Fri 14 Oct 2005 at 11:53
[ Send Message ]
Hi,

When i try to restart or start the apache2 webserver i am getting following error message

./apache2 stop
Stopping web server: Apache2 ... no pidfile found! not running?.

Please help me i need to fix this ASAP this is live production server

Best regards

when i try to kill all the process that time it is showing

apache2: no process killed

when i try to start the apache2 stsrt

it is giving it is starting but whe i try to find lsof -i :80

nothing is showing

Please help me on this this is very urgent

[ Parent | Reply to this comment ]

Posted by Anonymous (62.254.xx.xx) on Tue 21 Feb 2006 at 01:01
Ok I've just solved this little problem, it appears that the apache.conf loads the httpd.conf and the ports.conf. Now if you've got "Listen *:80" in the httpd.conf and the same line is in the ports.conf then you need to comment one of those out :-)

Start apache and voila ...


Hope that helps.


[ Parent | Reply to this comment ]

Posted by Anonymous (82.173.xx.xx) on Fri 19 May 2006 at 00:04
This was the answer for me;)

Thanks
www.sylow.net

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search