jchem manager willl not connect after postgresql upgrade

User d4e43202ac

04-08-2012 15:05:34

I just upgraged from postgresql 8.4 to 9.1.  JchemManager will not connect now.  Connection refused.  Check that opstname and port are correct and that the poistmaster is accepting TCP/IP connections.  I can log into the database with psql.  Any thoughts?


 


CDD

ChemAxon aa7c50abf8

04-08-2012 15:42:57

Have you edited your postgresql.conf to include the following line:


listen_addresses = '*' 


?


P.

User d4e43202ac

05-08-2012 14:37:48

I took care of that, but it did not help.  Same result.

ChemAxon aa7c50abf8

05-08-2012 15:04:54

 I can log into the database with psql.

When running psql on a different (remote) host?


Which JChem version are you using?



User d4e43202ac

05-08-2012 17:19:35

Using localhost.  JChem version 5.8.  Thanks for the help.

ChemAxon 9c0afc9aaf

05-08-2012 17:29:24

I think the essence of Peter's question was:


Are you using psql from a different host than JChem Manager ?


Do you run both of them at the same machine where PostgreSQL resides ?


(just trying to make sure there is no misunderstanding)

User d4e43202ac

05-08-2012 21:34:11

I think I did misunderstand.  I ran psql from a terminal window.  JChemManager not involved.  Do I understand now, or not?  Sorry to be dense.

ChemAxon aa7c50abf8

06-08-2012 09:33:57

I have no problem connecting with JChemManager (GUI) 5.8.0 to a PostgreSQL database version 9.1. I think that either your JDBC connect string is not correct or your Postgres database is not listening at the port expected.


Please, could you send the JDBC connect string you are using.

User d4e43202ac

06-08-2012 14:48:40

url:  jdbc:postgresql://localhost/d3_jchem


/usr/share/java/postgresql.jar -> points to -- postgresql-9.0-801.jdbc4.jar


 

ChemAxon aa7c50abf8

07-08-2012 08:46:24

url:  jdbc:postgresql://localhost/d3_jchem

You are running then JChem Manager on the same host as Postgres is running, correct?


/usr/share/java/postgresql.jar -> points to -- postgresql-9.0-801.jdbc4.jar

Why do you think this is relevant to this problem? Are you using the /usr/share/java/postgresql.jar somewhere? Or do you assume that JChem Manager is using this file?

User d4e43202ac

07-08-2012 14:16:42

Yes, I thought this is the java db connector, and used by jchemmanager.  Just thought I would provide all the information I could.

ChemAxon aa7c50abf8

07-08-2012 14:26:52

You are running JChem Manager on the same host as Postgres is running, correct?

User d4e43202ac

07-08-2012 20:06:30

Yes, both running on the same machine.

ChemAxon aa7c50abf8

08-08-2012 09:35:48

Please, could you paste the output of the following command:


$ telnet localhost 5432

?

User d4e43202ac

08-08-2012 17:56:49

rwharper@RWH-netbook:~$ telnet localhost 5432
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused


I hope you know what is causing this problem.  Thank you.

ChemAxon aa7c50abf8

09-08-2012 08:31:30

Telnet is a very basic tool bundled with Linux and other Unices used normally for transfer. On account of its simplicity it is also a good tool to test wether a server is running where we expect. If you had a postgres instance listening at the default port (5432) on the localhost (the settings of your JDBC URL), the command would have produced the following output:


[pkovacs@zadig ~]$ telnet localhost 5432
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.


Your telnet output reaffirms my hypothesis that either your postgres server is not listening at its default port (5432) on localhost or it is not running at all. I suggest to consult your postgresql logs, check the network status at the operating system level (for example using the netstat program) and try to change your postgres configuration so that at least telnet can connect to it. You can get help in this undertaking from the postgres community (http://www.postgresql.org/community/). Paid support is available as well from various sources -- the most prestigious of the commercial entities being EnterpriseDB: http://enterprisedb.com/products/support/overview.

User d4e43202ac

10-08-2012 02:09:46

'Thanks for your patience and help.  Telnet did not run because it was not enabled on my machine.  You are correct that the postmaster was not running.  I can work through it now.