milan.vavro
sad I’m sad

Can't connect to Derby DB to store my metadata

Hi together, I got following problem :
I'm using Win 7 64bit Professional, and trying to use recommended Derby DB to store my metadata, but while connecting to Derby DB I'm receiving following error :

Communication with database failed
Unable to connect to the database; nested exception is:
java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Error connecting to server localhost on port 1537 with message Connection refused: connect.

Had someone similar problem or anyone have an idea how to solve this issue ? Thanks
1 person has
this question
+1
Reply

  • Hello Milan,
    I use Win 7 64bit for half a year without a problem in DQ Analyzer, so let's focus on what might go wrong with your database.

    Derby DB is installed together with DQ Analyzer to store data for drill-through, if you have another connected database or do not use drill-through at all, you don't need it.

    The database is installed and running as a Windows service. Could you, please, check if you have the server running? Type services in Start menu and there should be service called "Apache Derby Database for DQ Analyzer" with status Started. If there is the service, but it is not running, try and start it by right-clicking the service and choosing start.

    In case there isn't the service installed, you should try and run the installation again. At the end of the installation, there is a dialog where you can install the database with default settings on default port or specify different port. If the installation of the database fails, the reason will be written on a screen by the installator.
    • Hi Martin,
      thanks for your interest. You were right about problem with "Apache Derby DB for DQ Analyzer" service which comes into point now. I figured out, that this server is still in status "Starting". It was impossible to stop it or restart, so I changed starting property to manual, and after restart tried to start it manually , but with same result : it hang up with status "Starting". (with a minor innovations i did it for a few times).
      My next try was to reinstall whole DQ Analyzer - uninstalled the old one a installed new, but now (not sure if the error was also before), I'm receiving an error during installation reporting :

      Cannot start DB service.
      The database service failed to start.
      The error message was : Error starting DB. Code : 2

      Do you want to try again ?
      (of course nothing happens after clicking on Yes :) )

      I think we are closer with specification of "why I can't connect to my Apache Derby DB", but not much closer to solution. Can you give me any hint ? Thank you
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hello Milan,
    what have I tried is to run an another server on the port where I was installing the database and I got the same "Error starting DB. Code:2" message. I am not 100% sure if installation the database on a different port is going to help you, but you may check the logs of the database. You can find them in \db\logs in files stdout and stderr. If you try to run the database on an already used port, it will produce message like "java.net.BindException: Address already in use: JVM_Bind" in the stdout file. Even if this is not the cause of your problem, the logs should be more descriptive then "Code : 2" and would probably lead us to the solution.
    • Hi Martin,
      I've checked booth : tried to choose another port, and also checked Firewall if this port is not blocked, but with no result. I've also checked for logs in directory you wrote, but none of this files were found - probably caused by not starting of this service. (no service started - no logs have been made). To be sure , that app got no issue with other application installed, I've asked my college to try it on his computer, but exactly with same result and Error Code: 2.
      Therefore it lead me to temptation, that there could be maybe problem with version I'm trying to install : dqanalyzer-7.0.0-ga-setup. Or i'm missing something ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Milan,
    7.0.0-ga is the correct version. I would suspect that either a firewall or policy file might be preventing the service from starting. To find out what is happening, one can try to invoke the database service interactively.

    In order to do so, go to the subfolder "db\jsl\bin", and open a command propt in it (for example, by holding Shift and right-clicking an empty space inside the file listing - "Open command window here" option should appear). Once inside the command prompt, run "jsl -debug". Normally, you should see something like:

    C:\Ataccama DQ Analyzer 7\db\jsl\bin>jsl -debug
    Debugging Apache Derby Database for DQ Analyzer (DerbyDB_demo_1537).
    Now starting JVM
    ControlHandler registered after JVM start
    Now destroying JVM



    ... and the program should be running. At that time, you should be able to connect to the database from the UI. You can then stop the database by pressing Ctrl-C:


    Stopping Apache Derby Database for DQ Analyzer (DerbyDB_demo_1537).
    Trying to stop service via JNI call to com/ataccama/derby/JslDerbyBridge.stop
    Done
    Exit code 1



    Let us know what was the output of the program in your case and if there were any new files inside the "db\logs" folder.
    • Thanks for an advice !
      At first, i've tried to run jsl -debug, and finally some error occurred :

      "The program can't start because MSVCR71.dll is missing from your computer."

      So I made a copy of MSVCR71.dll and put it into "\db\jsl\bin". After that, I was able to run the DB service with no other complications. But from the App GUI still the connect problem occurred. So I've uninstalled the old app, install files from the new, until the form for choosing DB showed up.
      Then I made a copy of MSVCR71.dll into "\db\jsl\bin" and clicked "Finish" button. I could see as the Service started correctly and finally could connect to my "DrillDown" DB. Now works all like a charm. Thanks a lot both of you !
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Milan,
    Thanks a lot for reporting this issue. We've made a new build where the database service does not depend on msvcr.dll anymore. It is available at http://files.ataccama.com/downloads/D... . Would you mind checking if it works fine on your machine so that we can make that available for all future downloaders?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Milan,
    Thank you for for your help. We have just placed the fixed version on the main download site.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated