error while deploy using capistrano

1.7k Views Asked by At

I got this error:

connection failed for: your slave db-server here (SocketError: getaddrinfo:
 Name or service not known), your primary db-server here (SocketError:
 getaddrinfo: Name or service not known), **********.***.** (Errno::ECONNREFUSED:
 Connection refused - connect(2))

While typing this command:

cap deploy:setup

I was using this site http://guides.beanstalkapp.com/deployments/deploy-with-capistrano.html.

How do I solve this error?

1

There are 1 best solutions below

0
On

Capistrano uses public and private keys to connect to the database server, even if it's on the same server as the deployed application. So you need to add the contents of ~/.ssh/id_rsa.pub (where your public key is stored) to your ~/.ssh/authorized_keys file, but at the end of the line, change the server name to "localhost"