Project

General

Profile

Site works perfectly if I am logged in, but 404 for everyone else

Added by Lawrence Krubner over 10 years ago

Nevermind. Ignore this question. I only needed to update the mongrel.rb patch.

I was asked to upgrade our Redmine from 1.1 to 1.3.3. I was given a dev server that was an image of the work production server. The server is running mongrel, which we start like this:

/usr/local/bin/mongrel_rails start -d -c /redmine/ -l /redmine/log/production.log -a 10.0.1.140 -p 80 --user redmine --group redmine -e production

I was able to upgrade everything. I may have logged in before the upgrade. Either way, for me, the site works perfectly. But for everyone else the site is a 404 error. And, in fact, if I start a new browser (say, Safari), on my own machine, and go to the site, I also get a 404 error.

Also very strange: I restarted mongrel, but in the one browser where I was logged in, I remained logged in and was able to click to other pages. I would have assumed that the session was lost when the app restarted, but no.

But in the 1 browser where I am logged in, everything works perfect. And the site is 404 for everyone else.

Any suggestions?

The logs have this error:

Processing WelcomeController#index (for 10.0.1.91 at 2013-08-13 12:54:57) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to http://10.0.1.140/login?back_url=http%3A%2F%2F10.0.1.140%2F
Filter chain halted as [:check_if_login_required] rendered_or_redirected.
Completed in 6ms (DB: 1) | 302 Found [http://10.0.1.140/]

  • Tue Aug 13 12:54:57 -0400 2013: Error calling Dispatcher.dispatch #<NoMethodError: private method `split' called for nil:NilClass>Writing PID file to log/mongrel.pid

/redmine/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:52:in `dispatch_cgi'
/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:27:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/local/bin/mongrel_rails:19:in `load'
/usr/local/bin/mongrel_rails:19

CentOS 6

Ruby 1.8.7

I see this might be related:

http://www.redmine.org/issues/7688

But I already have the mongrel.rb patch installed, and the site does not function.

Nevermind. Ignore this question. I only needed to update the mongrel.rb patch.