It would be good to inform IBM, that v12.1.2 db2iupdt / installFixPack still fail on systems with:
$ sudo sysctl fs.protected_regular
fs.protected_regular = 2
For example:
$ sudo /tmp/server_dec/installFixPack -n -y -b /opt/ibm/db2/V12.1/
Missing value for token[1].
DBI1017I installFixPack is updating the base Db2 installation, located
in /opt/ibm/db2/V12.1/ and is applying the new fix pack to s.
A minor error occurred during the execution.
For more information see the DB2 installation log at
"/tmp/installFixPack.log.154409".
and the log file contains:
...
Installing: GUARDIUM_INST_MNGR_CLIENT
Updating Db2 file sets :.......Success
Executing control tasks :.......Success
Updating global registry :.......Success
Starting Db2 Fault Monitor :.......Success
Updating the db2ls and db2greg link :.......Success
ERROR: DBI1084E An attempt to create /home/db2inst1/sqllib/ctrl/.fencedID failed.
Explanation:
An error occurred when creating the given file or directory.
User response:
Check that there is enough space in the file system and that you have
write permission for the required directory. Suggested directory
permissions are u=rwx,go=rx.
ERROR: An error occurred while updating the instance "db2inst1". The return
value is "5370". Run the command "/opt/ibm/db2/V12.1/instance/db2iupdt" to
update this instance after the install completes. If the problem persists
contact your technical service representative.
...
Root can't write to this file on such systems:
$ ls -ld ~db2inst1/sqllib/ctrl
drwxrwsr-t 2 db2inst1 db2iadm1 4096 Jun 18 12:38 /home/db2inst1/sqllib/ctrl
$ echo db2fenc1 | sudo tee ~db2inst1/sqllib/ctrl/.fencedID
tee: /home/db2inst1/sqllib/ctrl/.fencedID: Permission denied
db2fenc1
The workaround which db2iupdt still doesn't use is:
$ sudo sysctl -w fs.protected_regular=0
fs.protected_regular = 0
$ echo db2fenc1 | sudo tee ~db2inst1/sqllib/ctrl/.fencedID
db2fenc1
$ sudo /opt/ibm/db2/V12.1/instance/db2iupdt db2inst1
...
The execution completed successfully.
$ sudo sysctl -w fs.protected_regular=2
fs.protected_regular = 2
------------------------------
Mark Barinstein
------------------------------
Original Message:
Sent: Wed June 18, 2025 02:45 AM
From: Joachim Müller
Subject: Db2 12.1.2 with Docker on Windows (WSL)
In the meantime I open a case and IBM Support has tested and encountered the same problem, They have engaged the area experts to check on this behavior.
Best regards, Joachim
------------------------------
Joachim Müller
Original Message:
Sent: Mon June 16, 2025 11:27 AM
From: Mark Barinstein
Subject: Db2 12.1.2 with Docker on Windows (WSL)
The problem is that the following command runs every time a container is started.
${DB2DIR?}/instance/db2icrt -update-instance-if-exists -u ${FENCED_USER?} ${DB2INSTANCE?}
I'm not sure what it does internally with this undocumented `-update-instance-if-exists` flag or if this flag is a culprit of the problem, but it seems that it sets wrong permissions on the following file:
# ls -l /database/config/db2inst1/sqllib/adm/fencedid
-rw-r--r-- 1 root root 31 Jun 11 13:05 /database/config/db2inst1/sqllib/adm/fencedid
and if the same command runs again (on the container restart, for example), it returns non-zero code with the following message:
ERROR: DBI20187E The fencedid file "/database/config/db2inst1/sqllib/adm/fencedid" is invalid because it is not owned by the "root":"db2iadm1". Change the ownership of the fencedid file to be owned by the "root":"db2iadm1" and then rerun the command.
ERROR: An error occurred while configuring the instance "db2inst1".
So, if you want this funny rifle to shoot more than once, then you should manually set the corresponding permissions on a stopped container like this:
sudo docker run --rm -v database:/database --entrypoint /bin/bash icr.io/db2_community/db2 -c "chown root:1000 /database/config/db2inst1/sqllib/adm/fencedid"
Or don't forget to run this `chown` inside the running container (as root) after its successful startup.
------------------------------
Mark Barinstein
Original Message:
Sent: Wed June 11, 2025 07:53 AM
From: Joachim Müller
Subject: Db2 12.1.2 with Docker on Windows (WSL)
Hello Mark,
So I'm not alone...
That's sad. Let's hope that IBM or the builder of the container will solve the problem shortly.
Best regards, Joachim
------------------------------
Joachim Müller
Original Message:
Sent: Wed June 11, 2025 07:46 AM
From: Mark Barinstein
Subject: Db2 12.1.2 with Docker on Windows (WSL)
Hello.
I have the same with docker on linux.
Seems, that it runs a new installation erroneously every time on container start.
Bad container action design.
I saw the same when I removed 12.1.1 container and pulled a new 12.1.2 image.
Now my container restarts in a loop.
docker logs after stop/start of the container:
(*) Restoring global registry file ...
(*) Preparing the environment before updating the instance ...
(*) Fixing /etc/services file for DB2 ...
(*) Fixing db2nodes file configuration ...
(*) Creating instance ...
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.844".
DBI1446I The db2icrt command is running.
DBI1264E This program failed. Errors encountered during execution were
written to the installation log file. Program name:
db2icrt. Log file name: /tmp/db2icrt.log.844.
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: 2025-06-11-11.30.51.948473
Creating directory /database/config/db2icrt/DB2SUPPORT
Starting collection on host db2-12_1
Creating directory /database/config/db2icrt/DB2SUPPORT/db2-12_1_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 /database/config/db2inst1/sqllib/db2nodes.cfg
Collecting /tmp/db2icrt.log.108
Collecting /tmp/db2icrt_local.log.4831
Collecting /tmp/db2icrt.log.844
Collecting directory /database/config/db2inst1/sqllib/db2dump
Collection on host db2-12_1 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
------------------------------
Mark Barinstein
Original Message:
Sent: Wed June 11, 2025 06:57 AM
From: Joachim Müller
Subject: Db2 12.1.2 with Docker on Windows (WSL)
Hello Community,
Does anybody has the same issue with Db2 12.1.2 with Docker on Windows (WSL)?
The first run with Db2 works fine until I restart the Container:
docker run -h db2server --name db2server --restart=always --detach --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INSTANCE=myuser -e DB2INST1_PASSWORD=mypw -e DBNAME=sample -e SAMPLEDB -v db2data:/database icr.io/db2_community/db2:latest
Stoping and starting the Container occurred with following message and is looping with running db2support command:
025-06-11 12:12:19 (!) There was a problem configuring the instance. Copying over logs and traces to /database/config ...
2025-06-11 12:12:19 mkdir: cannot create directory '/database/config/db2icrt': File exists
Unfortunately no more information.
Best regards, Joachim
------------------------------
Joachim Müller
------------------------------