The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mongrel problem with rails 2.3.8

Discussion in 'General Discussion' started by madpato, Jan 20, 2011.

  1. madpato

    madpato Active Member

    Joined:
    May 30, 2008
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    I have a customer who wants to install a rails app on my cpanel vps server he is making some tests but when he tries to start the server (or even i as root do it) i got some errors, im pasting the output:

    Well thats on the mongrel log, my versions of RoR are:

    ruby 1.8.7 (2009-06-08 patchlevel 173) [x86_64-linux]
    Rails 2.3.8

    Installed via the script cpanel provides. I am not a RoR expert and since this is the cpanel installer i tho that the first thing to do was ask here.

    Hope you can help me, thanks in advance.
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I think the issue described appears similar to the following bug report: #4690 Mongrel doesn't work with rails 2.3.8 - Ruby on Rails - rails
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Is the application actually loading at the mongrel url with the port? If it is starting up there but only logging this error and outputting text to the redirection url (the port 80 one), then it would be the same mongrel cookies header bug, which can be fixed by doing the following:

    Edit /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/cgi.rb file. On line 81, you will find this line:

    Code:
    REMOVED_KEYS.each {|k| options.delete(k) }
    Immediately before it, place the following lines:

    Code:
    @head['cookie'] = options['cookie'] if options['cookie']
    options.delete('cookie')
    Then save the file. Of note, there is an internal case (#45774) opened about the mongrel cookies header bug for us to modify that file automatically on ruby installs for /scripts/installruby so that this doesn't happen for future ruby and rails installations.

    If the application really is not starting at all, then try starting it without mongrel by doing the following:

    Code:
    cd /home/username/rails_apps/appname
    ps aux|grep mongrel
    kill -9 pid# (kill the PID# of the mongrel process for that user)
    ruby script/server -p port# -d
    Here, you would replace username with the cPanel username, appname with the application name, the pid# with the pid number of the mongrel process for that user, and port# with the mongrel port number the application should be running on.

    You should get errors on the startup without mongrel telling you why the application won't start. It is likely a Rails version mismatch if it isn't the mongrel cookie header bug mentioned earlier.
     
  4. madpato

    madpato Active Member

    Joined:
    May 30, 2008
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    Thank you for your responses, after doing the cookie thing, now my mongrel.log says this:

    Ok so if i go to http://mydomain.com:12003 i still see nothing and in the cpanel of the domain, the app has a "not running" status.
    I'm missing something?

    Thanks in advance.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Did you try the steps indicated for stopping the Mongrel process and then starting it using command line to see the results? It is likely a rails gem version mismatch if it isn't working still. Again, you'd do these steps to start it outside of mongrel:

    Code:
    cd /home/username/rails_apps/appname
    ps aux|grep mongrel
    kill -9 pid# (kill the PID# of the mongrel process for that user)
    ruby script/server -p port# -d
    Here, you would replace username with the cPanel username, appname with the application name, the pid# with the pid number of the mongrel process for that user, and port# with the mongrel port number the application should be running on (based on your last reply, probably 12003 would be the port number).

    Otherwise, if you are still unable to troubleshoot the issue, please feel free to open a ticket using WHM > Support Center > Contact cPanel or using the link in my signature. Please post the ticket number here if you end up submitting one.

    Thanks!
     
  6. madpato

    madpato Active Member

    Joined:
    May 30, 2008
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    I've opened a ticket, number: 1171882

    Thanks in advance.
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Thank you for opening a ticket, madpato. I've replied to the ticket. I believe that your host is blocking the port in question from access, since CSF didn't appear to be the issue for it not working. Mongrel itself is running and the application, so that isn't the issue. There were not errors in the logs on starting it up either. It simply will not connect from outside the server on port 12003.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Case 45774 was resolved in the early builds of 11.30. To see if 11.30 has reached your update tier, visit Downloads - cPanel Inc.
     
Loading...

Share This Page