We're Hiring!

CLOSED: Server Login failure

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

CLOSED: Server Login failure

Postby dskanth » Mon Sep 14, 2009 11:17 am

Hi, i have installed the Omero server and tried to start the server using the command "omero admin start". But iam not able to run the server, I got a log like this:

aused by: java.sql.SQLException: unable to connect to non-XA resource org.postgresql.Driver
at bitronix.tm.resource.jdbc.lrc.LrcXADataSource.getXAConnection(LrcXADataSource.java:82)
at bitronix.tm.resource.jdbc.PoolingDataSource.createPooledConnection(PoolingDataSource.java:167)
at bitronix.tm.resource.common.XAPool.createPooledObject(XAPool.java:200)
at bitronix.tm.resource.common.XAPool.grow(XAPool.java:310)
at bitronix.tm.resource.common.XAPool.getInPool(XAPool.java:289)
at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:72)
at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:58)
at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:105)
... 100 more
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.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:123)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:124)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:386)
at org.postgresql.Driver.connect(Driver.java:260)
at bitronix.tm.resource.jdbc.lrc.LrcXADataSource.getXAConnection(LrcXADataSource.java:79)
... 107 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.postgresql.core.PGStream.<init>(PGStream.java:62)


I could not understand, what could be the problem. Please help.
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm

Re: Server Login failure

Postby bernhard » Tue Sep 15, 2009 7:18 am

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.


It seems that your postgres database is not running, or not configured to accept TCP/IP connections. If the db is up and you can't login on the command line, see below, check your pg_hba.conf file that lives in the postgres data folder. On my linux system this is in /var/lib/pgsql/data but that can differ between distributions. You need to have a host type connection allowed and likely with password authentication and not ident.
Code: Select all
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         postgres                          trust
local   all         all                               ident, sameuser
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5


To verify that your database is running and can be accessed using the user credentials you choose during the omero setup, try to connect from the command line (the example is on linux):

Code: Select all
$pgsql -U <your_omero_db_user> <you_omero_database_name>
Password:.....
# now you're logged in, try to run a query:
=> select * from experimenter;
# results are listed
=> \q


Cheers! Bernhard
bernhard
 
Posts: 37
Joined: Mon Jun 22, 2009 7:18 am

Re: Server Login failure

Postby dskanth » Tue Sep 15, 2009 12:27 pm

Thanks a lot, now iam able to connect to the server, after adding my IP address in the file. :)
dskanth
 
Posts: 43
Joined: Wed Aug 26, 2009 1:12 pm


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest