1
无法从EC2(弹性beanstalk)连接到RDS PostgreSQL 9.3数据库。环境是使用Elastic Beanstalk v3 CLI与PostgreSQL 9.3.5,Puma(Ruby 2.1),Rails 4.1.6创建的。 postgresql93-devel的已成功安装百胜通过.ebextensions/postgres.config:AWS ElasticBeanstalk EC2到RDS postgresql连接
packages:
yum:
postgresql93-devel: []
SECRET_KEY_BASE已通过控制台添加到环境表。
获取有关耙分贝以下错误:EB部署过程中迁移:
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
RDS_HOSTNAME,RDS_DATABSE,RDS_USER_NAME,RDS_PASSWORD:在轨控制台通过ssh'ing到EC2中的所有验证。
的config/database.yml中:
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5
production:
<<: *default
database: <%= ENV['RDS_DB_NAME'] %>
username: <%= ENV['RDS_USERNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
hostname: <%= ENV['RDS_HOSTNAME'] %>
port: <%= ENV['RDS_PORT'] %>
有什么想法?