Postgres error on Backtrack/Ubuntu: a Solution

Posted: April 7, 2010 in Backtrack, Linux, Ubuntu

Got this when played with Fastrack (updating etc):

FATAL:  could not load server certificate file “server.crt”:

msf > db_create pentest
[-] Warning: The db_create command is deprecated, use db_connect instead.
[-]          The database and schema will be created automatically by
[-]          db_connect. If db_connect fails to create the database, create
[-]          it manually with your DBMS’s administration tools.
createdb: could not connect to database postgres: 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”?
[-] Error while running command db_create: Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host “” and accepting
TCP/IP connections on port 5432?

And here’s my solution:

root@bt:/etc/ssl/certs# make-ssl-cert generate-default-snakeoil –force-overwrite
root@bt:/etc/ssl/certs# ls server.crt
ls: cannot access server*: No such file or directory
root@bt:/etc/ssl/certs# ls ssl-cert-snakeoil.pem
root@bt:/etc/ssl/certs# ln -s ssl-cert-snakeoil.pem server.crt
root@bt:/etc/ssl/certs# ls server.crt
root@bt:/etc/ssl/certs# /etc/init.d/postgresql-8.3 start
Starting PostgreSQL 8.3 database server: main.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s