Db2

 View Only
  • 1.  Db2 Instance Startup Fails With Messages SQL1042C and SQL1032N Creating Docker Image From ibmcom/db2:11.5.4.0

    Posted Mon August 10, 2020 06:12 PM
    I am attempting to create a Docker image based on ibmcom/db2:11.5.4.0 with test databases added during the image build process. Although I am able to run and connect to the IBM Db2 instance within a privileged container run following the image build process, I am unable to do so during the image build process itself. I wish to start Db2 during the image build process so that I can load test data to be made available in a running container subsequently created from the image. I am attempting to build the image as follows (to enable privileged containers during the build):

    docker buildx build --allow security.insecure --load -t IMAGE:TAG .

    Here is the output from the docker buildx build command (output from db2diag.log omitted for sake of brevity):

    #14 0.149 (*) Previous setup has not been detected. Creating the users...
    #14 0.149 (*) Creating users ...
    #14 0.227 (*) Creating instance ...
    #14 0.870 DB2 installation is being initialized.
    #14 0.870
    #14 0.870 Total number of tasks to be performed: 4
    #14 3.524 Total estimated time for all tasks to be performed: 309 second(s)
    #14 3.524
    #14 3.534 Task #1 start
    #14 3.534 Description: Setting default global profile registry variables
    #14 3.534 Estimated time 1 second(s)
    #14 3.575 Task #1 end
    #14 3.575
    #14 3.580 Task #2 start
    #14 3.580 Description: Initializing instance list
    #14 3.580 Estimated time 5 second(s)
    #14 4.521 Task #2 end
    #14 4.521
    #14 4.525 Task #3 start
    #14 4.525 Description: Configuring DB2 instances
    #14 4.525 Estimated time 300 second(s)
    #14 20.17 Task #3 end
    #14 20.17
    #14 20.18 Task #4 start
    #14 20.18 Description: Updating global profile registry
    #14 20.18 Estimated time 3 second(s)
    #14 20.18 Task #4 end
    #14 20.18
    #14 20.19 The execution completed successfully.
    #14 20.19
    #14 21.91 For more information see the DB2 installation log at "/tmp/db2icrt.log.70".
    #14 21.92 DBI1446I The db2icrt command is running.
    #14 21.92
    #14 21.92
    #14 21.92 DBI1070I Program db2icrt completed successfully.
    #14 21.92
    #14 21.92
    #14 22.20 08/10/2020 21:11:37 0 0 SQL1032N No start database manager command was issued.
    #14 22.20 SQL1032N No start database manager command was issued. SQLSTATE=57019
    #14 23.69 (*) Cataloging existing databases
    #14 23.69 ls: cannot access /database/data/db2inst1/NODE0000: No such file or directory
    #14 23.69 (*) Applying Db2 license ...
    #14 23.74
    #14 23.74 LIC1402I License added successfully.
    #14 23.74
    #14 23.74
    #14 23.74 LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/ibm/db2/V11.5/license/en_US.iso88591"
    #14 23.74 (*) Saving the checksum of the current nodelock file ...
    #14 23.75 (*) Updating DBM CFG parameters ...
    #14 25.19 DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
    #14 25.19 successfully.
    #14 26.37 DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
    #14 26.37 successfully.
    #14 27.53 DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
    #14 27.53 successfully.
    #14 27.53 No Cgroup memory limit detected, instance memory will follow automatic tuning
    #14 27.53 (*) Remounting /database with suid...
    #14 27.53 mount: can't find /database in /etc/fstab
    #14 27.62
    #14 27.62 DB2 State : Operable
    #14 27.62 DB2 has not been started
    #14 27.62 Starting DB2...
    #14 27.62
    #14 88.00 08/10/2020 21:12:43 0 0 SQL1042C An unexpected system error occurred.
    #14 88.00 SQL1032N No start database manager command was issued. SQLSTATE=57019


    ------------------------------
    Michael Morey
    ------------------------------

    #Db2


  • 2.  RE: Db2 Instance Startup Fails With Messages SQL1042C and SQL1032N Creating Docker Image From ibmcom/db2:11.5.4.0

    Posted Tue August 11, 2020 03:37 AM
    Hello Michael,
    with the instructions following  
    https://hub.docker.com/r/ibmcom/db2
    it works for me at my Mac Catalina workstation.
    Database server = DB2/LINUXX8664 11.5.4.0
    my Database directory: /database/data/db2inst1/NODE0000
    maybe - a problem at your run Is : 
    #14 27.53 (*) Remounting /database with suid...
    #14 27.53 mount: can't find /database in /etc/fstab



    ------------------------------
    Jürgen Jost
    ------------------------------



  • 3.  RE: Db2 Instance Startup Fails With Messages SQL1042C and SQL1032N Creating Docker Image From ibmcom/db2:11.5.4.0

    Posted Wed August 12, 2020 05:43 PM
    Edited by System Fri January 20, 2023 04:48 PM
    Dear Jürgen,

    Thanks for the suggestion. It would appear, however, that there is no /etc/fstab file present in the original IBM Db2 11.5.4.0 Docker container. Without having seen the Dockerfile and related scripts used to create the IBM-supplied Docker image at https://hub.docker.com/r/ibmcom/db2, it is difficult to know exactly how the image was created and therefore what must be done to start the database during the creation of an image built from the IBM-supplied image.


    ------------------------------
    Michael Morey
    ------------------------------



  • 4.  RE: Db2 Instance Startup Fails With Messages SQL1042C and SQL1032N Creating Docker Image From ibmcom/db2:11.5.4.0

    Posted Thu April 29, 2021 09:13 AM
    Hi Jürgen Jost,

    I am also facing the similar issue while attempting to create a Docker image based on ibmcom/db2:11.5.5.1 with test databases added during the image build process.

    ------------------------------
    Vineet Garg
    ------------------------------



  • 5.  RE: Db2 Instance Startup Fails With Messages SQL1042C and SQL1032N Creating Docker Image From ibmcom/db2:11.5.4.0

    Posted Thu June 09, 2022 04:00 PM
    Facing the exact same problem while trying to mount a directory inside the container: 

    docker run -v /volume2/data/books/:/mnt/books -e LICENSE=accept -t ibmcom/db2 /bin/bash


    ------------------------------
    Francesco Mantovani
    ------------------------------