Upgrade from 1.8 to 1.11.1 stalls

View: New views
13 Messages — Rating Filter:   Alert me  

Upgrade from 1.8 to 1.11.1 stalls

by Bracewell, Robert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert


Re: Upgrade from 1.8 to 1.11.1 stalls

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Robert,

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

regards,
Freddy



On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert



RE: Upgrade from 1.8 to 1.11.1 stalls

by Bracewell, Robert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 


Re: Upgrade from 1.8 to 1.11.1 stalls

by frankgilroy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

unsubscribe 

Frank Gilroy
http://frankgilroy.com



On Sat, Nov 14, 2009 at 3:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 



Re: Upgrade from 1.8 to 1.11.1 stalls

by Olivier Gaudin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier


On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 



RE: Upgrade from 1.8 to 1.11.1 stalls

by Bracewell, Robert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 


Re: Upgrade from 1.8 to 1.11.1 stalls

by Olivier Gaudin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier


On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 



Re: Upgrade from 1.8 to 1.11.1 stalls

by Olivier Gaudin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Robert,

Sorry about the confusion. I have looked more carefully at your initial log file. From what I can see, the migration was fine and the latest line in the log file should be : IncreaseProjectKeeSize: migrated
At that point did you try to launch http://localhost:9000 or when you saw that the connection time out in the browser ?

The error message you sent in your second email comes from the fact that somebody tried to access the server whilst it was migrating.

What I would recommend is to restore the database from dump, launch the setup and wait until you see the IncreaseProjectKeeSize: migrated in the console (will take around 4 hours and 40 minutes). Then and only then, try to browse http://localhost:9000

Olivier



On Mon, Nov 16, 2009 at 6:26 PM, Olivier Gaudin <gaudol@...> wrote:
Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier



On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 




RE: Upgrade from 1.8 to 1.11.1 stalls

by Bracewell, Robert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

So if a user tries to access the server while its migrating does this cause it to fail?

This test instance is used across our development centers in multiple countries so we have users hitting this from the command line, from Eclipse and from Hudson in some circumstances. Is there any setting I can enable to prevent such interfering with the upgrade?

 

--
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 9:45 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

Sorry about the confusion. I have looked more carefully at your initial log file. From what I can see, the migration was fine and the latest line in the log file should be : IncreaseProjectKeeSize: migrated
At that point did you try to launch http://localhost:9000 or when you saw that the connection time out in the browser ?

The error message you sent in your second email comes from the fact that somebody tried to access the server whilst it was migrating.

What I would recommend is to restore the database from dump, launch the setup and wait until you see the IncreaseProjectKeeSize: migrated in the console (will take around 4 hours and 40 minutes). Then and only then, try to browse http://localhost:9000

Olivier


On Mon, Nov 16, 2009 at 6:26 PM, Olivier Gaudin <gaudol@...> wrote:

Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier



On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 

 

 


Re: Upgrade from 1.8 to 1.11.1 stalls

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Robert,

On Mon, Nov 16, 2009 at 7:03 PM, Bracewell, Robert <rbracewe@...> wrote:

So if a user tries to access the server while its migrating does this cause it to fail?

Unhappily the answer is yes. We should provide a way to do this migration off-line (for instance when the Sonar server is restarted and before starting to listen to HTTP requests) but this is not the case right now.

This test instance is used across our development centers in multiple countries so we have users hitting this from the command line, from Eclipse and from Hudson in some circumstances. Is there any setting I can enable to prevent such interfering with the upgrade?

Here is a possible and simple workaround :
  • Stop your old sonar
  • Install your new sonar version
  • Edit the sonar.properties file in order to listen to a new unused HTTP port (like 81 instead of 80)
  • Start your new sonar version
  • Browse http://yoursonar:81/ and launch the DB migration 
  • Once the migration is done, stop your new sonar version
  • Edit the sonar.properties file on order to listen to your classical port (for instance 80)
  • Start your sonar
Hope it helps
Freddy

 

--
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 9:45 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

Sorry about the confusion. I have looked more carefully at your initial log file. From what I can see, the migration was fine and the latest line in the log file should be : IncreaseProjectKeeSize: migrated
At that point did you try to launch http://localhost:9000 or when you saw that the connection time out in the browser ?

The error message you sent in your second email comes from the fact that somebody tried to access the server whilst it was migrating.

What I would recommend is to restore the database from dump, launch the setup and wait until you see the IncreaseProjectKeeSize: migrated in the console (will take around 4 hours and 40 minutes). Then and only then, try to browse http://localhost:9000

Olivier


On Mon, Nov 16, 2009 at 6:26 PM, Olivier Gaudin <gaudol@...> wrote:

Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier



On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 

 

 



RE: Upgrade from 1.8 to 1.11.1 stalls

by Bracewell, Robert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

Do you want me to Jira the migration offline issue?

 

I’ll get a db refresh done and try another upgrade using the approach outlined below

 

Thanks,
Robert

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Monday, November 16, 2009 1:56 PM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

On Mon, Nov 16, 2009 at 7:03 PM, Bracewell, Robert <rbracewe@...> wrote:

So if a user tries to access the server while its migrating does this cause it to fail?

Unhappily the answer is yes. We should provide a way to do this migration off-line (for instance when the Sonar server is restarted and before starting to listen to HTTP requests) but this is not the case right now.

This test instance is used across our development centers in multiple countries so we have users hitting this from the command line, from Eclipse and from Hudson in some circumstances. Is there any setting I can enable to prevent such interfering with the upgrade?

Here is a possible and simple workaround :

  • Stop your old sonar
  • Install your new sonar version
  • Edit the sonar.properties file in order to listen to a new unused HTTP port (like 81 instead of 80)
  • Start your new sonar version
  • Browse http://yoursonar:81/ and launch the DB migration 
  • Once the migration is done, stop your new sonar version
  • Edit the sonar.properties file on order to listen to your classical port (for instance 80)
  • Start your sonar

Hope it helps

Freddy

 

--
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 9:45 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

Sorry about the confusion. I have looked more carefully at your initial log file. From what I can see, the migration was fine and the latest line in the log file should be : IncreaseProjectKeeSize: migrated
At that point did you try to launch http://localhost:9000 or when you saw that the connection time out in the browser ?

The error message you sent in your second email comes from the fact that somebody tried to access the server whilst it was migrating.

What I would recommend is to restore the database from dump, launch the setup and wait until you see the IncreaseProjectKeeSize: migrated in the console (will take around 4 hours and 40 minutes). Then and only then, try to browse http://localhost:9000

Olivier

On Mon, Nov 16, 2009 at 6:26 PM, Olivier Gaudin <gaudol@...> wrote:

Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier

 

On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 

 

 

 


Re: Upgrade from 1.8 to 1.11.1 stalls

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Mon, Nov 16, 2009 at 11:22 PM, Bracewell, Robert <rbracewe@...> wrote:

Do you want me to Jira the migration offline issue?


With pleasure Robert !

Freddy

 

 

I’ll get a db refresh done and try another upgrade using the approach outlined below

 

Thanks,
Robert

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Monday, November 16, 2009 1:56 PM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

On Mon, Nov 16, 2009 at 7:03 PM, Bracewell, Robert <rbracewe@...> wrote:

So if a user tries to access the server while its migrating does this cause it to fail?

Unhappily the answer is yes. We should provide a way to do this migration off-line (for instance when the Sonar server is restarted and before starting to listen to HTTP requests) but this is not the case right now.

This test instance is used across our development centers in multiple countries so we have users hitting this from the command line, from Eclipse and from Hudson in some circumstances. Is there any setting I can enable to prevent such interfering with the upgrade?

Here is a possible and simple workaround :

  • Stop your old sonar
  • Install your new sonar version
  • Edit the sonar.properties file in order to listen to a new unused HTTP port (like 81 instead of 80)
  • Start your new sonar version
  • Browse http://yoursonar:81/ and launch the DB migration 
  • Once the migration is done, stop your new sonar version
  • Edit the sonar.properties file on order to listen to your classical port (for instance 80)
  • Start your sonar

Hope it helps

Freddy

 

--
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 9:45 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

Sorry about the confusion. I have looked more carefully at your initial log file. From what I can see, the migration was fine and the latest line in the log file should be : IncreaseProjectKeeSize: migrated
At that point did you try to launch http://localhost:9000 or when you saw that the connection time out in the browser ?

The error message you sent in your second email comes from the fact that somebody tried to access the server whilst it was migrating.

What I would recommend is to restore the database from dump, launch the setup and wait until you see the IncreaseProjectKeeSize: migrated in the console (will take around 4 hours and 40 minutes). Then and only then, try to browse http://localhost:9000

Olivier

On Mon, Nov 16, 2009 at 6:26 PM, Olivier Gaudin <gaudol@...> wrote:

Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier

 

On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert

 

 

 

 

 



RE: Upgrade from 1.8 to 1.11.1 stalls

by Bracewell, Robert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

The upgrade completed successfully using the workaround

 

I have created a Jira

 

Thanks,
Robert

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Monday, November 16, 2009 2:25 PM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

 

On Mon, Nov 16, 2009 at 11:22 PM, Bracewell, Robert <rbracewe@...> wrote:

Do you want me to Jira the migration offline issue?

 

With pleasure Robert !

 

Freddy

 

 

 

I’ll get a db refresh done and try another upgrade using the approach outlined below

 

Thanks,
Robert

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Monday, November 16, 2009 1:56 PM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

On Mon, Nov 16, 2009 at 7:03 PM, Bracewell, Robert <rbracewe@...> wrote:

So if a user tries to access the server while its migrating does this cause it to fail?

Unhappily the answer is yes. We should provide a way to do this migration off-line (for instance when the Sonar server is restarted and before starting to listen to HTTP requests) but this is not the case right now.

This test instance is used across our development centers in multiple countries so we have users hitting this from the command line, from Eclipse and from Hudson in some circumstances. Is there any setting I can enable to prevent such interfering with the upgrade?

Here is a possible and simple workaround :

  • Stop your old sonar
  • Install your new sonar version
  • Edit the sonar.properties file in order to listen to a new unused HTTP port (like 81 instead of 80)
  • Start your new sonar version
  • Browse http://yoursonar:81/ and launch the DB migration 
  • Once the migration is done, stop your new sonar version
  • Edit the sonar.properties file on order to listen to your classical port (for instance 80)
  • Start your sonar

Hope it helps

Freddy

 

--
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 9:45 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

Sorry about the confusion. I have looked more carefully at your initial log file. From what I can see, the migration was fine and the latest line in the log file should be : IncreaseProjectKeeSize: migrated
At that point did you try to launch http://localhost:9000 or when you saw that the connection time out in the browser ?

The error message you sent in your second email comes from the fact that somebody tried to access the server whilst it was migrating.

What I would recommend is to restore the database from dump, launch the setup and wait until you see the IncreaseProjectKeeSize: migrated in the console (will take around 4 hours and 40 minutes). Then and only then, try to browse http://localhost:9000

Olivier

On Mon, Nov 16, 2009 at 6:26 PM, Olivier Gaudin <gaudol@...> wrote:

Oups, I thought you were on Oracle ! This issue only occurs on Oracle.

Hold on, I will get back to you

Olivier

 

On Mon, Nov 16, 2009 at 6:19 PM, Bracewell, Robert <rbracewe@...> wrote:

As far as I am aware the schema’s are on separate MySql servers. Our live schema lives on a completely different box to the test instance.

After this initially failed the first time I had the dba team restore the test instance from the live instance. I will have the dba team completely whack the test instance and restore from the live environment. Will this suffice?

 

When you say remove DBA rights can you expand so I can pass on details to the dba team.

 

Thanks,
Robert

 

From: Olivier Gaudin [mailto:gaudol@...]
Sent: Monday, November 16, 2009 2:29 AM


To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hello Robert,

It looks like you are not encounteringa migration issue, but the fact that Sonar does not handle properly 2 schema of different version of Sonar... (SONAR-1165)
Do you confirm that you have 2 Sonar schema on the same Oracle instance ?

There is a work around : remove the DBA rights to your sonar users.

Olivier

On Sat, Nov 14, 2009 at 9:26 PM, Bracewell, Robert <rbracewe@...> wrote:

The sonar.log is reporting output below and the wrapper.log still hasn’t progressed any further.

Can I assume that its failed it’s been running since 1600 yesterday?

 

