Db2

 View Only
Expand all | Collapse all

(docker) db2 management console not connecting to db2 database

  • 1.  (docker) db2 management console not connecting to db2 database

    Posted Tue November 22, 2022 09:13 AM
    Hello Everyone,

    Currently i try to establish a connection from a docker container running db2 management console to a docker db2 database.

    Not sure if there are any solutions. googling for a few days now but i am unable to resolve the situation. I'm on mac osx catalina

    what i did:

    - get database up and running in docker. (Docker Hub)
    - get console up and running in docker (Docker Hub)

    - console is approachable in browser, i am able to log into the console with the username and password provided
    - unable to connect to the database with default user "db2inst" and self chosen password.

    the console spawns a warning:
    HWCREP0011E: Failed to connect to the repository database. Exception java.net.ConnectException: Error opening socket to server localhost/127.0.0.1 on port 50,000 with message: Connection refused (Connection refused). ERRORCODE=-4499, SQLSTATE=08001

    then i pulled my hair out and downloaded dbeaver. dbeaver has no issues connection to the dockerized database with the same credentials.

    Does anyone have a solution how to connect from the db2 management console instead of dbeaver?

    Kind regards,
    Wouter

    ------------------------------
    Wouter Visser
    ------------------------------

    #Db2


  • 2.  RE: (docker) db2 management console not connecting to db2 database

    Posted Thu November 24, 2022 09:17 AM

    Hi Wouter Visser,
    Thanks for reporting this issue.

    According to the message `Error opening socket to server localhost/127.0.0.1 on port 50,000 with message: Connection refused` , it seems DMC connect to DB using `localhost/127.0.0.1`, DMC and Db2 are in different container, DMC can not connect to DB with `localhost/127.0.0.1`.  Please replace to the DB2 hostname/IP which can be connected in DMC container.

    Let me know if you have any concerns.

    Thank you. 



    ------------------------------
    HONG LIU WANG
    ------------------------------