Project

General

Profile

Actions

Defect #4784

closed

Upgrade failed from 0.8.7 to 0.9.2 at "rake db:migrate"

Added by Oana VIGY almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-02-09
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi,

I try to upgrade Redmine from 0.8.7 to 0.9.2 but it failed at the database migration step "rake db:migrate RAILS_ENV=production" (see error message below).

Before the Redmine upgrade, I just upgraded rails as required.

Not only I'm not able to upgrade Redmine to 0.9.2, I'm no more able to re-install Redmine 0.8.7 from scratch as the same problem appears. It is quite stressful.

I didn't see any message on that problem.

Configuration
  • ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
  • rack (1.0.1)
  • rails (2.3.5)
  • rake (0.8.3)
  • mysql
[root@ppfm redmine_ppfm]# rake db:migrate RAILS_ENV=production --trace
(in /home/httpd/redmine_ppfm)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql::ProtocolError: invalid packet: sequence number mismatch(3 != 1(expected)): SET NAMES 'utf8'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:599:in `configure_connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:594:in `connect'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
/home/httpd/redmine_ppfm/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name'
/home/httpd/redmine_ppfm/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set'
/home/httpd/redmine_ppfm/app/models/project.rb:54
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load_without_engine_additions'
/home/httpd/redmine_ppfm/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:in `const_missing'
/home/httpd/redmine_ppfm/app/models/attachment.rb:36
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load_without_engine_additions'
/home/httpd/redmine_ppfm/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable'
/home/httpd/redmine_ppfm/app/models/message.rb:22
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load_without_engine_additions'
/home/httpd/redmine_ppfm/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/inflector.rb:361:in `constantize'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/inflector.rb:360:in `each'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/inflector.rb:360:in `constantize'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/observer.rb:157:in `observed_class'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/observer.rb:183:in `observed_classes'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/observer.rb:166:in `initialize'
/usr/local/lib/ruby/1.8/singleton.rb:94:in `new'
/usr/local/lib/ruby/1.8/singleton.rb:94:in `instance'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/observer.rb:38:in `instantiate_observers'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `each'
/home/httpd/redmine_ppfm/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `instantiate_observers'
/home/httpd/redmine_ppfm/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `call'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `evaluate_method'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `send'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
/home/httpd/redmine_ppfm/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:in `send'
/home/httpd/redmine_ppfm/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
/home/httpd/redmine_ppfm/config/../vendor/rails/railties/lib/initializer.rb:631:in `prepare_dispatcher'
/home/httpd/redmine_ppfm/config/../vendor/rails/railties/lib/initializer.rb:185:in `process'
/home/httpd/redmine_ppfm/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/home/httpd/redmine_ppfm/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/home/httpd/redmine_ppfm/config/environment.rb:20
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/httpd/redmine_ppfm/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/home/httpd/redmine_ppfm/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

Thanks for your help,

Oana

Actions #1

Updated by Jean-Philippe Lang almost 15 years ago

Can not reproduce. Can you try to update your mysql gem?

Actions #2

Updated by Oana VIGY almost 15 years ago

I tried several things

1. I first tried "gem install mysql" but it failed

[root@ppfm ~]# gem install --verbose mysql
GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://production.s3.rubygems.org/latest_specs.4.8.gz
Installing gem mysql-2.8.1
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/COPYING
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/COPYING.ja
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/History.txt
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/Manifest.txt
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/README.txt
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/Rakefile
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/extconf.rb
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mysql.c
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/extra/README.html
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/extra/README_ja.html
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/extra/tommy.css
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/lib/mysql.rb
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/tasks/gem.rake
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/tasks/native.rake
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/tasks/vendor_mysql.rake
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/test/test_mysql.rb
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/bin/ruby
        --with-mysql-config
        --without-mysql-config

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

2. Then, I found this command which go through (CentOS distribution):
I first uninstall mysql and co.

$ sudo yum install gcc mysql mysql-devel
$ sudo gem install mysql -- \
--with-mysql-include=/usr/include/mysql \
--with-mysql-lib=/usr/lib/mysql

gem list displays:

mysql (2.8.1)

Unfortunatly, the problem remains as yesterday when I try to migrate the database...

Actions #3

Updated by Dave E almost 15 years ago

My "gem install --verbose mysql" works properly.
Actually....
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...
No definition for next_result
No definition for field_name

Only the documentation is giving some errors.

When I run
@(in /www/html/.............kkkkkkkk..........)
rake aborted!
Mysql::ProtocolError: invalid packet: sequence number mismatch(3 != 1(expected)): SET NAMES 'utf8'

(See full trace by running task with --trace)@

Actions #4

Updated by Jean-Philippe Lang almost 15 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Sorry but it doesn't look like a Redmine defect.

Actions

Also available in: Atom PDF