Quantcast

Error trying to connect to PostgreSQL server

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error trying to connect to PostgreSQL server

pmsavoy
I just downloaded the Squirrel client and setup a driver for PostgreSQL using the driver I downloaded from the PostgreSQL website.  It was successfully registered for driver definition PostgreSQL.

I downloaded pgAdminIII yesterday but it was not a very good client at all.  I worked with Squirrel back in 2004 - 2011 with another JDBC driver and it worked great.  I was hoping that now that I'm working with PostgreSQL that it would work as well however I'm getting an error when trying to connect.  Any help/direction would be greatly appreciated.  Thanks.

Here is the error:

java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "75.141.184.2", user "fwisd_ro", database "fwisd_appdev", SSL off
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "75.141.184.2", user "fwisd_ro", database "fwisd_appdev", SSL off
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
    ... 5 more
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "75.141.184.2", user "fwisd_ro", database "fwisd_appdev", SSL off
    at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:451)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:223)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:67)
    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:212)
    at org.postgresql.Driver.makeConnection(Driver.java:407)
    at org.postgresql.Driver.connect(Driver.java:275)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
    ... 7 more

 

------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error trying to connect to PostgreSQL server

pmsavoy
I forgot to mention that I'm on Windows 10.

The Postgresql box is a VENDOR box and I cannot make any changes there.

I got this same error in pgAdmin III but there was another setting under the ADVANCED tab called Host Address where I entered the IP address and then I was able to access the server without issue.

Thanks.

On Friday, July 29, 2016 2:50 PM, [hidden email] wrote:

=============
I just downloaded the Squirrel client and setup a driver for PostgreSQL using
the driver I downloaded from the PostgreSQL website.  It was successfully
registered for driver definition PostgreSQL.
 
I downloaded pgAdminIII yesterday but it was not a very good client at all.  I
worked with Squirrel back in 2004 - 2011 with another JDBC driver and it worked
great.  I was hoping that now that I'm working with PostgreSQL that it would
work as well however I'm getting an error when trying to connect.  Any
help/direction would be greatly appreciated.  Thanks.
 
Here is the error:
 
java.util.concurrent.ExecutionException: java.lang.RuntimeException:
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host
"75.141.184.2", user "fwisd_ro", database "fwisd_appdev", SSL off
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d.awaitConnection(OpenConnectionCommand.java:132)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d.access$100(OpenConnectionCommand.java:45)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d$2.run(OpenConnectionCommand.java:115)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: FATAL:
no pg_hba.conf entry for host "75.141.184.2", user "fwisd_ro", database
"fwisd_appdev", SSL off
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d.executeConnect(OpenConnectionCommand.java:171)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d.access$000(OpenConnectionCommand.java:45)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d$1.run(OpenConnectionCommand.java:104)
    ... 5 more
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for
host "75.141.184.2", user "fwisd_ro", database "fwisd_appdev", SSL off
    at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionF
actoryImpl.java:451)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(Connectio
nFactoryImpl.java:223)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.ja
va:67)
    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:212)
    at org.postgresql.Driver.makeConnection(Driver.java:407)
    at org.postgresql.Driver.connect(Driver.java:275)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDri
verManager.java:133)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionComman
d.executeConnect(OpenConnectionCommand.java:167)
    ... 7 more
 
 
 
------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users 



------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error trying to connect to PostgreSQL server

John Hardin
In reply to this post by pmsavoy
On Fri, 29 Jul 2016, [hidden email] wrote:

> I was hoping that now that I'm working with PostgreSQL that it would
> work as well however I'm getting an error when trying to connect.
>
> java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host
> "75.141.184.2", user "fwisd_ro", database "fwisd_appdev", SSL off

This doesn't look like an error specific to Squirrel. I'd suggest looking
for that file (pg_hba.conf) on your system, and doing some googling to see
how it is supposed to be used.

--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   If guns kill people, then...
     -- pencils miss spel words.
     -- cars make people drive drunk.
     -- spoons make people fat.
-----------------------------------------------------------------------
  7 days until the 281st anniversary of John Peter Zenger's acquittal

------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error trying to connect to PostgreSQL server

John Hardin
In reply to this post by pmsavoy
On Fri, 29 Jul 2016, [hidden email] wrote:

> I forgot to mention that I'm on Windows 10.
>
> The Postgresql box is a VENDOR box and I cannot make any changes there.
>
> I got this same error in pgAdmin III but there was another setting under
> the ADVANCED tab called Host Address where I entered the IP address and
> then I was able to access the server without issue.

...does it work if you use the IP address (vs. the hostname) in the JDBC
connect string?

--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   You are in a maze of twisty little protocols,
   all written by Microsoft.
----------------------------------------------------------------------
  7 days until the 281st anniversary of John Peter Zenger's acquittal

------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error trying to connect to PostgreSQL server

pmsavoy
In reply to this post by pmsavoy
Hi John,

Thanks for the replies.  I did try changing the HOSTNAME to the IP address but that did not help.  

Actually I just got it to work.  I kept googling and found this solution:

In the ALIAS I modified the URL value where after the DB name I added:

?sslmode=require

That allowed me to access the DB on the remote vendor server without issue since I cannot make any modifications to that server.  This did the trick.

Hopefully if someone else runs into this same issue this may help.

Thanks and have a great weekend.

 
On Friday, July 29, 2016 3:04 PM, John Hardin <[hidden email]> wrote:

=============
On Fri, 29 Jul 2016, [hidden email] wrote:
 
> I forgot to mention that I'm on Windows 10.
>
> The Postgresql box is a VENDOR box and I cannot make any changes there.
>
> I got this same error in pgAdmin III but there was another setting under
> the ADVANCED tab called Host Address where I entered the IP address and
> then I was able to access the server without issue.
 
...does it work if you use the IP address (vs. the hostname) in the JDBC
connect string?
 
--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/ 
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   You are in a maze of twisty little protocols,
   all written by Microsoft.
----------------------------------------------------------------------
  7 days until the 281st anniversary of John Peter Zenger's acquittal



------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error trying to connect to PostgreSQL server

John Hardin
On Fri, 29 Jul 2016, [hidden email] wrote:

> Thanks for the replies.  I did try changing the HOSTNAME to the IP
> address but that did not help.

Rats.

> Actually I just got it to work.  I kept googling and found this solution:
>
> In the ALIAS I modified the URL value where after the DB name I added:
>
> ?sslmode=require
>
> That allowed me to access the DB on the remote vendor server without
> issue since I cannot make any modifications to that server.  This did
> the trick.

Yay!

> Hopefully if someone else runs into this same issue this may help.
>
> Thanks and have a great weekend.

You too.

--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Drugs will always be around. Politicians are therefore making an
   active decision to distribute them through violent gangs. --twitter
-----------------------------------------------------------------------
  7 days until the 281st anniversary of John Peter Zenger's acquittal

------------------------------------------------------------------------------
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Loading...