Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed PostgreSQL on Ubuntu and created a database.

Now, when my app tries to connect to an RDMS via localhost ( 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
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


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.