LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > 503 Service Unavailable

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2003, 04:18 AM
George George is offline
New Member
 
Join Date: Aug 2003
Posts: 6
Default 503 Service Unavailable

Just ran a default install, and when trying to access the admin pages or run the test PHP script, it throws up an "Error 503 Service Unavailable," and the errorlog says:


2003-08-04 12:12:16.167 [WARN] Start FCGI [fcgiAdminPHP]: failed to bind to localhost:7202, fast cgi might be running,

Any ideas?
Reply With Quote
  #2  
Old 08-04-2003, 08:05 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Default rebuild php binary

Can you please tell me more about your system? Which distrubtion? Redhat? Suse?
We were informed that our pre-built php binary does not work well on Redhat 9 because of newer version of glibc. So please rebuild php binary from source if you can.

Please use PHP 4.3.1, 4.3.2 is buggy. build it as following:

cd php-4.3.1
./configure --enable-fastcgi --with-config-file-path=../conf
make
cp -f sapi/cgi/php [lsws_home]/admin/fast-cgi/admin_php
cp -f sapi/cgi/php [lsws_home]/fast-cgi/php

Best regards,
Mistwang
Reply With Quote
  #3  
Old 08-04-2003, 09:52 AM
George George is offline
New Member
 
Join Date: Aug 2003
Posts: 6
Thanks. I have Redhat 8, but have updated glibc since I first installed so I guess therein lies the problem.

Downloaded 4.3.1, but I get this error now during configure:

...
Updated php_version.h
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

Many thanks..
Reply With Quote
  #4  
Old 08-04-2003, 10:17 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Default compile PHP

You are welcome.

Did you install gcc?
Did you set PATH env correctly?

With the new glibc, you may also have problem during compilation. If it complains about "errno" in MySQL library, just modify

php-4.3.1/ext/mysql/libmysql/global.h

add a line at the beginning
Code:
#include <errno.h>
just after
Code:
#define _global_h
Best regards,
Gang
Reply With Quote
  #5  
Old 08-04-2003, 10:59 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Default try again

We just fixed a bug in PHP binary related to the new glibc library and it runs properly on redhat 9 now.
You can download our repackaged binary package and try again. See if it is fixed.

Best regards,
Mistwang
Reply With Quote
  #6  
Old 08-04-2003, 12:53 PM
George George is offline
New Member
 
Join Date: Aug 2003
Posts: 6
Okay thanks for your help so far. Managed to build PHP as you instructed, still getting a 503 though. Error log throws up:

2003-08-04 20:50:40.600 [WARN] Start FCGI [fcgiAdminPHP]: failed to bind to localhost:7202, fast cgi might be running,

Any thoughts?
Reply With Quote
  #7  
Old 08-04-2003, 02:54 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Default change the port for fcgiAdminPHP

Two possible causes:

1. the old admin_php is still running:
use command:
Code:
ps -ef | grep php
to list running php processes, kill them all. and try again, the web server will create new php processes automatically. if it still does not work restart web server.

2. Port 7202 is use by other daemon process.
Use command:
Code:
netstat -an | grep 7202
to check whether port 7202 is used by other application. If it is in use, above command will produce some output. If it is, change the port for admin PHP by editing file
Quote:
lsws/admin/conf/admin_config.xml
search for localhost:7202 and change it to a unused port.

Please post your result.

Mistwang
Reply With Quote
  #8  
Old 08-04-2003, 03:49 PM
George George is offline
New Member
 
Join Date: Aug 2003
Posts: 6
This is just wierd and frustrating now...

Wasn't possibility number 1.

netstat -an | grep 7202 revealed it was being used, so I changed it to 5158 (which wasn't being used)

netstat -an | grep 5158 now reveals:

tcp 0 0 127.0.0.1:5158 0.0.0.0:* LISTEN

So its almost as if it is listening on this port then it tries to start listening (again?!) when a request is put through??
Reply With Quote
  #9  
Old 08-04-2003, 07:10 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Default Need to test your PHP binary.

Do not give up yet. :-)

What you observed is normal. Once you try to access the admin interface, the web server will bind (use) port 5158 and start PHP, so when you do netstat again, it shows port 5158 is in use, if you kill all the running PHP processes, that port will be released.

For some reason the Fast CGI interface on PHP side is broken and no request can be completed, when that happens, web server will try to restart PHP engine and try again, but the port is still used by left over PHP processes. That is the reason why you saw that warning.

First we need to make sure your PHP binary is ok. Try it form command line first, see if there is any error messages, run "php -i" to make sure Fast CGI interface is enabled (configured with --enable-fastcgi).
If configuration file path for PHP is set to /usr/local/lib (it is the default value, my instrution change it to ../conf), make sure the notice logging is not enabled, it will break the fast CGI interface.

Then turn on server's debug logging by editing file "lsws/conf/httpd_config.xml", change "debugLevel" to 10. stop server, kill all PHP processes, start server again and access the PHP test page (not the admin interface).

If you still get 503, compress the error log and send it to bugs@litespeedtech.com.

We will try our best to help you.

Thank you for your patience.

Mistwang
Reply With Quote
  #10  
Old 08-05-2003, 03:04 AM
George George is offline
New Member
 
Join Date: Aug 2003
Posts: 6
Still not coming up trumps, I have emailed you the errorlogs.

Cheers,
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby On Rails 503 Service Unavailable Bug mroberto Ruby/Rails 6 03-24-2007 07:06 PM
503 Service Unavailable weird Install/Configuration 7 09-20-2006 11:55 AM
strange error.. & 503 service Unavailable xinn Install/Configuration 23 10-11-2005 08:29 AM
503 Service Unavailable - while setting up Perl FastCGI nigel CGI/Perl/Python 1 02-15-2005 06:15 AM
503 Service Unavailable illidan Bug Reports 3 01-03-2005 09:27 AM


All times are GMT -7. The time now is 01:21 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.