#330 Postgis fails to connect for 1.6.3 (rev. 3576)

closed-fixed
nobody
postgis (1)
5
2014-11-18
2013-08-26
John L. Poole
No

Postgis fails to connect for 1.6.3 (rev. 3576)

I downloaded and installed OpenJUMP-Installer-1.6.3-r3576-PLUS.exe on 8/25/2013. I select "File-SQL run Datastore Query" and I am presented with the "Run Datasotre Query" dialog. I click the database icon to create a new connection, I get the "Connection Manager" dialog and I click "Add". I then fill in the dialog "Add Connection" with 1) name "Test", 2) leave deafult picklist item of "PostGIS", 3) a recognized server (also tried the IP of my server), 4) "5432", 5) a known database, 6) confirmed user account, 7) confirmed password. After clicking "OK", I then select my newly created entry in Connection Manager and then I click "Connect".

I get a window titled "PSQL Exception" with "The connection attempt failed (PSQL Exception)". The Java stack trace reflected in the "Details" child window will be attached hereto.

Related

Bugs: #330

Discussion

1 2 > >> (Page 1 of 2)
  • John L. Poole
    John L. Poole
    2013-08-26

    Adding attachment of "Details" Java stack trace.

     
    Last edit: John L. Poole 2013-08-26
  • John L. Poole
    John L. Poole
    2013-08-26

    I confirmed that connections are being accepted for my specified username/passwords by creating a separate connection account in Pgadmin and then logging into the database therein.

     
  • mentaer
    mentaer
    2013-08-26

    by the way, thanks for the details error description. We will have a look.

     
  • mentaer
    mentaer
    2013-08-26

    So this means that John runs on Windows (7?) and Java 7? and has his default set to ip6? (jesus...)

     
  • John L. Poole
    John L. Poole
    2013-08-26

    I downloaded and installed OpenJUMP-Installer-20130825-r3684-PLUS.exe and performed the same operations described initially. Result: failed to connect. Attached is the java stack trace.

     
  • mentaer
    mentaer
    2013-08-26

    Hi John, thanks for testing again with the latest.

    Do you have a chance to test on a different computer? (as the link ede sent seems to indicate that this is a very specific java/computer configuration problem)

     
  • John L. Poole
    John L. Poole
    2013-08-26

    My environment has:
    JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
    I do not have a Java instance referenced in my PATH variable.

    A suggestion: have in the Help menu an item. e.g. "Environment Print-out", to spit out an environment print-out of whatever variables would be important to track a given instance. Then you could suggest in the printout that the contents be included in all bug submissions.

     
  • mentaer
    mentaer
    2013-08-26

    We actually have something similar (Help>About...>Info tab), but you are right, we should add a separate menu item that shortcuts.
    Will forward this to the Developer list.

     
  • John L. Poole
    John L. Poole
    2013-08-26

    I installed and ran OpenJUMP-Installer-1.6.3-r3576-PLUS.exe on another Windows machine, Windows 7 Profession 64 bit. My environment has JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_31.

    I successfully connected and queried the PostGIS database. I'll try changing my Java on the machine that manifested the problem and report.

     
  • mentaer
    mentaer
    2013-08-26

    thanks for the update John!

    This also means that the error is something we can't fix - I suppose. Just checked: pgAdmin is a c++ program, which may explain why it works.

     
  • John L. Poole
    John L. Poole
    2013-08-26

    On my primary machine I tried the following with results:

    Bit Result JAVA_HOME
    === ======= =====================================
    32 Works C:\Program Files (x86)\Java\jre1.6.0_22
    32 Fails C:\Program Files (x86)\Java\jdk1.7.0_25

    64 Fails C:\Program Files\Java\jdk1.6.0_29
    64 Works C:\Program Files\Java\jdk1.6.0_29

    Conclusion: The instances of Java 1.7 broke the plug-in.

     
  • ede
    ede
    2013-08-26

    usually java installer places java/javaw executables into Windows\System32 (64bit libs) or Windows\SysWOW64 (32bit libs, confusing but a fact). these are always in your path.

    anyway..

    A. did you try the stackoverflow workaround i mentioned above?

    B. is there any possibility that ip6 is enabled for your machine?

    ..ede

     
  • John L. Poole
    John L. Poole
    2013-08-26

    A: I modified OpenJump's r.3684 installation's oj_windows.bat as followed:
    rem
    rem 8/25/2013 jlpoole: suggestion per bug 330
    rem
    rem set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration="%LOG4J_CONF%" -Dlog.dir="%LOG_DIR%" -Djump.home="%JUMP_HOME%" %JAVA_MEM%
    set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration="%LOG4J_CONF%" -Dlog.dir="%LOG_DIR%" -Djump.home="%JUMP_HOME%" %JAVA_MEM% -Djava.net.preferIPv4Stack=true

    Still failed to connect

    B: I check my "Local Area Connection Properties" and I do have checked "Internet Protocol Version 6 (TCP/IPv6)" checked along with Version 4. I then unchecked Version 6 and closed the Local Area Connection Properties (re-opened to make sure the change took effect) and then ran OpenJump r. 3684 and successfully connected.

     
  • Thanks for all your tests John,
    We'll add some information in the wiki about this problem.
    It is strange that java.net.preferIPv4Stack did not do the trick though.

     
  • ede
    ede
    2013-08-26

    John,

    could you please reenable IP6 and do the following

    A. remove the '-Djava.net.preferIPv4Stack=true' from oj_windows.bat and run OpenJUMP.exe or oj_windows.bat from a command line with the parameter '-p' (-print-properties) and copy & attach the output?

    B. try to run OJ with oj_windows.bat modified like this (around line 18)

    rem -- set some java runtime options here, initialize empty --
    set JAVA_OPTS=-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false

    does B. work for you?

    ..ede

     
  • John L. Poole
    John L. Poole
    2013-08-26

    In reply to ede's two requests:

    A: see attachment
    B: works, I could connect.

     
  • ede
    ede
    2013-08-26

    ok thanks,

    then B. should be the (your) workaround for now!
    i already contacted Michael on the developer list on how to achieve this programmatically. hopefully he can fix it that way so the next release will work on IP6 enabled machines.

    ..ede

     
  • John L. Poole
    John L. Poole
    2013-08-26

    Agreed.
    Thank you.

     
  • ede
    ede
    2013-08-26

    pleasure.. ede

    On 26.08.2013 22:08, John L. Poole wrote:

    Agreed.
    Thank you.


    [bugs:#330] http://sourceforge.net/p/jump-pilot/bugs/330/ Postgis fails to connect for 1.6.3 (rev. 3576)

    Status: open
    Labels: postgis
    Created: Mon Aug 26, 2013 02:43 PM UTC by John L. Poole
    Last Updated: Mon Aug 26, 2013 08:07 PM UTC
    Owner: nobody

    Postgis fails to connect for 1.6.3 (rev. 3576)

    I downloaded and installed OpenJUMP-Installer-1.6.3-r3576-PLUS.exe on 8/25/2013. I select "File-SQL run Datastore Query" and I am presented with the "Run Datasotre Query" dialog. I click the database icon to create a new connection, I get the "Connection Manager" dialog and I click "Add". I then fill in the dialog "Add Connection" with 1) name "Test", 2) leave deafult picklist item of "PostGIS", 3) a recognized server (also tried the IP of my server), 4) "5432", 5) a known database, 6) confirmed user account, 7) confirmed password. After clicking "OK", I then select my newly created entry in Connection Manager and then I click "Connect".

    I get a window titled "PSQL Exception" with "The connection attempt failed (PSQL Exception)". The Java stack trace reflected in the "Details" child window will be attached hereto.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jump-pilot/bugs/330/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #330

  • I included a workaround in r3691 as suggested by Ede.
    Please, can you test if it solves the problem for you as I could not reproduce the problem on my machine with a local database.

     
  • ede
    ede
    2013-08-27

    you probably can if you have Win7+ and enable IP6 in your network adapter settings.

    ..ede

    On 27.08.2013 23:06, michael michaud wrote:

    I included a workaround in r3691 as suggested by Ede.
    Please, can you test if it solves the problem for you as I could not reproduce the problem on my machine with a local database.


    [bugs:#330] http://sourceforge.net/p/jump-pilot/bugs/330/ Postgis fails to connect for 1.6.3 (rev. 3576)

    Status: open
    Labels: postgis
    Created: Mon Aug 26, 2013 02:43 PM UTC by John L. Poole
    Last Updated: Mon Aug 26, 2013 08:08 PM UTC
    Owner: nobody

    Postgis fails to connect for 1.6.3 (rev. 3576)

    I downloaded and installed OpenJUMP-Installer-1.6.3-r3576-PLUS.exe on 8/25/2013. I select "File-SQL run Datastore Query" and I am presented with the "Run Datasotre Query" dialog. I click the database icon to create a new connection, I get the "Connection Manager" dialog and I click "Add". I then fill in the dialog "Add Connection" with 1) name "Test", 2) leave deafult picklist item of "PostGIS", 3) a recognized server (also tried the IP of my server), 4) "5432", 5) a known database, 6) confirmed user account, 7) confirmed password. After clicking "OK", I then select my newly created entry in Connection Manager and then I click "Connect".

    I get a window titled "PSQL Exception" with "The connection attempt failed (PSQL Exception)". The Java stack trace reflected in the "Details" child window will be attached hereto.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jump-pilot/bugs/330/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #330

  • Hi,

    you probably can if you have Win7+ and enable IP6 in your network
    adapter settings.

    I have vista, I can set IPv6 and/or IPv4 and I made a few tests, but I
    could connect to localhost
    without the patch even with java 7 and IPv6 checked.
    As it is a local connection, I also tried to replace localhost with my
    IP number, but without success
    (either with the patch or without and even with java 6), probably more a
    postgresql conf problem.
    As the problem is solved for John, I won't insist.

    Michaël

    ..ede

    On 27.08.2013 23:06, michael michaud wrote:

    I included a workaround in r3691 as suggested by Ede.
    Please, can you test if it solves the problem for you as I could
    not reproduce the problem on my machine with a local database.
    
    ------------------------------------------------------------------------
    
    /[bugs:#330] <http://sourceforge.net/p/jump-pilot/bugs/330/>
    http://sourceforge.net/p/jump-pilot/bugs/330/ Postgis fails to
    connect for 1.6.3 (rev. 3576)/
    
    /Status:/ open
    /Labels:/ postgis
    /Created:/ Mon Aug 26, 2013 02:43 PM UTC by John L. Poole
    /Last Updated:/ Mon Aug 26, 2013 08:08 PM UTC
    /Owner:/ nobody
    
    Postgis fails to connect for 1.6.3 (rev. 3576)
    
    I downloaded and installed OpenJUMP-Installer-1.6.3-r3576-PLUS.exe
    on 8/25/2013. I select "File-SQL run Datastore Query" and I am
    presented with the "Run Datasotre Query" dialog. I click the
    database icon to create a new connection, I get the "Connection
    Manager" dialog and I click "Add". I then fill in the dialog "Add
    Connection" with 1) name "Test", 2) leave deafult picklist item of
    "PostGIS", 3) a recognized server (also tried the IP of my
    server), 4) "5432", 5) a known database, 6) confirmed user
    account, 7) confirmed password. After clicking "OK", I then select
    my newly created entry in Connection Manager and then I click
    "Connect".
    
    I get a window titled "PSQL Exception" with "The connection
    attempt failed (PSQL Exception)". The Java stack trace reflected
    in the "Details" child window will be attached hereto.
    
    ------------------------------------------------------------------------
    
    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/jump-pilot/bugs/330/
    
    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/
    

    [bugs:#330] http://sourceforge.net/p/jump-pilot/bugs/330/ Postgis
    fails to connect for 1.6.3 (rev. 3576)

    Status: open
    Labels: postgis
    Created: Mon Aug 26, 2013 02:43 PM UTC by John L. Poole
    Last Updated: Tue Aug 27, 2013 09:06 PM UTC
    Owner: nobody

    Postgis fails to connect for 1.6.3 (rev. 3576)

    I downloaded and installed OpenJUMP-Installer-1.6.3-r3576-PLUS.exe on
    8/25/2013. I select "File-SQL run Datastore Query" and I am presented
    with the "Run Datasotre Query" dialog. I click the database icon to
    create a new connection, I get the "Connection Manager" dialog and I
    click "Add". I then fill in the dialog "Add Connection" with 1) name
    "Test", 2) leave deafult picklist item of "PostGIS", 3) a recognized
    server (also tried the IP of my server), 4) "5432", 5) a known
    database, 6) confirmed user account, 7) confirmed password. After
    clicking "OK", I then select my newly created entry in Connection
    Manager and then I click "Connect".

    I get a window titled "PSQL Exception" with "The connection attempt
    failed (PSQL Exception)". The Java stack trace reflected in the
    "Details" child window will be attached hereto.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/jump-pilot/bugs/330/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #330

1 2 > >> (Page 1 of 2)