StandardError (An error has occurred, all later migrations canceled:

 

ActiveRecord::ActiveRecordError: Duplicate column name 'line': ALTER TABLE `rule_failures` ADD `line` integer(10)):

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'

    /gems/gems/activerecord-jdbc-adapter-0.9/lib/active_record/connection_adapters/jdbc_adapter.rb:581:in `execute'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:346:in `method_missing'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:326:in `say_with_time'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:342:in `method_missing'

    /config/../lib/../db/migrate//073_add_line_to_rule_failures.rb:23:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate'

    (__DELEGATION__):2:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'

    /gems/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'

    /config/../lib/database_version.rb:63:in `setup'

    /app/controllers/setup_controller.rb:43:in `setup_database'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in `call_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in `perform_action_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    file:/lib/jruby-complete-1.3.1.jar!/benchmark.rb:293:in `measure'

    /gems/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'

    /gems/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in `perform_action_with_rescue'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action_with_caching'

    /gems/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'

    /gems/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in `cache'

    /gems/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action_with_caching'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in `process_with_filters'

    /gems/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in `process_with_session_management_support'

    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:120:in `dispatch'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'

    /gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails_cgi.rb:24:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:35:in `serve_rails'

    file:/lib/jruby-rack-0.9.4.jar!/rack/adapter/rails.rb:40:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/jruby/rack/rails.rb:144:in `call'

    file:/lib/jruby-rack-0.9.4.jar!/rack/handler/servlet.rb:17:in `call'

    :1

 

2009.11.13 20:26:12 ERROR rails

 

NativeException (javax.persistence.PersistenceException: [PersistenceUnit: sonar] Unable to build EntityManagerFactory):

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: Saturday, November 14, 2009 4:17 AM
To: user@...
Subject: Re: [sonar-user] Upgrade from 1.8 to 1.11.1 stalls

 

Hi Robert,

 

By migrating from Sonar 1.8 to Sonar 1.11, you're making a big jump which can take time if you've lot of projects. According to the log file, the SQL migration is running and is not finished. Could you replay the migration and before doing anything else, see what happens on DB side : pending SQL request, lock on table, ... In your case, I'm pretty sure the migration should take at least 1 hour.

 

regards,

Freddy

 

 

On Sat, Nov 14, 2009 at 7:11 AM, Bracewell, Robert <rbracewe@...> wrote:

Hi,

 

I have tried to upgrade our test instance from 1.8 to 1.11.1 twice now with no success.

I followed the instructions detailed at http://docs.codehaus.org/display/SONAR/Install+Sonar#InstallSonar-Upgradeguide but each time upgrade seems to stall and reports Sonar (404) in the browser.

 

After the first failure the db was restored with a copy of the live db and an upgrade performed again. The contents of the log are:

STATUS | wrapper  | 2009/11/13 15:50:55 | --> Wrapper Started as Daemon

STATUS | wrapper  | 2009/11/13 15:50:55 | Java Service Wrapper Community Edition 3.3.0

STATUS | wrapper  | 2009/11/13 15:50:55 |   Copyright (C) 1999-2008 Tanuki Software, Inc.  All Rights Reserved.

STATUS | wrapper  | 2009/11/13 15:50:55 |     http://wrapper.tanukisoftware.org

STATUS | wrapper  | 2009/11/13 15:50:55 |

STATUS | wrapper  | 2009/11/13 15:50:55 | Launching a JVM...

INFO   | jvm 1    | 2009/11/13 15:50:56 | WrapperManager: Initializing...

INFO   | jvm 1    | 2009/11/13 15:51:23 | 2009.11.13 15:51:23 INFO   Sonar started: http://0.0.0.0:9000/

INFO   | jvm 1    | 2009/11/13 15:51:41 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 15:51:41 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 59.6460s

INFO   | jvm 1    | 2009/11/13 15:52:41 |    -> 2558631 rows

INFO   | jvm 1    | 2009/11/13 16:14:42 | ==  AddLineToRuleFailures: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 16:14:42 | -- add_column(:rule_failures, :line, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  AddLineToRuleFailures: migrated (16407.9170s) =============================

INFO   | jvm 1    | 2009/11/13 20:25:09 |

INFO   | jvm 1    | 2009/11/13 20:25:09 | ==  DropRuleFailureParams: migrating ==========================================

INFO   | jvm 1    | 2009/11/13 20:25:09 | -- remove_index(:rule_failure_params, {:name=>"rule_fail_params_fail_id"})

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 32.8730s

INFO   | jvm 1    | 2009/11/13 20:25:42 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:25:42 | -- remove_index(:rule_failure_params, {:name=>"rule_fails_params_snap"})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 24.2820s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 2559393 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- drop_table(:rule_failure_params)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  DropRuleFailureParams: migrated (57.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrating =============================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  ResetTendencyDepth: migrated (0.0020s) ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrating =======================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:properties, :text_value, :text, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0060s

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 5 rows

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- remove_column(:properties, :prop_value)

INFO   | jvm 1    | 2009/11/13 20:26:06 |    -> 0.0050s

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  UpgradePropertiesToBlobs: migrated (0.0610s) ==============================

INFO   | jvm 1    | 2009/11/13 20:26:06 |

INFO   | jvm 1    | 2009/11/13 20:26:06 | ==  AddCopyResourceIdToProjects: migrating ====================================

INFO   | jvm 1    | 2009/11/13 20:26:06 | -- add_column(:projects, :copy_resource_id, :integer, {:null=>true})

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 0.9580s

INFO   | jvm 1    | 2009/11/13 20:26:07 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  AddCopyResourceIdToProjects: migrated (0.9580s) ===========================

INFO   | jvm 1    | 2009/11/13 20:26:07 |

INFO   | jvm 1    | 2009/11/13 20:26:07 | ==  IncreaseProjectKeeSize: migrating =========================================

INFO   | jvm 1    | 2009/11/13 20:26:07 | -- change_column("projects", "kee", :string, {:limit=>400})

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 2.1620s

INFO   | jvm 1    | 2009/11/13 20:26:09 |    -> 32047 rows

INFO   | jvm 1    | 2009/11/13 20:26:09 | ==  IncreaseProjectKeeSize: migrated (2.1620s) ================================

INFO   | jvm 1    | 2009/11/13 20:26:09 |

 

Any pointers appreciated J

 

Thanks,
Robert