ralli / migrate_from_bugzilla

bugzilla to redmine migration rake task
15 stars 14 forks source link

Error when trying to run the script on Redmine 2.2.3 #16

Open Eldadc opened 10 years ago

Eldadc commented 10 years ago

(in /var/www/redmine) rake aborted! Don't know how to build task 'db:migrate_from_bugzilla' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/task_manager.rb:49:in []' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:148:ininvoke_task' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in block (2 levels) in top_level' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:ineach' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:106:in block in top_level' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:115:inrun_with_threads' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:100:in top_level' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:78:inblock in run' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:75:inrun' /var/lib/gems/1.9.1/gems/rake-10.1.0/bin/rake:33:in <top (required)>' /usr/local/bin/rake:23:inload' /usr/local/bin/rake:23:in `

'

ralli commented 10 years ago

The tasks name is redmine:migrate_from_bugzilla (not db:migrate_from_bugzilla)

I tested the migration. I had to change the task to make it work with ruby 1.9. Pushed a fix.

Can you please try if rake redmine:migrate_from_bugzilla works? If you yield a similar result you can check if the task is properly installed by executing "rake -T | grep migrate"

HTH Ralph

Eldadc commented 10 years ago

Please review my issue, I tried to install bugzilla-adapter but got an error:

gem install activerecord-bugzilla-adapter ERROR: Could not find a valid gem 'activerecord-bugzilla-adapter' (>= 0) in any repository ERROR: Possible alternatives: activerecord-nulldb-adapter, activerecord-mysql2-adapter, ac


rake aborted! Please install the bugzilla adapter: gem install activerecord-bugzilla-adapter (cannot load such file -- active_record/conne ction_adapters/bugzilla_adapter) /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in require' /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inblock in require' /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in load_dependency' /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in resolve_hash_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:29:in spec' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in establish_connection' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:250:inblock in establish_connection' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:247:in each' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:247:inestablish_connection' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:515:in <module:BugzillaMigrate>' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:46:inblock (2 levels) in <top (required)> ' Tasks: TOP => redmine:migrate_from_bugzilla (See full trace by running task with --trace) root@redmine lib/tasks# gem install activerecord-bugzilla-adapter ERROR: Could not find a valid gem 'activerecord-bugzilla-adapter' (>= 0) in any repository ERROR: Possible alternatives: activerecord-nulldb-adapter, activerecord-mysql2-adapter, ac

On Sunday, December 1, 2013 11:25 PM, Ralph Juhnke notifications@github.com wrote:

The tasks name is redmine:migrate_from_bugzilla (not db:migrate_from_bugzilla) I tested the migration. I had to change the task to make it work with ruby 1.9. Pushed a fix. Can you please try if rake redmine:migrate_from_bugzilla works? If you yield a similar result you can check if the task is properly installed by executing "rake -T | grep migrate" HTH Ralph — Reply to this email directly or view it on GitHub.

Eldadc commented 10 years ago

Hi 

I managed to run it with mysql2 adapter , this is my error now:

Migrating profiles rake aborted! Can't connect to MySQL server on '192.168.18.137' (111) /var/lib/gems/1.9.1/gems/mysql2-0.3.13/lib/mysql2/client.rb:58:in connect' /var/lib/gems/1.9.1/gems/mysql2-0.3.13/lib/mysql2/client.rb:58:ininitialize' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in new' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql2_adapter.rb:16:inmysql2_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in new_con nection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:incheckou t_new_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in block ( 2 levels) in checkout' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:inloop' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in block i n checkout' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:incheckou t' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in block i n connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:inconnect ion' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in retriev e_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in retrieve_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:228:incolumns' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/model_schema.rb:237:in columns_hash' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/locking/optimistic.rb:129:inlocking_enabled?' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation.rb:170:in exec_queries' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation.rb:160:inblock in to_a' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/explain.rb:40:in logging_query_plan' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation.rb:159:into_a' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/relation/finder_methods.rb:159:in all' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/querying.rb:5:inall' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:269:in migrate_users' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:517:inmodule:BugzillaMigrate' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:46:in `block (2 levels) in <top (required)> ' Tasks: TOP => redmine:migrate_from_bugzilla (See full trace by running task with --trace) 

On Monday, December 2, 2013 9:58 AM, Eldad Cohen cohen_eldad@yahoo.com wrote:

Please review my issue, I tried to install bugzilla-adapter but got an error:

gem install activerecord-bugzilla-adapter ERROR: Could not find a valid gem 'activerecord-bugzilla-adapter' (>= 0) in any repository ERROR: Possible alternatives: activerecord-nulldb-adapter, activerecord-mysql2-adapter, ac


rake aborted! Please install the bugzilla adapter: gem install activerecord-bugzilla-adapter (cannot load such file -- active_record/conne ction_adapters/bugzilla_adapter) /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in require' /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inblock in require' /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in load_dependency' /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:inrequire' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in resolve_hash_connection' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:29:in spec' /var/lib/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in establish_connection' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:250:inblock in establish_connection' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:247:in each' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:247:inestablish_connection' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:515:in <module:BugzillaMigrate>' /var/www/redmine/lib/tasks/migrate_from_bugzilla-master/migrate_from_bugzilla.rake:46:inblock (2 levels) in <top (required)> ' Tasks: TOP => redmine:migrate_from_bugzilla (See full trace by running task with --trace) root@redmine lib/tasks# gem install activerecord-bugzilla-adapter ERROR: Could not find a valid gem 'activerecord-bugzilla-adapter' (>= 0) in any repository ERROR: Possible alternatives: activerecord-nulldb-adapter, activerecord-mysql2-adapter, ac

On Sunday, December 1, 2013 11:25 PM, Ralph Juhnke notifications@github.com wrote:

The tasks name is redmine:migrate_from_bugzilla (not db:migrate_from_bugzilla) I tested the migration. I had to change the task to make it work with ruby 1.9. Pushed a fix. Can you please try if rake redmine:migrate_from_bugzilla works? If you yield a similar result you can check if the task is properly installed by executing "rake -T | grep migrate" HTH Ralph — Reply to this email directly or view it on GitHub.

ralli commented 10 years ago

Have you been trying to connect to the mysql server from your machine via commandline?

The stack trace states the script cannot get a TCP/IP connection to the mysql service on host 192.168.18.137.

Eldadc commented 10 years ago

Hi,

Yes it is probably connection issue.
Can you tell please which user should grant permission to the db , the bugzilla user or redmine ?

Thanks

Sent from Yahoo Mail for iPhone

ralli commented 10 years ago

The connection in your stacktrace is against the bugzilla database.

The user connecting to the bugzilla database will need read permissions.

The user connecting to the redmine database will need write permissions. it will not create any new tables, so DDL-Statements will not be neccessary.