503 Service Unavailable - Can't access my Rails app

#1
503 Service Unavailable (solved) - but now 404

I didn't find anything about this problem (which probably isn't really a problem), so I post this here.

My LiteSpeed Web Server is running and I installed the Ruby API successfully.
I added a Virtual Host and configured it as a Rails app.
Using domain.com, I am able to see the Ruby on Rails "Welcome aboard" page, but I can't visit the controller's page using the domain.com/controller.
I'm a Rails noob, so I just know, that it normally works like this using WEBrick on OS X 10.4.
What am I doing wrong? Or what do I have to change?
 
Last edited:

xing

LiteSpeed Staff
#2
Pleaes check the log directory under ruby app folder and also log entries under litespeed for the source of the error.

More likely than not, your ruby app is not starting up correctly.
 
#3
lsws.log, production.log and server.log from the app's log folder are empty.

LiteSpeed says
[80.131.59.135:61819-0#nass] Request has not been logged into access log, response body sent: 0!
[Rails:nass:/] stop worker processes
But I don't have any idea what I have to do with this ...
 

mistwang

LiteSpeed Staff
#4
Is there anything logged in stderr.log?
You can try raise "Process soft/hard limit" under "Rails" and "security" tab, see if it help.
 

mistwang

LiteSpeed Staff
#6
lsws/logs/stderr.log. If you see "warning: already initialized constant ENV" then the ruby lsapi has been working properly. if you see "fork() failed", you still need to raise the "Process soft/hard limit" to maybe "100".
 
#9
Rails requires Ruby version 1.8.2 (2004-12-25) or later.
You're running 1.8.1 (2003-12-25); please upgrade to continue.
I installed Ruby using Yast (on Suse 9.3) and it only "finds" version 1.8.1.
Before I did this (installing using Yast) I already downloaded it and tried to compile and install it, but there was a problem with zlib and so somebody told my I should try it with Yast.

But how can I get Ruby 1.8.2 or newer? Is this possible using Yast? (I'm a linux noob!)
Or is there another way how I can update Ruby and avoid problems with zlib?
 
#11
From which source code? And how?
(Sorry for this stupid noob question ...)

Because I thought it might be a problem to run two Ruby installations I uninstalled Ruby using Yast.
Then I installed Ruby 1.8.5 manually.

According to Yast, zlib is installed, but installing the gems I got this via ssh
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- zlib (LoadError)
Is there any possibility to install Rails (requiring Ruby 1.8.2 or higher) on Suse 9.3???
Can I change the server which Yast uses to search for packages?
Or what should I do?

I dont have any idea and my Rails app should have been working for two weeks. :(
 
#13
Thanks, but this was not really my problem.

According to Yast, zlib was already installed, but I compiled and installed it "by hand". Then I installed Ruby again, and then the gems.
And then Rails.

And now - Rails seems to be installed!

But there's another problem now: Now I retrieve a "404 Not found" when trying to access my app using mydomain.com/controller.

Litespeed says:
[config:vhost:nass] Uid of /clientdata/clients/nass/publikationen/public/ is smaller than minimum requirement 11, use server uid!
What does this mean?
What is a(?) uid?

Thanks!
 
#17
Minimum UID - number >= 11
This does not work. :(

I have let this field empty and have restarted the server, but nothing changed.

BTW: I forgot
[config:vhost:nass] Gid of /clientdata/clients/nass/publikationen/public/ is smaller than minimum requirement 10, use server gid!
But I think this refers to the same problem.
 

xing

LiteSpeed Staff
#18
The permimission flag 777 is not the problem here but the user/group assigned to the folder in question.

Looks like you are using suEXEC feature. Whey using suExec, litespeed does not allow execution of scripts as users with priviledges lower (more powerful) than the min uid and min gid in server security settings.

This is done for security reasons. Set both of those to 0 and try again.
 
#19
Setting both to 0 doesn't work, too. And leaving them empty didn't solve the problem ...

Can I solve this problem with changing the user?
Currently, LiteSpeed is running as suggested as "nobody". Should I run it as root or might this be insecure?
Or should I configure a new user with the "right" rights and then reinstall LiteSpeed (http://www.litespeedtech.com/docs/webserver/config/general/#runningAs)?

Or do you have a better idea?
 

xing

LiteSpeed Staff
#20
I would recommend you to create a special non-priviledged user just for litespeed, such as "lsws". Do a clean install of LiteSpeed with the new user and go from there. You should not have this problem then.
 
Top