I got this error when i tried to run db2 on a docker container. Anyway, I’m using apple silicon chip. It worked perfectly just fine before my laptop got updated to from sonoma 14.2 to 14.3. Now I got this error when I want to run the container.
DB2 State : Operable
DB2 has not been started
Starting DB2...
db2start: error while loading shared libraries: libicudatadb2.so.32: cannot enable executable stack as shared object requires: Invalid argument
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
(*) All databases are now active.
(*) Setup has completed.
HOSTNAME: 54f62d87e0cf
FUNCTION: DB2 UDB, config/install, sqlfLogUpdateCfgParam, probe:30
CHANGE : CFG DBM: "Dftdbpath" From: "" To: "/database/data"
2024-01-24-06.05.46.957009+000 I5190E318 LEVEL: Event
PID : 70332 TID : 140737382190592 PROC : db2flacc
INSTANCE: db2inst1 NODE : 000
HOSTNAME: 54f62d87e0cf
FUNCTION: DB2 UDB, config/install, sqlfLogUpdateCfgParam, probe:30
CHANGE : CFG DBM: "Federated" From: "0" To: "1"
(*) Ending DB2 with db2stop force and db2ts "stop for text"
db2stop: error while loading shared libraries: libicudatadb2.so.32: cannot enable executable stack as shared object requires: Invalid argument
(*) Done
This is my run command.
docker run --rm -ti --platform linux/amd64 -itd --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=root -v db2-volume:/database ibmcom/db2 uname -m x86_64
Hope someone can help with my problem.
2
Answers
Turning of Rosetta in the Docker Desktop settings resolves the issue. To properly use Rosetta we have to wait for an fix by either apple or docker itself.
Obviously this impacts DB performance, but for our local development this is ok.
I run into the same issue that DB2 is now longer starting with rosetta enabled after the 14.3 update. I i see this correctly, it is not possible to disable rosetta just for one specific container?