You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Steven Hendrickx (JIRA)" <ji...@apache.org> on 2011/03/07 16:07:00 UTC

[jira] Created: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" on OS/400

DisconnectException: "Connection was refused because the database DB was not found" on OS/400
---------------------------------------------------------------------------------------------

                 Key: DERBY-5096
                 URL: https://issues.apache.org/jira/browse/DERBY-5096
             Project: Derby
          Issue Type: Bug
          Components: Network Server
    Affects Versions: 10.7.1.1
         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (continuously reproducible). 
Probably Windows 7 64 bit with Sun VM (1.6) too (but not reproduced)
            Reporter: Steven Hendrickx


A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().

The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...

The second time the process is started, the connection will succeed and the "Flows" database can be used successfully.

The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" on OS/400

Posted by "Steven Hendrickx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hendrickx updated DERBY-5096:
------------------------------------

    Attachment: getconnection_reproduce.zip

ZIP containing
- DerbyGetConnection.java to reproduce problem
- Derby tracing
- JDBC/DriverManager trace

> DisconnectException: "Connection was refused because the database DB was not found" on OS/400
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (continuously reproducible). 
> Probably Windows 7 64 bit with Sun VM (1.6) too (but not reproduced)
>            Reporter: Steven Hendrickx
>         Attachments: getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5096:
----------------------------------

    Attachment: derby-5096_uncondset_diff.txt

Thank you Knut. That is a good idea to make it unconditional as I recall one user reporting they also saw this intermittently on Windows vmware.  This way the code path will be fully tested.

attaching derby-5096_uncondset_diff.txt to do that.

                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>         Attachments: TestLowerCaseTraversal.java, derby-5096_diff.txt, derby-5096_uncondset_diff.txt, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Knut Anders Hatlen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159254#comment-13159254 ] 

Knut Anders Hatlen commented on DERBY-5096:
-------------------------------------------

+                                String serviceDirCanonicalPath = serviceDirectory.getCanonicalPath();
+                                if (storageFactory.getCanonicalName() != serviceDirCanonicalPath) {
+                                    storageFactory.setCanonicalName(serviceDirCanonicalPath);
+                                }

I suppose we should have used the equals() method to compare the strings here. Or maybe just set the canonical name unconditionally (advantages: less code, and the new code path will also be tested on non-iSeries machines).
                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>         Attachments: TestLowerCaseTraversal.java, derby-5096_diff.txt, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005719#comment-13005719 ] 

Kathey Marsden commented on DERBY-5096:
---------------------------------------

It would be great to  see a fix in the JVM's  with the problem , so I think it would be  worthwhile to report  that you have hit the  problem to the various JVM support organizations if you have support.  

   I haven't looked into a possible workaround in Derby, but since it seems to affect not only OS/400 but also other platforms running on VMWare, it seems like it would be worthwhile to look into working around the problem in DERBY if possible.  If you would like to work on that, I am sure members of the community can point you to the code area in question.




> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154717#comment-13154717 ] 

Kathey Marsden commented on DERBY-5096:
---------------------------------------

I can get past the database creation issue if I change StroageFactoryService.createServiceRoot() to get the canonical path with:
                                   
return serviceDirectory.getCanonicalPath();
rather than
return storageFactory.getCanonicalName();

The real problem is that DirStorageFactory.java holds a canonicalName value which is cached from the very first call to getCanonicalPath() in its doInit() method which occurs before the directory is created,  so has the wrong casing on iSeries.   I think probably the best comprehensive solution would be to only cache that value once we have a call to getCanonicalName when the directory exists.



                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5096:
----------------------------------

    Issue & fix info: Patch Available
    
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>         Attachments: TestLowerCaseTraversal.java, derby-5096_diff.txt, derby-5096_uncondset_diff.txt, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren resolved DERBY-5096.
---------------------------------------

    Resolution: Invalid

I'm marking this as invalid as it's not really a problem in derby, the problem is in the jvm on iseries.
If someone wants to implement a workaround within the derby code, they can reopen at that time.

> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5096:
----------------------------------

    Attachment: derby-5096_diff.txt

Here is a patch for this issue.  It adjusts the canonicalName after mkdirs() if it does not match getCanonicalPath().

I had considered have a fix in DirStorageFactory which would upon getting the canonicalPath search back and ensure the correct casing for the directories that existed, but opted for the other approach as it should not exist in situations where there is not a casing issue.

                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>         Attachments: TestLowerCaseTraversal.java, derby-5096_diff.txt, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" on OS/400

Posted by "Steven Hendrickx (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003383#comment-13003383 ] 

Steven Hendrickx commented on DERBY-5096:
-----------------------------------------

Mind, since this is a SQLNonTransientConnectionException, we cannot retry to create the connection.

