Project

General

Profile

Internal server errors after migrate from Trac

Added by Alexander Sapozhnikov about 14 years ago

I've try to migrate project from Trac 0.11.7 as shown in RedmineMigrate to Redmine 1.0.2. Data was successfully copied but I saw some problems:
  1. New field «Resolution» appears in Issues (I remove that field).
  2. Some pages in Redmine now doesn't work (Issue list, Migrated issues) — I see Internal Server error, but new issues, which made after migration, shows correctly.

I see in log/production.log:

Processing IssuesController#index (for MY.IP.HERE at 2010-10-11 13:36:41) [GET]
  Parameters: {"project_id"=>"PROJECTNAME", "action"=>"index", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/index.rhtml

ActionView::TemplateError (comparison of Fixnum with nil failed) 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:24: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:84
    app/controllers/issues_controller.rb:83:in `index'
    thin (1.2.4) lib/thin/connection.rb:76:in `pre_process'
    thin (1.2.4) lib/thin/connection.rb:74:in `catch'
    thin (1.2.4) lib/thin/connection.rb:74:in `pre_process'
    thin (1.2.4) lib/thin/connection.rb:57:in `process'
    thin (1.2.4) lib/thin/connection.rb:42:in `receive_data'
    eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
    eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
    thin (1.2.4) lib/thin/backends/base.rb:57:in `start'
    thin (1.2.4) lib/thin/server.rb:156:in `start'
    thin (1.2.4) lib/thin/controllers/controller.rb:80:in `start'
    thin (1.2.4) lib/thin/runner.rb:174:in `send'
    thin (1.2.4) lib/thin/runner.rb:174:in `run_command'
    thin (1.2.4) lib/thin/runner.rb:140:in `run!'
    thin (1.2.4) bin/thin:6
    /usr/local/bin/thin:19:in `load'
    /usr/local/bin/thin:19

Rendering /usr/local/www/redmine/public/500.html (500 Internal Server Error)

I make migration procedure:
rake db:migrate RAILS_ENV=production 
(in /usr/local/www/redmine)

rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production 
(in /usr/local/www/redmine)
Cannot find old migration table - assuming nothing needs to be done

rake db:migrate_plugins RAILS_ENV=production
(in /usr/local/www/redmine)
Migrating engines...
Migrating acts_as_activity_provider...
Migrating acts_as_attachable...
Migrating acts_as_customizable...
Migrating acts_as_event...
Migrating acts_as_list...
Migrating acts_as_rated...
Migrating acts_as_searchable...
Migrating acts_as_taggable_on_steroids...
Migrating acts_as_tree...
Migrating acts_as_versioned...
Migrating acts_as_viewed...
Migrating acts_as_watchable...
Migrating awesome_nested_set...
Migrating classic_pagination...
Migrating coderay-0.9.2...
Migrating gravatar...
Migrating menu_link...
Migrating open_id_authentication...
Migrating prepend_engine_views...
Migrating redmine_knowledgebase...
Migrating redmine_opensearch...
Migrating rfpdf...
Migrating ruby-net-ldap-0.0.4...

I restart server, but this restart didn't help.
I've try clear cache:

rake tmp:cache:clear
rake tmp:sessions:clear
and restart server again, but errors still remains.


Replies (4)

RE: Internal server errors after migrate from Trac - Added by Alexander Sapozhnikov about 14 years ago

I found fields lft and rgt in table issues are NULL for migrated issues and not NULL for other (new and old) ones.

I fix it:

mysql> UPDATE issues SET lft=1 WHERE lft IS NULL;
Query OK, 11 rows affected (0.04 sec)
Rows matched: 11  Changed: 11  Warnings: 0

mysql> UPDATE issues SET rgt=2 WHERE rgt IS NULL;
Query OK, 11 rows affected (0.03 sec)
Rows matched: 11  Changed: 11  Warnings: 0
Now I can see issue list at http://SITE/projects/PROJECTNAME/issues and issues.

Now problem is solved. But when I will make next migration, I'll see this bug again? I saw lib/tasks/migrate_from_trac.rake but I saw no occurrences of lft and rgt fields.

I've use Redmine 1.0.2 under FreeBSD 7.2 (upgraded 1 week ago via portupgrade).

Sometimes when I edit imported tasks redmine hangs: process ruby18 eats CPU and memory.

RE: Internal server errors after migrate from Trac - Added by Alexander Sapozhnikov about 14 years ago

I execute:

mysql> UPDATE issues SET root_id=id WHERE root_id IS NULL;
Now Redmine work better and not hangs.

RE: Internal server errors after migrate from Trac - Added by Felix Schäfer about 14 years ago

Could you open a ticket for that please? Thanks.

Re: ticket for that - Added by Alexander Sapozhnikov almost 14 years ago

#6632 Incomplete migration from Trac to Redmine

    (1-4/4)