PDA

View Full Version : 503 error, rails not running


karloff
02-27-2008, 02:21 PM
Hi,

I have setup all my stuff, however when i try to run a site with rails i get a 503 error. if i boot it to webrick (on port 3000) it works fine) ruby-lsapi is install a-ok.

permissions seem to be fine. can anyone enlighten me to why tis ain't working?

mistwang
02-27-2008, 02:24 PM
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:rails:troubleshoot

karloff
02-27-2008, 03:00 PM
i get the following error in the stderr.log

/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:159:in `require_frameworks': no such file to load -- openssl (RuntimeError)
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:88:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
from ./config/environment.rb:13
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:5:in `require'
from /usr/local/lsws/fcgi-bin/RailsRunner.rb:5

and can't find any ruby processes going on with grep, how do i unistall ruby-lsapi?

mistwang
02-27-2008, 03:08 PM
This error has nothing to do with ruby-lsapi.
Maybe you need to explicitly add "LD_LIBRARY_PATH" environment variable under "ruby rails" tab in order for rails to find the missing library?
LSWS only set "PATH=/bin:/usr/bin" environment variable, all other shell environment variables are stripped, you need to add them explicitly if need.


Also make the correct ruby binary has been used if there are multiple installations of ruby.

karloff
02-27-2008, 03:12 PM
thre is only one install of ruby on my server

added this to the enviroment in rails tab

LD_LIBRARY_PATH=/var/www

still no joy, it that what you ment?

mistwang
02-27-2008, 03:15 PM
You need to check variables set in your current shell environment
with command

envAdd all of them see if it help, then strip one by one.

karloff
02-27-2008, 03:17 PM
how can i edit this env if not through the rails tab bit?

mistwang
02-27-2008, 03:22 PM
That's the only place you can set env for rails.

karloff
02-27-2008, 03:23 PM
hmmm, i'm lost i get...

HOSTNAME=karloff
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=91.105.246.57 1102 22
OLDPWD=/var/www/john-curley.com
SSH_TTY=/dev/pts/0
USER=root
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:s o=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi= 01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com =00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00 ;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;3 1:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz =00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00; 31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;3 5:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/root
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
INPUTRC=/etc/inputrc
PWD=/var/www
SHLVL=1
HOME=/root
LOGNAME=root
SSH_CONNECTION=91.105.246.57 1102 67.207.133.178 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env


pwd is set to var/www (where my rails apps are)

if i can't set the path elsewhere how can i get it to work. changed it in the rails tab and nothing

mistwang
02-27-2008, 03:39 PM
PWD should not matter. You can remove that. It does not looks like those should affect your rails app.

Can you confirm that you run rails in the same mode, under LiteSpeed and WEBrick? WEBrick default to "Development".

karloff
02-28-2008, 12:02 PM
just set rails to boot in dev mode, still no change, check the log and there is no prod log for the app.... that shouldn't be, yes?

mistwang
02-28-2008, 12:46 PM
Please upgrade to 3.3.6 release.

karloff
02-28-2008, 01:19 PM
Please upgrade to 3.3.6 release.

only just upgraded to 3.3.5, is it out yet?! manual upgrade needed?

mistwang
02-28-2008, 01:33 PM
autoupdate has been trigger, if you restart LSWS, you will be able to update it from the web GUI shortly.

karloff
02-28-2008, 01:39 PM
i've upgraded but still stumped

mistwang
02-28-2008, 01:53 PM
Looks like you have to "strace" the ruby process to find out why.

try strace -f -p <pid_of_lshttpd_child_process>
You should find the failed syscall that break the rails initialization.

You can compare it with output from WEBrick [code]strace script/server[code]