Project

General

Profile

404 Error when adding posts, issues, wiki edits

Added by Tyler Mandry over 12 years ago

Every time I or another user on my site tries to make a post/issue/comment/edit, the following error shows up:

Page not found

The page you were trying to access doesn't exist or has been removed.

the URL is the correct one, the URL of the new or modified item, but the error is shown. Strangely enough, the action itself is successful. Refreshing the browser causes the page to view correctly, with the new post or edit. What could be causing this? It's been going on for over a week, and a restart of the app did not help.

Here's what happens in the production log after a forum post:

Processing MessagesController#reply (for 69.153.15.xxx at 2011-07-26 20:41:38) [POST]
  Parameters: {"board_id"=>"1", "commit"=>"Submit", "reply"=>{"subject"=>"RE: To do list", "content"=>"asdfasdf"}, "action"=>"reply", "authenticity_token"=>"xxx", "id"=>"14", "controller"=>"messages", "attachments"=>{"1"=>{"description"=>""}}}
Redirected to http://mydomain.com/boards/1/topics/14?r=26
Completed in 105ms (DB: 80) | 302 Found [http://mydomain.com/boards/1/topics/14/replies]

Processing ApplicationController#index (for 69.153.15.xxx at 2011-07-26 20:41:39) [GET]

ActionController::RoutingError (No route matches "/internal_error.html" with {:method=>:get}):
  /dh/passenger/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
  /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
  /dh/passenger/lib/phusion_passenger/utils.rb:184:in `safe_fork'
  /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:349:in `handle_spawn_application'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:163:in `start'
  /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /home/myuser/mydomain.com/redmine/public/404.html (404 Not Found)

Replies (5)

RE: 404 Error when adding posts, issues, wiki edits - Added by Tyler Mandry over 12 years ago

This problem also persisted across an upgrade to Redmine v1.2.

RE: 404 Error when adding posts, issues, wiki edits - Added by Tyler Mandry over 12 years ago

More info:

running on a linux server with Passenger, MySQL database
Here's something interesting: although I installed a gem in my user's home for Rails 2.3.11, the version installed on the server is Rails 3.0.3. This could be causing the problem.

RE: 404 Error when adding posts, issues, wiki edits - Added by Tyler Mandry over 12 years ago

Okay, the app is frozen to Rails 2.3.11. The same problem occurs. I've tried all kinds of things - clearing the cache and sessions, upgrading versions, even tried migrating to ChiliProject to see if that worked. Every time I had the same problem. Same kind of error message each time.

It looks like it's experiencing some sort of error (not logged) and then tries to pull up "/internal_error.html" which doesn't exist, which in turn causes the 404. Does that seem right? How can I find out what the original error is, if so?

RE: 404 Error when adding posts, issues, wiki edits - Added by Tyler Mandry over 12 years ago

Seems other people using Passenger are having this issue, but I couldn't find them using Google. Now the problem is "patched" using a hack (putting a redirect in public/internal_error.html,) but it works. (See link)

RE: 404 Error when adding posts, issues, wiki edits - Added by Michael Carriere over 12 years ago

Just bringing over an answer from our other thread -- the issue seems to be stemming from the fact that we had mod_security enabled on apache. Disabling it for the vhost/domain that we were running redmine on did the trick.

    (1-5/5)