Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgresSqlException with activiti source code

I have downloaded the latest source code of activity. I have changed the db.properties file as follows :

db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost:5432/WorkflowEngine
jdbc.username=postgres
jdbc.password=password

I have added the postgres dependency also. While I'm trying to deploy through 'intellij idea' it is working fine by pointing to the correct database,with the same code, I have created a war file and tried to deploy through tomcat directly by placing the war inside webapps. Here I'm getting the exception like :

caused by: org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata: connection refused. check that the hostname and port are  correct and that the postmaster is accepting TCP/IP connections
caused by: org.postgresql.util.PSQLException: connection refused. check that the hostname and port are  correct and that the postmaster is accepting TCP/IP connections

Can anyone help me to resolve this error.

UPDATE

I have given a new database name and tried to start. Activiti is able to create 25 tables in the new database, but still gives the connection refused error.

enter image description here

like image 597
Sagari Eduri Avatar asked May 23 '26 21:05

Sagari Eduri


1 Answers

The problem is pretty clearly a jdbc connection refused error. So let's start with a checklist for troubleshooting these.

  1. Can you psql into the server on a local socket? just type psql from the command line. If you get an authentication error or a password prompt you are good. If you get a connection refused you have more work to do.

  2. Is PostgreSQL running? If not, start it and try again. If so, check the postgresql.conf to look for non-standard port settings.

  3. Check firewalls that might be preventing network connections.

like image 62
Chris Travers Avatar answered May 25 '26 12:05

Chris Travers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!