Defect #13541
closedCan't access SCM when log/production.scm.stderr.log is not writable
0%
Description
Our git repository viewer has stopped working since we have upgraded to redmine 2.3.0 (and rails 3.2.13).
The message is "404 The entry or revision was not found in the repository." and the accompanying log message is:
Started GET "/projects/knot-dns/repository" for 109.81.193.205 at 2013-03-20 19:25:24 +0100 Processing by RepositoriesController#show as HTML Parameters: {"id"=>"knot-dns"} Current user: oerdnj (id=3) Rendered common/error.html.erb within layouts/base (0.2ms) Completed 404 Not Found in 208ms (Views: 151.5ms | ActiveRecord: 11.6ms)
Our current environment is:
Ruby version 1.9.3 (x86_64-linux) RubyGems version 1.8.11 Rack version 1.4 Rails version 3.2.13 Active Record version 3.2.13 Action Pack version 3.2.13 Active Resource version 3.2.13 Action Mailer version 3.2.13 Active Support version 3.2.13 Middleware Rack::Cache, ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x00000002192010>, 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 /usr/share/redmine Environment production Database adapter postgresql Database schema version 20130217094251
Updated by Ondřej Surý almost 12 years ago
Ok, I have nailed it down to 30801ca9, which makes to shellout fail when log file is not writeable.
The shellout command dies without an explicit notice/traceback, which makes it very hard to debug.
I am not sure while the stderr is logged in any environment (not just development), but when you do, you should probably create the file from Ruby to ensure correct permissions, etc. and then write to it from shell, so error like this can be caught before the shell is run.
Updated by Jean-Philippe Lang almost 12 years ago
- Subject changed from Regression in git repository to Can't access SCM when log/production.scm.stderr.log is not writable
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 2.3.1
- Resolution set to Fixed
stderr is now logged only when log level is set to debug (r11680). Thanks for pointing this out.