smart-contract-best-practices icon indicating copy to clipboard operation
smart-contract-best-practices copied to clipboard

setting up with elastic container service

Open EllaMozes opened this issue 3 years ago • 2 comments

Hello, we are trying to configure with AWS elastic container service (ECS), but receiving these errors:

2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:45:in `rescue in new_client'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:39:in `new_client'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:23:in `mysql2_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `public_send'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `new_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:926:in `checkout_new_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:905:in `try_to_checkout_new_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:866:in `acquire_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:1128:in `retrieve_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_handling.rb:327:in `retrieve_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_handling.rb:283:in `connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <main>'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:90:in `each'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <main>'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/sentry-ruby-core-5.3.1/lib/sentry/rake.rb:24:in `execute'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli/exec.rb:58:in `load'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli/exec.rb:58:in `kernel_load'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli/exec.rb:23:in `run'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli.rb:483:in `exec'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli.rb:31:in `dispatch'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli.rb:25:in `start'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/exe/bundle:48:in `block in <top (required)>'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/exe/bundle:36:in `<top (required)>'
2022-07-27 11:37:13/usr/local/bundle/bin/bundle:23:in `load'
2022-07-27 11:37:13/usr/local/bundle/bin/bundle:23:in `<main>'
2022-07-27 11:37:13Caused by:
2022-07-27 11:37:13Mysql2::Error::ConnectionError: Unknown MySQL server host 'mysql' (-2)
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/mysql2-0.5.4/lib/mysql2/client.rb:95:in `connect'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/mysql2-0.5.4/lib/mysql2/client.rb:95:in `initialize'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:40:in `new'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:40:in `new_client'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/mysql2_adapter.rb:23:in `mysql2_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `public_send'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `new_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:926:in `checkout_new_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:905:in `try_to_checkout_new_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:866:in `acquire_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:1128:in `retrieve_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_handling.rb:327:in `retrieve_connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_handling.rb:283:in `connection'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <main>'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:90:in `each'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <main>'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/sentry-ruby-core-5.3.1/lib/sentry/rake.rb:24:in `execute'
2022-07-27 11:37:13/opt/PasswordPusher/gemfiles/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli/exec.rb:58:in `load'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli/exec.rb:58:in `kernel_load'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli/exec.rb:23:in `run'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli.rb:483:in `exec'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli.rb:31:in `dispatch'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/cli.rb:25:in `start'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/exe/bundle:48:in `block in <top (required)>'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
2022-07-27 11:37:13/usr/local/bundle/gems/bundler-2.3.17/exe/bundle:36:in `<top (required)>'
2022-07-27 11:37:13/usr/local/bundle/bin/bundle:23:in `load'
2022-07-27 11:37:13/usr/local/bundle/bin/bundle:23:in `<main>'
2022-07-27 11:37:13Tasks: TOP => db:migrate
2022-07-27 11:37:13(See full trace by running task with --trace)
2022-07-27 11:37:13rake aborted!
2022-07-27 11:37:13ActiveRecord::ConnectionNotEstablished: Unknown MySQL server host 'mysql' (-2)

Is anyone tried this?

EllaMozes avatar Jul 27 '22 08:07 EllaMozes