503 error, rails not running

Discussion in 'Install/Configuration' started by karloff, Feb 27, 2008.

  1. karloff

    karloff Member

    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?
  2. mistwang

    mistwang LiteSpeed Staff

  3. karloff

    karloff Member

    i get the following error in the stderr.log

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

    mistwang LiteSpeed Staff

    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.
  5. karloff

    karloff Member

    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?
  6. mistwang

    mistwang LiteSpeed Staff

    You need to check variables set in your current shell environment
    with command

    Code:
    env
    Add all of them see if it help, then strip one by one.
  7. karloff

    karloff Member

    how can i edit this env if not through the rails tab bit?
  8. mistwang

    mistwang LiteSpeed Staff

    That's the only place you can set env for rails.
  9. karloff

    karloff Member

    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:so=00;35:bd=40;33;01:cd=40;33;01:eek:r=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;31:*.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;35:*.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
  10. mistwang

    mistwang LiteSpeed Staff

    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".
  11. karloff

    karloff Member

    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?
  12. mistwang

    mistwang LiteSpeed Staff

    Please upgrade to 3.3.6 release.
  13. karloff

    karloff Member

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

    mistwang LiteSpeed Staff

    autoupdate has been trigger, if you restart LSWS, you will be able to update it from the web GUI shortly.
  15. karloff

    karloff Member

    i've upgraded but still stumped
  16. mistwang

    mistwang LiteSpeed Staff

    Looks like you have to "strace" the ruby process to find out why.

    try
    Code:
    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]

Share This Page