> DisconnectException: "Connection was refused because the database DB was not found" on OS/400
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (continuously reproducible). 
> Probably Windows 7 64 bit with Sun VM (1.6) too (but not reproduced)
>            Reporter: Steven Hendrickx
>         Attachments: getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" on OS/400

Posted by "Steven Hendrickx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hendrickx updated DERBY-5096:
------------------------------------

    Description: 
A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().

The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...

The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.

The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

  was:
A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().

The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...

The second time the process is started, the connection will succeed and the "Flows" database can be used successfully.

The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.


> DisconnectException: "Connection was refused because the database DB was not found" on OS/400
> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (continuously reproducible). 
> Probably Windows 7 64 bit with Sun VM (1.6) too (but not reproduced)
>            Reporter: Steven Hendrickx
>         Attachments: getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5096:
----------------------------------

    Attachment: TestLowerCaseTraversal.java

Hi Steven,

On iseries I believe there is a java bug with getCanonicalPath() that can cause  this problem. If you run the attached program TestLowerCaseTraversal.java on iseries,  I think you will see that getCanonical path is not properly resolving the case in the parent directories 

$ java TestLowerCaseTraversal 
mkdirs to create dir with mixedcase string: test/NDee = true
Original string: test/ndee/subdir
cannonical path before mkdirs(), should be mixed case as that's what's on the machine: /home/MYRNA/tst/test/b11740/try4/test/ndee/subdir  <<== Should be NDee!
created the subdir? true
cannonical path after  mkdirs(): /home/MYRNA/tst/test/b11740/try4/test/NDee/subdir

On Windows XP, I see the case properly resolved:

mkdirs to create dir with mixedcase string: test/NDee = true
Original string: test/ndee/subdir
cannonical path before mkdirs(), should be mixed case as that's what's on the ma
chine: C:\cygwin\home\kmarsden\repro\11740\test\NDee\subdir
created the subdir? true
cannonical path after  mkdirs(): C:\cygwin\home\kmarsden\repro\11740\test\NDee\s
ubdir

The workaround on iseries is to use the matching case for  the  path of the database. 

Another situation where there is a problem with getCanonicalPath() on iseries that can cause this symptom is if there are multi-byte characters in the database name. (See DERBY-4149). I don't know a good work around for that one.

I cannot speak to the vmware issues, but wonder if there is a casing or getCanonicalPath issue there too.



> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Steven Hendrickx (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005568#comment-13005568 ] 

Steven Hendrickx commented on DERBY-5096:
-----------------------------------------

Kathey, you are correct: Basically our code does something like: 

new File(System.getProperty("user.home"), "productsubdir"); 

On the OS/400 system, System.getProperty("user.home")  returned "/home/SHENDRIC" for me, while this should be "/home/shendric" (ls in qsh or qp2term). This seems the root of all evil. When the code is changed to:

new File(new File(System.getProperty("user.home")).getCanonicalFile, "productsubdir");

the exception no longer occurs. Although this change seems to solve our problem, is there any plan to update Derby to anticipate this problem from within Derby itself?

Anyway, thanks for the fast feed back and the great help.





> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reopened DERBY-5096:
-----------------------------------

      Assignee: Kathey Marsden

I am going to see if we can find an  internal workaround for this issue in Derby as it can be confusing to users.

                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005719#comment-13005719 ] 

Kathey Marsden edited comment on DERBY-5096 at 3/11/11 9:52 PM:
----------------------------------------------------------------

It would be great to  see a fix in the JVM's  with the problem , so I think it would be  worthwhile to report  that you have hit the  problem to the various JVM support organizations if you have support.  

   I haven't looked into a possible workaround in Derby, but since it seems to affect not only OS/400 but also other platforms running on VMWare, it seems like it would be worthwhile to look into working around the problem in DERBY if possible.  If you would like to work on that, I am sure members of the community can point you to the code area in question.


      was (Author: kmarsden):
    It would be great to  see a fix in the JVM's  with the problem , so I think it would be  worthwhile to report  that you have hit the  problem to the various JVM support organizations if you have support.  

   I haven't looked into a possible workaround in Derby, but since it seems to affect not only OS/400 but also other platforms running on VMWare, it seems like it would be worthwhile to look into working around the problem in DERBY if possible.  If you would like to work on that, I am sure members of the community can point you to the code area in question.


For the platforms, one option might be to have new class  OsName.java that has String constants for  all the os.name values and then just have an isPlatform(String) method in BaseTestCase.

  
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Steven Hendrickx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hendrickx updated DERBY-5096:
------------------------------------

    Environment: 
System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)

  was:
