Content
MySQL2 error connection ruby
Added by Vi Vitaliy about 6 years ago
Hello. Just installed openproject on my AWS, ubuntu 18.04 server edition. Launch "openproject configure", at the end of the script, an error pops up. While at the beginning the script checks the connection with the mysql, everything is OK, the database exists. No idea what to do next.
* * * * * * * * * * * * * * * * * * * * * * * * *
* OpenProject requires UTF-8 encoding set on MySQL < 5.7 *
and UTF-8mb4 beyond that. Please ensure having set
* *
production:
* encoding: utf8mb4 *
* in config/database.yml. *
Otherwise, you WILL run into encoding issue when using 4 byte
* UTF-8 characters since utf8 encoding in MySQL doesn't support them. *
* If you have been running utf8 in the past, please see this guide *
on how to convert your database:
* https://mathiasbynens.be/notes/mysql-utf8mb4 *
* * * * * * * * * * * * * * * * * * * * * * * * *
rake aborted!
NameError: undefined local variable or method `override_msg' for main:Object
/opt/openproject/lib/tasks/database.rake:63:in `rescue in block (3 levels) in <top (required)>'
/opt/openproject/lib/tasks/database.rake:48:in `block (3 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/opt/openproject/bin/bundle:3:in `load'
/opt/openproject/bin/bundle:3:in `<main>'
Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error::ConnectionError: Can't connect to MySQL server on '127.0.0.1' (111): SELECT VERSION()
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `_query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `block in query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:214:in `block (2 levels) in execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:213:in `block in execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_adapter.rb:613:in `block (2 levels) in log'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block in log'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_adapter.rb:604:in `log'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:212:in `execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/mysql/database_statements.rb:26:in `execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:223:in `execute_and_free'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in `exec_query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:371:in `select'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:42:in `select_all'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/query_cache.rb:97:in `select_all'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/mysql/database_statements.rb:10:in `select_all'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `select_rows'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:54:in `select_value'
/opt/openproject/lib/open_project/database.rb:133:in `version'
/opt/openproject/lib/open_project/database.rb:75:in `check_version!'
/opt/openproject/lib/tasks/database.rake:49:in `block (3 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/opt/openproject/bin/bundle:3:in `load'
/opt/openproject/bin/bundle:3:in `<main>'
Caused by:
Mysql2::Error::ConnectionError: Can't connect to MySQL server on '127.0.0.1' (111)
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `_query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `block in query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:214:in `block (2 levels) in execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:213:in `block in execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_adapter.rb:613:in `block (2 levels) in log'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block in log'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_adapter.rb:604:in `log'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:212:in `execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/mysql/database_statements.rb:26:in `execute'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:223:in `execute_and_free'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in `exec_query'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:371:in `select'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:42:in `select_all'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/query_cache.rb:97:in `select_all'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/mysql/database_statements.rb:10:in `select_all'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `select_rows'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:54:in `select_value'
/opt/openproject/lib/open_project/database.rb:133:in `version'
/opt/openproject/lib/open_project/database.rb:75:in `check_version!'
/opt/openproject/lib/tasks/database.rake:49:in `block (3 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/openproject/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/opt/openproject/bin/bundle:3:in `load'
/opt/openproject/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate => openproject:db:ensure_database_compatibility
(See full trace by running task with --trace)