Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed PostgreSQL 9.1 on ubuntu 12.04 64-bit. I try to run Aplication Stack Builder and install pgAgent.

At first I am asked for root password, which I provide, after I choose PostgreSQL 9.1 on port 5433 as the only option. On next screen I tick pgAgent and click Next a few times to get to the Setup screen with verification the postgradeSQL installation details. The Host is local, the User Name is postgres and I type my password for postgrade which I use when open pgAdmin III. When I click next I have a warning:

psql.bin: could not connect to server: Connection refused

Is the server running on host "localhost" (127.0.0.1) 
  and accepting TCP/IP connection on port 5432?

When I try pgAdmin it does work with password I provide but it looks for me like this password is not accepted by Stack Builder. I also provide my root password on the beginning so it should be able to do everything with sudo privilege. I don't know what to do now and what is the problem. Should I run something else before Stack Builder?

I know it seems like password problem but I tried all and it is not a simple password case. Did anyone have similar problem or know what to do?

share|improve this question
    
Cross-post of dba.stackexchange.com/questions/28498/… . Please cross-link or don't cross-post. –  Craig Ringer Nov 11 '12 at 3:07
add comment

1 Answer

up vote 1 down vote accepted

PgAgent-III and psql can use unix socket connections, while it looks like StackBuilder is using TCP/IP. Does:

psql -h 127.0.0.1 postgres

produce the same error? If so, check postgresql.conf and see what listen_addresses is set to; it might be set not to listen on TCP/IP. See the documentation for details and how to change it: Runtime configuration parameters

If the port directive in postgresql.conf is set to port other than the default port 5432 - say 5433 - you must specify that everywhere you connect. For example:

psql -h 127.0.0.1 -p 5433 postgres
share|improve this answer
add comment

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.