daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Mysql2::Error::ConnectionError: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  2. bin/rails:9:in `<main>'
  3. Tasks: TOP => db:migrate
  4.    
  5. ** Invoke db:migrate (first_time)
  6. ** Invoke db:load_config (first_time)
  7. ** Invoke environment (first_time)
  8. ** Execute environment
  9. Rails Error: Unable to access log file. Please ensure that /var/app/current/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /var/app/current/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
  10. ** Execute db:load_config
  11. ** Execute db:migrate
  12. rails aborted!
  13. Mysql2::Error::ConnectionError: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  14. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:90:in `connect'
  15. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:90:in `initialize'
  16. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `new'
  17. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
  18. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:811:in `new_connection'
  19. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:855:in `checkout_new_connection'
  20. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:834:in `try_to_checkout_new_connection'
  21. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:795:in `acquire_connection'
  22. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:in `checkout'
  23. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
  24. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:1010:in `retrieve_connection'
  25. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
  26. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:90:in `connection'
  27. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
  28. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
  29. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
  30. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
  31. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
  32. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
  33. /opt/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
  34. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
  35. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
  36. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
  37. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
  38. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
  39. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
  40. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
  41. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
  42. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
  43. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
  44. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
  45. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:48:in `invoke'
  46. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<main>'
  47. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
  48. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
  49. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
  50. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
  51. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
  52. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
  53. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
  54. /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
  55. bin/rails:9:in `<main>'
  56. Tasks: TOP => db:migrate
  57.    
  58. [ec2-user@rails]$ bundle info mysql2
  59.   * mysql2 (0.5.2)
  60.     Summary: A simple, fast Mysql library for Ruby, binding to libmysql
  61.     Homepage: https://github.com/brianmario/mysql2
  62.     Path: /opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2
  63.    
  64. RDS_HOSTNAME=nework.XXXXXXXXXXXXXXXX.ap-southeast-1.rds.amazonaws.com
  65. HOSTNAME=ip-172-31-XX-XXX
  66. RDS_DB_NAME=nework
  67. GEM_HOME=/home/ec2-user/.gem/ruby/2.5.3
  68. EC2_AMITOOL_HOME=/opt/aws/amitools/ec2
  69. SSH_CLIENT=117.2.XXX.XXX 36150 22
  70. BUNDLE_WITHOUT=test:development
  71. USER=ec2-user
  72. RDS_PASSWORD=XXXXXXXXXXXXXX
  73. RDS_USERNAME=dbadmin
  74. RAILS_SKIP_MIGRATIONS=true
  75. RACK_ENV=production
  76. PATH=/home/ec2-user/.gem/ruby/2.5.3/bin:/opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/bin:/opt/rubies/ruby-2.5.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin
  77. SECRET_KEY_BASE=XXXXX
  78. RUBY_ENGINE=ruby
  79. RAILS_ENV=production
  80. AWS_PATH=/opt/aws
  81. GEM_ROOT=/opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0
  82. GEM_PATH=/home/ec2-user/.gem/ruby/2.5.3:/opt/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0
  83. SSH_CONNECTION=117.2.XXX.XXX 36150 172.31.XX.XX 22
  84. RUBY_ROOT=/opt/rubies/ruby-2.5.3
  85. RAILS_SKIP_ASSET_COMPILATION=false
  86. RUBY_VERSION=2.5.3
  87. _=/usr/bin/printenv
  88.    
  89. #  
  90. #  
  91.   default: &default
  92.     adapter: mysql2
  93.     encoding: utf8
  94.     host: localhost  
  95.     pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  96.     username: <%= ENV.fetch('RDS_USERNAME') { 'dbadmin'} %>
  97.     password: <%= ENV.fetch('RDS_PASSWORD') { 'password'}%>
  98.  
  99.   development:
  100.     <<: *default
  101.     socket: <%= ENV.fetch('DB_SOCKET') { '/tmp/mysqld.sock'}%>
  102.     database: <%= ENV.fetch('RDS_DB_NAME') { 'neuework'}%>
  103.  
  104.   test:
  105.     <<: *default
  106.     database: neuwork_test
  107.     socket: <%= ENV.fetch('DB_SOCKET') { '/tmp/mysqld.sock'}%>
  108.  
  109.   production:
  110.     <<: *default
  111.     host: <%= ENV['RDS_HOSTNAME'] %>
  112.     database: <%= ENV['RDS_DB_NAME'] %>
  113.     password: <%= ENV['RDS_PASSWORD'] %>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top