Re: Unable to connect to 9.5 via JDBC driver 1207 - Mailing list pgsql-jdbc
From | Radoslav Petrov |
---|---|
Subject | Re: Unable to connect to 9.5 via JDBC driver 1207 |
Date | |
Msg-id | 56B0E560.6030107@edno.moe Whole thread Raw |
In response to | Unable to connect to 9.5 via JDBC driver 1207 (rob stone <floriparob@gmail.com>) |
Responses |
Re: Unable to connect to 9.5 via JDBC driver 1207
|
List | pgsql-jdbc |
Hi Rob,
try to uncomment the following in pg_hba.conf:
try to uncomment the following in pg_hba.conf:
# IPv4 local connections: # host all all 127.0.0.1/32 trustTo become:
# IPv4 local connections: host all all 127.0.0.1/32 trustYou can check the documentation here: http://www.postgresql.org/docs/devel/static/auth-pg-hba-conf.html
On 2.02.2016 19:08, rob stone wrote:
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 offat 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
-- Поздрави, | Best regards, Радослав Петров | Radoslav Petrov
pgsql-jdbc by date: