Unable To Restart Tamr - Postgres Not Available

Problem: While restarting Tamr, the following error shows:

Failed to start unify-all, printing logs & halting

==> /path/to/tamr/logs/unify-all.error.log <==

Caused by: java.net.ConnectException: Connection refused (Connection refused)

        at java.net.PlainSocketImpl.socketConnect(Native Method)

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

        at java.net.Socket.connect(Socket.java:589)

        at org.postgresql.core.PGStream.<init>(PGStream.java:68)

        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)

        ... 26 more

==> /path/to/tamr/logs/unify-all.out.log <==

! at com.tamr.persist.api.PersistenceApp.run(PersistenceApp.java:40)

! at com.tamr.dw.application.App.start(App.java:104)

! at com.tamr.dw.application.App.run(App.java:73)

! at com.tamr.persist.api.PersistenceApp.main(PersistenceApp.java:43)

! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

! at java.lang.reflect.Method.invoke(Method.java:498)

! at com.tamr.javarunner.Command.lambda$runCommand$0(Command.java:101)

! at java.lang.Thread.run(Thread.java:745)

Cause: This error message relates to the persistence microservice, which suggests Postgres is not running. This is preventing Tamr from starting as Postgres is a required dependency for running Tamr that is not managed by the Tamr start and stop scripts.

Resolution: One of the main dependencies for Tamr is to have PostgreSQL running on the server. Use this command to verify if the PostgreSQL is running (note that 5432 is the default port, it may be different based on your installation):

netstat -nvatp | grep 5432

If the port is not listening, use one of the following commands to start PostgreSQL on the server:

sudo service postgresql start

sudo systemctl start postgresql-9.4.service

sudo systemctl start postgresql 

If the PostgreSQL service has not been registered with systemctl, you may need to use the pg_ctl binary script to start postgres. See here.

If PostgreSQL doesn't start with the above commands, it is possible the port is blocked for some reason. The easiest way to unblock the port is to restart the server. During the installation of PostgreSQL, there may have been an auto-start built in when restarting your server. So check that PostgreSQL is ON after restarting. If it is not, try the above commands again and see if it works now.

Once PostgreSQL is verified as running, use the below commands in the same order to start Tamr:

su - tamr

# if version >= 2019.007

Try accessing the UI to confirm Tamr is started properly assuming no error messages were posted during startup.

Did this page help you?