System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (continuously reproducible). 
Probably Windows 7 64 bit with Sun VM (1.6) too (but not reproduced)

        Summary: DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time  (was: DisconnectException: "Connection was refused because the database DB was not found" on OS/400)

> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005719#comment-13005719 ] 

Kathey Marsden edited comment on DERBY-5096 at 3/11/11 9:47 PM:
----------------------------------------------------------------

It would be great to  see a fix in the JVM's  with the problem , so I think it would be  worthwhile to report  that you have hit the  problem to the various JVM support organizations if you have support.  

   I haven't looked into a possible workaround in Derby, but since it seems to affect not only OS/400 but also other platforms running on VMWare, it seems like it would be worthwhile to look into working around the problem in DERBY if possible.  If you would like to work on that, I am sure members of the community can point you to the code area in question.


For the platforms, one option might be to have new class  OsName.java that has String constants for  all the os.name values and then just have an isPlatform(String) method in BaseTestCase.


      was (Author: kmarsden):
    It would be great to  see a fix in the JVM's  with the problem , so I think it would be  worthwhile to report  that you have hit the  problem to the various JVM support organizations if you have support.  

   I haven't looked into a possible workaround in Derby, but since it seems to affect not only OS/400 but also other platforms running on VMWare, it seems like it would be worthwhile to look into working around the problem in DERBY if possible.  If you would like to work on that, I am sure members of the community can point you to the code area in question.



  
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5096:
----------------------------------

    Fix Version/s: 10.9.0.0
                   10.8.2.3
                   10.7.1.4
                   10.5.3.2

 This is now checked into the 10.8 branch,10.7, and 10.5 as well..  Not closing as still need verification of the fix and to check into 10.6 and maybe go back even further.

                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>             Fix For: 10.5.3.2, 10.7.1.4, 10.8.2.3, 10.9.0.0
>
>         Attachments: TestLowerCaseTraversal.java, derby-5096_diff.txt, derby-5096_uncondset_diff.txt, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden resolved DERBY-5096.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.6.2.3

ported fix back to all branches through 10.5. The 10.6 fix doesn't show up on subversion commits, but was checked in with revision 1212214
                
> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>            Assignee: Kathey Marsden
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.4, 10.8.2.3, 10.9.0.0
>
>         Attachments: TestLowerCaseTraversal.java, derby-5096_diff.txt, derby-5096_uncondset_diff.txt, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5096) DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093922#comment-13093922 ] 

Kathey Marsden commented on DERBY-5096:
---------------------------------------


Looking again at this issue, I think it is actually a usage issue, external to Derby and to getCanonicalPath.
Here the user is using the System Property  "user.home")  which has CAPS 
/home/SHENDRIC where the actual directory does not.

When the user called getCanonicalPath() on user home, e.g.

, new File(new File(System.getProperty("user.home")).getCanonicalFile, "productsubdir"); 

getCanonicalPath actually corrected the casing properly.  I wonder if passed the whole string, if getCanonicalPath would resolve the whole thing properly.

Also I would like to look at the actual exception and see what call is actually failing with the uppercase path and whether that should fail on iseries which generally ignores case.


> DisconnectException: "Connection was refused because the database DB was not found" when creating db for first time
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5096
>                 URL: https://issues.apache.org/jira/browse/DERBY-5096
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.7.1.1
>         Environment: System: OS/400 V7R1M0 on PowerPC; JVM: IBM J9 VM 2.4 (consistently reproducible). 
> But also: Windows 2008 R2 on VMWare and Windows 7 64 bit with Sun VM (1.6) too (but not as consistently reproducible)
>            Reporter: Steven Hendrickx
>         Attachments: TestLowerCaseTraversal.java, getconnection_reproduce.zip
>
>
> A process starts derby as network server (new NetworkServerControl, start) and waits for derby to respond (retry ping until success). After the server has started, the same process makes a connection with DriverManager.getConnection().
> The first time this process runs, this will always fail with  "SQLNonTransientConnectionException: The connection was refused because the database Flows;create=true was not found." However, at the same time, "derby.log" and "Flows" directory are created in the derby home. The "Flows" directory contains "log", "seg0", "tmp", "db.lck", "service.properties", etc ...
> The second time the process is started, the connection will succeed and the "Flows" database can be used successfully. From now on, every start will be successful. After cleaning the derby home directory, you get the exception again after the first start.
> The attachment contains a Java program (DerbyGetConnection.java) that reproduces this problem consistently on our OS/400 V7R1M0 with IBM J9 VM. Probably this may happen on other systems too (Win7), but we were unable to reproduce it there (on my machine with Win7, this same program ran successful every run; might be a threading or I/O issue that occurs easily on slower hardware?).
> The attachment contains also derby tracing ("derby.drda.traceAll") and logging/tracing of the DriverManager.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira