Project

General

Profile

Actions

Defect #12519

closed

Redmine in sub-URI gives 404 page not found issue submit and wiki submit

Added by Vincent Lizzi over 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I'm having a problem where Redmine gives a 404 Page Not Found error when submitting an issue (new issue or an update) and when submitting a wiki page edit. Redmine appears to be working fine otherwise including being able to update settings (though not being able to update issues is fairly critical problem).

The problem started on Redmine 2.0.3 after Redmine was working completely fine for a while. I tried upgrading to Redmine 2.1.4 (the upgrade went smoothly), but the error persisted after the upgrade. I'm on a shared host (A2Hosting) so it's possible something on the server changed, although the requirements listed on RedmineInstall are all met.

This might be related to #12102, but I've tried the suggestions there to no avail.

production.log gives some information about what is happening. It looks like the routing is only receiving the last part of the URI.

Started PUT "/redmine/issues/4" for 108.2.10.63 at Thu Dec 06 02:09:45 -0500 2012

ActionController::RoutingError (No route matches [PUT] "/4"):
  actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.8) lib/rails/engine.rb:479:in `call'
  railties (3.2.8) lib/rails/application.rb:223:in `call'
  railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `send'
  railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing'
  passenger (3.0.15) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.15) lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
  passenger (3.0.15) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.15) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.15) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  passenger (3.0.15) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.15) lib/phusion_passenger/utils.rb:470:in `safe_fork'
  passenger (3.0.15) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.15) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.15) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  passenger (3.0.15) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.15) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  passenger (3.0.15) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.15) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.15) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.15) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.15) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.15) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.15) helper-scripts/passenger-spawn-server:99

Environment information follows:

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.8.24
Rack version              1.4
Rails version             3.2.8
Active Record version     3.2.8
Action Pack version       3.2.8
Active Resource version   3.2.8
Action Mailer version     3.2.8
Active Support version    3.2.8
Middleware                Rack::Cache, 
ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x2ad204642a98>,
 Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, 
Rails::Rack::Logger, ActionDispatch::ShowExceptions, 
ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, 
ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, 
ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, 
Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport, OpenIdAuthentication
Application root          /home/xxxxxxx/rails_apps/redmine-2.1.4
Environment               production
Database adapter          mysql
Database schema version   20120731164049
Actions #1

Updated by Vincent Lizzi over 11 years ago

Here are steps to reproduce:

1. Go to Redmine and Sign in

2. Go into a project.

3. To see that posting updates works in some places, click on Settings. Edit the project description, then press Save. The settings are updated.

4. Click on New Issue. Enter a subject and possibly other information.

4a. Click Submit. This goes to a 404 error.

4b. Press the back button.

5. Go to Issues. Click on any issue. Click Edit.

5a. Click Submit. This goes to a 404 error.

5b. Press the back button.

6. Click on Wiki. Add some text to the page.

6a. Click Submit. This goes to a 404 error.

6b. Press the back button.

7. Click on Forums, click New Message. Enter text.

7a. Click Submit. This goes to a 404 error.

7b. Press the back button.

Nothing is saved when the 404 messages appear. I'm not sure if it's relevant, but the Preview function works on the pages that give the 404 errors.

Actions #2

Updated by Detlev Droege over 11 years ago

I do have the same problem when editing wiki pages and updating issues. And, by coincidence(?), I'm on a shared host at A2Hosting too.
Upon hitting the "Save" button I get a 404 page not found error. The log file in my case also shows a shortened URL, though I'm only missing the first path component, "/projects":

Started PUT "/projects/board/wiki/Wiki" for 93.221.72.218 at Wed Dec 12 13:58:45 -0500 2012

ActionController::RoutingError (No route matches [PUT] "/board/wiki/Wiki"):
  actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
[rest is identical]

Except for Rails 3.2.6 it is the same setup:
Environment:
  Redmine version                          2.0.3.stable
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.6
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  due_date_reminder                        0.3.1

When setting it up, I followed the hosters instructions at https://my.a2hosting.com/knowledgebase.php?_m=knowledgebase&_a=viewarticle&kbarticleid=665 -- does that matter?

Actions #3

Updated by Ivan Garcia over 11 years ago

I have the exact same issue and the same hosting provider, did you find anything to solve this?

ActionController::RoutingError (No route matches [POST] "/wdtc/issues"):
  vendor/bundle/ruby/1.8/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  vendor/bundle/ruby/1.8/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  vendor/bundle/ruby/1.8/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'

thanks in advance

Actions #4

Updated by Vincent Lizzi over 11 years ago

  • Status changed from New to Resolved

The techs at A2 Hosting have investigated this and found that this error is due to a race condition in Passenger. They were able to make some changes to help but the problem still seems to be within Passenger. I've upgraded to Redmine 2.2.0 and Rails 3.2.9, and changed to using Redmine in a subdomain instead of a sub-uri. After all this, the situation has improved but is not solved. I still occasionally get an error message when submitting a new issue, issue update, or wiki edit:

Application error
Rails application failed to start properly

The workaround for now seems to be to refresh the page when the error message appears, or edit the custom error pages to automatically refresh.

I'm changing the status on this issue to Resolved since the problem is not in Redmine.

Actions #5

Updated by Daniel Felix over 11 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Thank you for your feedback. I close this Ticket.

Actions #6

Updated by Samuel F. Baggen almost 11 years ago

I have (actually) the same issue in DreamHost, I noticed it around one year ago in my first test with redmine but actually still happening

Actions

Also available in: Atom PDF