Db2

Db2

Connect with Db2, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  DB2 in Docker >=3.3.0 not working

    Posted Wed April 14, 2021 11:40 AM
    Edited by System Admin Fri January 20, 2023 04:19 PM
      |   view attached
    Hi DMC team,

    I have issues running a DB2 Docker image with the latest Docker Desktop app (version 3.3.0, Docker for Mac release notes). Tried multiple DB2 image versions, same results: the container fails to start and shuts down after approximately 1 minute or so. Logs below:
    corcoja@Iulians-Work-MacBook-Pro ~ % docker run -itd --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DBNAME=testdb -e DB2INST1_PASSWORD=the_password!  ibmcom/db2:11.5.5.1
    523e4d44abc948aa80ca36a70542883a4421c56f1c54be41b91444a038d4c372
    corcoja@Iulians-Work-MacBook-Pro ~ % docker logs -f db2
    (*) Previous setup has not been detected. Creating the users... 
    (*) Creating users ...
    (*) Creating instance ... 
    DBI1446I  The db2icrt command is running.
    
    
    DB2 installation is being initialized.
    
     Total number of tasks to be performed: 4 
    Total estimated time for all tasks to be performed: 309 second(s) 
    
    Task #1 start
    Description: Setting default global profile registry variables 
    Estimated time 1 second(s) 
    Task #1 end 
    
    Task #2 start
    Description: Initializing instance list 
    Estimated time 5 second(s) 
    Task #2 end 
    
    Task #3 start
    Description: Configuring DB2 instances 
    Estimated time 300 second(s) 
    Task #3 end 
    
    Task #4 start
    Description: Updating global profile registry 
    Estimated time 3 second(s) 
    Task #4 end 
    
    A minor error occurred during the execution.
    
    For more information see the DB2 installation log at "/tmp/db2icrt.log.77".
    DBI1264E  This program failed. Errors encountered during execution were
          written to the installation log file. Program name:
          db2icrt. Log file name: /tmp/db2icrt.log.77.
    
    Explanation: 
    
    This message is returned when some processes and operations have failed.
    Detailed information about the error was written to the log file.
    
    User response: 
    
    Contact IBM support to get assistance in resolving this issue. Keep the
    log file intact as this file is an important reference for IBM support.
    
    
       Related information:
       Contacting IBM Software Support
    
    
    (!) There was a problem configuring the instance. Copying over logs and traces to /database/config ...
    
    
                  _______   D B 2  S u p p o r t   ______
    
    
    This program generates information about a DB2 server, including information
    about its configuration and system environment. The output of this program
    is stored in a file named 'db2support.zip'. If possible, run this program
    while the problem is occurring.
    
    
    For the most complete output, this utility should be invoked with root
    authority. Users with more limited privileges on the system can run this tool,
    however, some of the data collection actions will result in reduced reporting
    and reduced output.
    
    Output file is "/database/config/db2icrt/db2support.zip"
    Time and date of this collection: 2021-04-14-10.37.10.192916
    
    Creating directory /database/config/db2icrt/DB2SUPPORT
    Starting collection on host 523e4d44abc9
     Creating directory /database/config/db2icrt/DB2SUPPORT/523e4d44abc9_IIH
    Collecting resources group information
       The following file was not found or could not be executed during diagnostic
       data collection: /usr/bin/lssam
       The following file was not found or could not be executed during diagnostic
       data collection: /usr/bin/lsrsrc
       The following file was not found or could not be executed during diagnostic
       data collection: /usr/bin/lsrsrc
    Collecting user identity information
    Collecting current process information
    Collecting active interprocess communications facilities information
    Collecting system information
    Collecting detailed data on system and hardware errors
       The following file was not found or could not be executed during diagnostic
       data collection: /usr/bin/errpt
    Collecting registry contents
    Collecting GPFS information
       The following file was not found or could not be executed during diagnostic
       data collection: /usr/lpp/mmfs/bin/gpfs.snap
    Collecting configuration, log and trace information for RSCT
       The following file was not found or could not be executed during diagnostic
       data collection: /usr/bin/ctsnap
    Collecting information about installed DB2 products
    Collecting information about state of db2 instance
    Collecting information about DB2 product prerequisites
    Collecting /etc/services 
    Collecting /tmp/db2icrt_local.log.1293
    Collecting /tmp/db2icrt.log.77
    Collection on host 523e4d44abc9 completed
    Compressing files in /database/config/db2icrt/DB2SUPPORT directory 
    Collecting /database/config/db2icrt/db2support.log 
    Collecting db2support.out 
    
    
    db2support is now complete.
     An archive file has been produced: "/database/config/db2icrt/db2support.zip"
    
    "15" warnings found during db2support collection
    corcoja@Iulians-Work-MacBook-Pro ~ % ​


    Contents of `/tmp/db2icrt.log.77`:

    DB2 Setup log file started at:  Wed Apr 14 10:36:05 2021 UTC
    ============================================================
    
    Operating system information: Linux 5.10.25-linuxkit.#1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 
                                            
                                            
    New instances:                          
        Instance name:                      	db2inst1
            Instance user information:      	
                User name:                  	db2inst1
            Fenced user information:        	
                User name:                  	db2fenc1
                                            
                                            
                                            
                                            
    
    Setting default global profile registry variables :.......Success 
    The maximum number of logical nodes was not specified for the instance 
    "db2inst1". Default parameters will be used.
    
    Initializing instance list :.......Success 
    ERROR:        Program name = db2idbm
    Instance home dir = /database/config/db2inst1,   Sysadm group = db2iadm1
    Instance type = 1,  Auth type = server
    
    DB21015E  The Command Line Processor backend process request queue or input 
    queue was not created within the timeout period.
    Update DBM cfg SYSADM_GROUP errcode = 8
    DBI1281E  The database manager configuration file could not be
          initialized.
    
    Explanation: 
    
    An error occurred when attempting to initialize the database manager
    configuration file. A database manager instance could not be created or
    upgraded.
    
    User response: 
    
    Refer to the log file for troubleshooting. Resolve the problem and try
    the command again. If the problem persists, contact your IBM service
    representative.
    
    
       Related information:
       Gathering diagnostic information for instance creation problems
    
    
    ERROR: An error occurred while configuring the instance "db2inst1".
    
    Configuring DB2 instances :.......Failure 
    Updating global profile registry :.......Success 
    
    Post-installation instructions 
    -------------------------------
    
    Required steps: 
    There were some errors detected during DB2 installation. To collect the information files from the system, run the "db2support -install" command with the proper options before reporting the problem to IBM service. For information regarding the usage of the db2support tool, check the DB2 Information Center. 
    
    DB2 Text Search has not been configured for the instance "db2inst1".To automatically configure DB2 text search services, run the db2iupdt command (or the db2nrupdt command for non-root installations) specifying the -j "TEXT_SEARCH" option.Manual configuration steps can be found in the DB2 Text Search documentation "https://www-01.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.admin.ts.doc/doc/c0051296.html". 
    
    Optional steps: 
    To validate your installation files, instance, and database functionality, run the Validation Tool, /opt/ibm/db2/V11.5/bin/db2val. For more information, see "db2val" in the DB2 Information Center. 
    
    Open First Steps by running "db2fs" using a valid user ID such as the DB2 instance owner's ID. You will need to have DISPLAY set and a supported web browser in the path of this user ID. 
    
    Verify that you have access to the DB2 Information Center based on the choices you made during this installation. If you performed a typical or a compact installation, verify that you can access the IBM Web site using the internet. If you performed a custom installation, verify that you can access the DB2 Information Center location specified during the installation. 
    
    Ensure that you have the correct license entitlements for DB2 products and features installed on this machine. Each DB2 product or feature comes with a license certificate file (also referred to as a license key) that is distributed on an Activation CD, which also includes instructions for applying the license file. If you purchased a base DB2 product, as well as, separately priced features, you might need to install more than one license certificate. The Activation CD for your product or feature can be downloaded from Passport Advantage if it is not part of the physical media pack you received from IBM. For more information about licensing, search the Information Center (https://www-01.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.kc.doc/welcome.html) using terms such as "license compliance", "licensing" or "db2licm". 
    
    To use your DB2 database product, you must have a valid license. For information about obtaining and applying DB2 license files, see http://www-01.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.qb.server.doc/doc/c0061199.html. 
    
    
    DB2 Setup log file finished at:  Wed Apr 14 10:37:10 2021 UTC
    ============================================================
    



    After some investigation, I noticed some of the errors were related to `/etc/null` (strangely, the virtual file had incorrect permissions). Tried fixing the permissions with `rm -f /dev/null; mknod -m 666 /dev/null c 1 3`, which resulted in the container 
    starting up and running with no visible problems, yet the DB was inaccessible (maybe this helps in your investigation). Also, I'm attaching the DB2 support archive to this post.

    Thank you,
    Iulian.



    ------------------------------
    Iulian Corcoja
    ------------------------------
    #Db2

    Attachment(s)

    zip
    db2support.zip   142 KB 1 version


  • 2.  RE: DB2 in Docker >=3.3.0 not working

    Posted Thu April 15, 2021 07:33 AM
    UPDATE:
    The problem looks to be related to Docker when creating a pod with the `--privileged` argument:
    1. https://github.com/docker/for-mac/issues/5559
    2. https://github.com/docker/for-mac/issues/5527
    3. https://github.com/docker/for-win/issues/10910


    ------------------------------
    Iulian Corcoja
    ------------------------------



  • 3.  RE: DB2 in Docker >=3.3.0 not working

    Posted Thu April 15, 2021 11:34 AM
    We experience exactly the same problem. The latest DB2 Docker image with the same configuration ran before Docker (Desktop) upgrades and now produces the error described above by Iulian. On a Linux server with an older Docker version, DB2 still works.

    On Windows, it helped to fully uninstall and then reinstall Docker Desktop to get it running again. Clean/Purge Data or Resetting Docker Desktop to factory defaults wasn't enough.

    On Mac, reinstall didn't help. I could directly reproduce this with another Mac running an older Docker Desktop version with DB2 still working. After upgrading to 3.3.0, it broke. 

    Older versions of the DB2 image (11.5.0.0, 11.5.4.0) have the same issue.

    ------------------------------
    Carsten Erker
    ------------------------------



  • 4.  RE: DB2 in Docker >=3.3.0 not working

    Posted Fri April 16, 2021 09:00 AM
    Docker released a new version 3.3.1 which fixes this issue.

    https://docs.docker.com/docker-for-mac/release-notes/
    https://docs.docker.com/docker-for-windows/release-notes/

    ------------------------------
    Iulian Corcoja
    ------------------------------