Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed PostgreSQL on Ubuntu and created a database.

Now, when my app tries to connect to an RDMS via localhost (127.0.0.1) tcp connection, I get an error.

Which command can I use to see on what endpoints does PostgreSQL engine listens for incoming connections?

share|improve this question
    
What's the text of the error? –  gsiems Sep 28 '11 at 18:39

1 Answer 1

up vote 0 down vote accepted
sudo netstat -lnp

and then look for the postgres processes.

Since listening on localhost is the default for PostgreSQL, chances are your package decided to use a nonstandard port.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.