英文:
Docker/DB2 - Released lock on the file /database/config/db2inst1/sqllib/ctrl/db2strst.lck - how to fix this?
问题
I try to run the ibmcom/db2 image from the Docker hub and it's not working..
当我运行以下Docker命令时,出现问题:
When I do the docker run docker run --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=test -e DBNAME=testdb ibmcom/db2
it is not working.
我在db2start结束时收到以下错误消息:
I get the following error at the end of the db2start :
2023-02-09-18.58.37.677287+000 I307847E393 LEVEL: Warning
PID : 25258 TID : 139812728498048 PROC : db2start
INSTANCE: db2inst1 NODE : 000
HOSTNAME: 4cf8a32d373a
FUNCTION: DB2 UDB, base sys utilities, sqleReleaseStStLockFile, probe:16242
MESSAGE : Released lock on the file:
DATA #1 : String, 50 bytes
/database/config/db2inst1/sqllib/ctrl/db2strst.lck
Can someone help me please ?
有人可以帮助我吗?
I've tried to remove the file, to connect in the container and do this command suggested in another page :
我尝试删除文件,连接到容器并执行另一页上建议的以下命令:
sudo chown db2inst1 /database/config/db2inst1/sqllib/adm/*
But I get the following error :
但我收到以下错误消息:
chown: cannot dereference '/database/config/db2inst1/sqllib/adm/ITLMready.properties': No such file or directory
-- EDIT --
-- 编辑 --
I've inspected the db2diag.log and I've those 2 errors :
我检查了db2diag.log文件,发现以下两个错误:
2023-02-09-20.46.55.817407+000 I232915E544 LEVEL: Error (OS)
PID : 21597 TID : 139979254654720 PROC : db2wdog 0 [db2inst1]
INSTANCE: db2inst1 NODE : 000
HOSTNAME: db3d3429ea6b
EDUID : 2 EDUNAME: db2wdog 0 [db2inst1]
FUNCTION: DB2 UDB, oper system services, sqloSetPriorityHdl, probe:6156
MESSAGE : ZRC=0x83000001=-2097151999
CALLED : OS, -, sched_setscheduler OSERR: EPERM (1)
DATA #1 : String, 51 bytes
Failure setting absolute priority of kernel thread.
2023-02-09-20.46.55.819889+000 I233460E544 LEVEL: Error (OS)
PID : 21597 TID : 139979254654720 PROC : db2wdog 0 [db2inst1]
INSTANCE: db2inst1 NODE : 000
HOSTNAME: db3d3429ea6b
EDUID : 2 EDUNAME: db2wdog 0 [db2inst1]
FUNCTION: DB2 UDB, oper system services, sqloSetPriorityHdl, probe:6156
MESSAGE : ZRC=0x83000001=-2097151999
Nothing works
什么都不起作用
英文:
I try to run the ibmcom/db2 image from ther Docker hub and it's not working..
When I do the docker run docker run --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=test -e DBNAME=testdb ibmcom/db2
it is not working.
I get the follow error at the end of the db2start :
2023-02-09-18.58.37.677287+000 I307847E393 LEVEL: Warning
PID : 25258 TID : 139812728498048 PROC : db2start
INSTANCE: db2inst1 NODE : 000
HOSTNAME: 4cf8a32d373a
FUNCTION: DB2 UDB, base sys utilities, sqleReleaseStStLockFile, probe:16242
MESSAGE : Released lock on the file:
DATA #1 : String, 50 bytes
/database/config/db2inst1/sqllib/ctrl/db2strst.lck
Can someone help me please ?
I've tried to remove the file, to connect in the container and do this command suggested in another page :
sudo chown db2inst1 /database/config/db2inst1/sqllib/adm/*
But I get the following error :
chown: cannot dereference '/database/config/db2inst1/sqllib/adm/ITLMready.properties': No such file or directory
-- EDIT --
I've inspected the db2diag.log and i've those 2 errors :
2023-02-09-20.46.55.817407+000 I232915E544 LEVEL: Error (OS)
PID : 21597 TID : 139979254654720 PROC : db2wdog 0 [db2inst1]
INSTANCE: db2inst1 NODE : 000
HOSTNAME: db3d3429ea6b
EDUID : 2 EDUNAME: db2wdog 0 [db2inst1]
FUNCTION: DB2 UDB, oper system services, sqloSetPriorityHdl, probe:6156
MESSAGE : ZRC=0x83000001=-2097151999
CALLED : OS, -, sched_setscheduler OSERR: EPERM (1)
DATA #1 : String, 51 bytes
Failure setting absolute priority of kernel thread.
2023-02-09-20.46.55.819889+000 I233460E544 LEVEL: Error (OS)
PID : 21597 TID : 139979254654720 PROC : db2wdog 0 [db2inst1]
INSTANCE: db2inst1 NODE : 000
HOSTNAME: db3d3429ea6b
EDUID : 2 EDUNAME: db2wdog 0 [db2inst1]
FUNCTION: DB2 UDB, oper system services, sqloSetPriorityHdl, probe:6156
MESSAGE : ZRC=0x83000001=-2097151999
Nothing works
答案1
得分: 0
我们找到了解决方案!
我们需要在图像“ibmcom/db2”下的“/database/config/”目录中复制一个名为“instance.cfg”的文件,其中包含以下内容,以便能够运行它:
[database]
port=50000
[instance]
name=db2inst1
我们仍然有警告,但现在与数据库的连接是成功的。
英文:
We found the solution !
We had to copy, inside the image "ibmcom/db2", under "/database/config/", a file named "instance.cfg" with the following content to be able to run it :
[database]
port=50000
[instance]
name=db2inst1
We still have the warning but now the connection to the database is successful.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论