Db2

 View Only
  • 1.  DB2 not listening on IPv4 port

    Posted 13 days ago
    I've done DB2 (v11.5) installation on RHEL. Just for testing so both OS and DB are fresh. All went fine, db2start message is SQL1063N DB2START processing was successful, but the instance is not listening on IPv4 port.
    Here's what netstat shows:
    [db2inst1@localhost ~]$ netstat -an |grep tcp
    tcp        0      0 192.168.130.1:53        0.0.0.0:*               LISTEN     
    tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:44321         0.0.0.0:*               LISTEN     
    tcp        0      0 127.0.0.1:4330          0.0.0.0:*               LISTEN     
    tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
    tcp6       0      0 :::25010                :::*                    LISTEN     
    tcp6       0      0 :::22                   :::*                    LISTEN     
    tcp6       0      0 ::1:631                 :::*                    LISTEN     
    tcp6       0      0 ::1:44321               :::*                    LISTEN     
    tcp6       0      0 ::1:4330                :::*                    LISTEN     
    tcp6       0      0 :::111                  :::*                    LISTEN     
    [db2inst1@localhost ~]$ 
    only IPv6 is listening.
     
    I doublechecked the configuration. Here's the /etc/services part
     
    DB2_db2inst1 20016/tcp
    DB2_db2inst1_1 20017/tcp
    DB2_db2inst1_2 20018/tcp
    DB2_db2inst1_3 20019/tcp
    DB2_db2inst1_4 20020/tcp
    DB2_db2inst1_END 20021/tcp
    db2c_db2inst1 25010/tcp
    and db2 settings:
     
    [db2inst1@localhost ~]$ db2set -all
    [i] DB2COMM=TCPIP
    [i] DB2AUTOSTART=YES
    [g] DB2SYSTEM=localhost.localdomain
    [db2inst1@localhost ~]$ 
    I tried changing the port number to 50000 with the same result.
    I changed DIAGLEVEL 4 hoping that there will be something in the log, but nothing that I could see that would indicate a problem with IPv4.
    In the end I uninstalled the database completely and reinstalled as I thought I might had done something wrong during the first installation. It was done through CLI. The second installation was done using wizzard. But nothing changed. DB is not listening on IPv4 port and I ran out of ideas.
    Does anyone have idea what could be wrong or what else could be checked?


    ------------------------------
    KL
    ------------------------------


  • 2.  RE: DB2 not listening on IPv4 port

    Posted 13 days ago

    Does the server have the dbm cfg SVCENAME set to whatever port you want to listen on?



    ------------------------------
    Matthew Emmerton
    ------------------------------



  • 3.  RE: DB2 not listening on IPv4 port
    Best Answer

    IBM Champion
    Posted 11 days ago

    I would also check to get a better hostname than localhost.localdomain.

    maybe double check with https://www.ibm.com/docs/en/db2/11.5?topic=configuring-db2-server-communications-tcpip and following pages.



    ------------------------------
    Roland Schock
    IBM Champion and IBM Gold Consultant
    ------------------------------



  • 4.  RE: DB2 not listening on IPv4 port

    Posted 10 days ago

    Thank you Roland, I know localhost.localdomain is not a good one but I had to start from something. Anyways, I got it working.

    All I did was to remove (hashed actually) the line ::1 localhost localhost.localdomain from /etc/hosts and restart db2.

    It seems that when db2 has options to listen on IPv4 or IPv6 it chooses the latter one.  The ::1 local... line in hosts was after 127.0.0.1 local..., yet db2 chose to use ::1 to listen on.



    ------------------------------
    Krzysztof Łukawski
    ------------------------------