Internal error trying to list issues or view a specific issue
Added by Carl Helmertz almost 14 years ago
Hello!
After upgrading Redmine from 0.9.something to 1.1.1, I have a problem with "issues". I can browse every project and all other pages, except the two dedicated views listing issues and view a issue.
I can see the issue in the outline for a project's activity but when clicking on it - Internal Error (500). I have a bit of a problem to find the error in any logs as well. I'm using Ubuntu and Apache with this vhost:
$ cat /etc/apache2/sites-available/redmine.dev
<VirtualHost *:80>
ServerAdmin developers@blbalblab
ServerName redmine.dev
DocumentRoot /var/www/redmine/public
ErrorLog /var/log/redmine_error.log
LogLevel debug
<Directory /var/www/redmine/>
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
</VirtualHost>
Tailing that error log doesn't mention anything about a 500 which seems weird to be, tailing /var/log/apache2/error.log gives me nothing either.
This is the excerpt from script/about:
balbal@blaba:/var/www/redmine$ RAILS_ENV=production script/about
/var/www/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.4.1
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /var/www/redmine
Environment production
Database adapter mysql
Database schema version 20101114115359
Also, I think that my colleague installed Passenger if that matters.
Cheers!
//Carl
Replies (17)
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
Is there a log/production.log
in your Redmine directory ?
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
Etienne E Massip:
Hi!
You are correct, I was checking /var/log/redmine/default/production.log for some reason.
Checking the correct file:
$ tail -f /var/www/redmine/log/production.log -n 0
Processing IssuesController#index (for 62.119.100.69 at 2011-02-22 10:40:15) [GET]
Parameters: {"project_id"=>"forever", "action"=>"index", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/index.rhtml
ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #16 of app/views/issues/_list.rhtml:
13: </tr></thead>
14: <% previous_group = false >
15: <tbody>
16: < issue_list(issues) do |issue, level| ->
17: < if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group >
18: < reset_cycle %>
19: <tr class="group open">
app/helpers/issues_helper.rb:28:in `issue_list'
app/helpers/issues_helper.rb:23:in `each'
app/helpers/issues_helper.rb:23:in `issue_list'
app/views/issues/_list.rhtml:16
app/views/issues/_list.rhtml:1:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
app/views/issues/index.rhtml:63:in `_run_rhtml_app47views47issues47index46rhtml'
app/controllers/issues_controller.rb:91
app/controllers/issues_controller.rb:90:in `index'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61
Rendering /var/www/redmine/public/500.html (500 Internal Server Error)
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
I tried to remove the - on line 16 but I guess the same error, even though the - is not in the file anymore. Is it cached perhaps? This is the error log after I removed the - and restarted apache (notice the weird error):
$ tail -f log/production.log -n 0
Processing IssuesController#index (for 62.119.100.69 at 2011-02-22 10:47:25) [GET]
Parameters: {"project_id"=>"forever", "action"=>"index", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/index.rhtml
ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #16 of app/views/issues/_list.rhtml:
13: </tr></thead>
14: <% previous_group = false >
15: <tbody>
16: < issue_list(issues) do |issue, level| >
17: < if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group >
18: < reset_cycle %>
19: <tr class="group open">
app/helpers/issues_helper.rb:28:in `issue_list'
app/helpers/issues_helper.rb:23:in `each'
app/helpers/issues_helper.rb:23:in `issue_list'
app/views/issues/_list.rhtml:16
app/views/issues/_list.rhtml:1:in `_run_rhtml_app47views47issues47_list46rhtml_locals_issues_list_object_query'
app/views/issues/index.rhtml:63:in `_run_rhtml_app47views47issues47index46rhtml'
app/controllers/issues_controller.rb:91
app/controllers/issues_controller.rb:90:in `index'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61
Rendering /var/www/redmine/public/500.html (500 Internal Server Error)
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
Already seen that not a long time ago.
I think you forgot to run db:migrate rake task.
See RedmineUpgrade.
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
I thought I had the updates right but tried again. Does this look correct?
$ rake RAILS_ENV=production db:migrate --trace(in /var/www/redmine)
- Invoke db:migrate (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute db:migrate
- Invoke db:schema:dump (first_time)
- Invoke environment
- Execute db:schema:dump
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
Forgot to mention: the error still exists even after the db:migrate
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
issues
table :
- either columns
root_id
,lft
andrgt
do not exist => should be a db:migrate issue - or these columns contain Null values => should be a data export/import issue
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
Your second statement is true: or these columns contain Null values => should be a data export/import issue
Do I need to manually fill these in?
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
You can only if you don't have any subtasks.
In this case, root_id
= id
, lft
= 1 and rgt
= 2 :
UPDATE issues SET root_id = id, lft = 1, rgt = 2 WHERE COALESCE(root_id, lft, rgt) IS NULL
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
That SQL-query worked very well, thank you Etienne E. Problem solved.
If this is a migration bug, perhaps it should be fixed somewhere. The migration performed was 0.9.3 -> 1.1.1.
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
Here is the migration file : source:trunk/db/migrate/20100313132032_add_issues_nested_sets_columns.rb
It both adds the hierarchy columns and update them for all existing issues.
Is it possible that you ran db:migrate on the empty db before re-importing the dump ?
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
Actually, I never had an empty db, instead of dumping/re-importing I just dumped a backup and went on with the install.
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
Did you use some kind of issue hierarchy plugin with 0.9.3 or did you apply one of the patches posted with #443 ?
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
I don't think so, but I did download a fresh install of the new redmine version, rewrote rules to use that one; and imported database.yml into the new one, so the "migration" was manually done.
I don't believe we've had more plugins before, than the current lineup:
cts_as_activity_provider acts_as_tree gravatar
acts_as_attachable acts_as_versioned open_id_authentication
acts_as_customizable acts_as_watchable prepend_engine_views
acts_as_event awesome_nested_set rfpdf
acts_as_list classic_pagination ruby-net-ldap-0.0.4
acts_as_searchable engines
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
Readable:
acts_as_activity_provider
acts_as_attachable
acts_as_customizable
acts_as_event
acts_as_list
acts_as_searchable
acts_as_tree
acts_as_versioned
acts_as_watchable
awesome_nested_set
classic_pagination
engines
gravatar
open_id_authentication
prepend_engine_views
rfpdf
ruby-net-ldap-0.0.4
RE: Internal error trying to list issues or view a specific issue - Added by Carl Helmertz almost 14 years ago
Thanks a lot anyways for helping me, you saved my day!
Cheers
//Carl
RE: Internal error trying to list issues or view a specific issue - Added by Etienne Massip almost 14 years ago
No problem. The only origin I can think of is that you already had these columns in your issues
table (because of a #443 patch ?) and that's why the update failed during migration.