pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rob stone <floriparob@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Unable to connect to 9.5 via JDBC driver 1207
Date: Wed, 03 Feb 2016 04:08:24 +1100
Message-ID: <1454432904.2165.6.camel@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hello,

I downloaded the 9.5 release as Debian packages and everything is
working as intended except for obtaining a connection via the JDBC
driver.

I use ExecuteQuery a lot. Both it and a silly little Java class that I
wrote to test connecting both return the same error.

I downloaded the Java source and tried to figure out what is happening
without any success.




org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host
"127.0.0.1", user "timeman", database "timemanager", SSL off
	at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(Connectio
nFactoryImpl.java:427)
	at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Connect
ionFactoryImpl.java:203)
	at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.
java:65)
	at
org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:159)
	at org.postgresql.Driver.makeConnection(Driver.java:416)
	at org.postgresql.Driver.connect(Driver.java:283)
	at
org.executequery.datasource.SimpleDataSource.getConnection(SimpleDataSo
urce.java:102)
	at
org.executequery.datasource.SimpleDataSource.getConnection(SimpleDataSo
urce.java:83)
	at
org.executequery.datasource.ConnectionPoolImpl.createConnection(Connect
ionPoolImpl.java:254)
	at
org.executequery.datasource.ConnectionPoolImpl.ensureCapacity(Connectio
nPoolImpl.java:202)
	at
org.executequery.datasource.ConnectionPoolImpl.setMinimumConnections(Co
nnectionPoolImpl.java:421)
	at
org.executequery.datasource.ConnectionManager.createDataSource(Connecti
onManager.java:87)
	at
org.executequery.databasemediators.spi.DefaultConnectionBuilder.createD
ataSource(DefaultConnectionBuilder.java:122)
	at
org.executequery.databasemediators.spi.DefaultConnectionBuilder.access$
000(DefaultConnectionBuilder.java:35)
	at
org.executequery.databasemediators.spi.DefaultConnectionBuilder$1.const
ruct(DefaultConnectionBuilder.java:100)
	at
org.underworldlabs.swing.util.SwingWorker$2.run(SwingWorker.java:130)
	at java.lang.Thread.run(Thread.java:745)


--------------------------------------

my pg_hba.conf file

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
# host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
# host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                trust
#host    replication     postgres        127.0.0.1/32            trust
#host    replication     postgres        ::1/128                 trust



-----------------------------------

I can run psql without any problems.

postgres@roblaptop:/home/postgres/data95$ psql -d timemanager -U
timeman -p 5434
psql (9.5.0)
Type "help" for help.

timemanager=> select count(*) from error_messages;
 count 
-------
   357
(1 row)

timemanager=> 



Please let me know if any further information is required.


Thanks,
Rob


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (15+ messages)  latest in thread

Message-ID: <1454432904.2165.6.camel@gmail.com>
Permalink:  ../1454432904.2165.6.camel@gmail.com/
Also on:    postgresql.org/message-id/1454432904.2165.6.camel@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: floriparob@gmail.com
  Subject: Re: Unable to connect to 9.5 via JDBC driver 1207
  In-Reply-To: <1454432904.2165.6.camel@gmail.com>
  References: <1454432904.2165.6.camel@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox