chainmaker-vm-docker-go:v2.2.1 容器重新启动后报错
【问题分类】
- bug
- P2P网络相关(包含libp2p,liquid)
- 链账户身份与权限相关(证书问题、public、多签投票问题)
- 核心交易引擎相关(交易池、DAG)
- 共识相关
- 智能合约相关
- 存储相关
- SDK相关
- 长安链CMC工具
- 长安链管理台
- 长安链浏览器
- 长安链合约IDE
- 长安链web签名插件
- 跨链相关
- 轻节点相关
- 隐私计算相关
- 密码学相关
- 其他补充:
【问题描述】(请对问题进行描述,方便定位问题)
- 容器运行情况
[root@ffb-95 ~/gov2]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de856640e894 chainmakerofficial/chainmaker-vm-docker-go:v2.2.1 "/bin/startvm" 4 days ago Up 9 minutes docker-vm
78eab8b9e23a chainmaker:v2.2.1 "./chainmaker start …" 4 days ago Up 9 minutes 0.0.0.0:11301->11301/tcp, 0.0.0.0:12301->12301/tcp cm
1、节点通过docker容器方式启动,合约使用docker-vm的方式部署运行;
2、分别停止节点容器和docker-vm容器;
[root@ffb-95 ~/gov2]$ docker stop 78eab8b9e23a
[root@ffb-95 ~/gov2]$ docker stop de856640e894
3、重新启动节点容器和docker-vm容器,报错;
[root@ffb-95 ~/gov2]$ docker start 78eab8b9e23a
[root@ffb-95 ~/gov2]$ docker start de856640e894
[root@ffb-95 ~/gov2]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de856640e894 chainmakerofficial/chainmaker-vm-docker-go:v2.2.1 "/bin/startvm" 4 days ago Restarting (0) 22 seconds ago docker-vm
78eab8b9e23a chainmaker:v2.2.1 "./chainmaker start …" 4 days ago Up 12 minutes 0.0.0.0:11301->11301/tcp, 0.0.0.0:12301->12301/tcp cm
备注:
若使用docker rm
命令删除docker-vm容器后,重新启动容器,则运行正常;
# 删除docker-vm容器
[root@ffb-95 ~/gov2]$ docker rm -f de856640e894
de856640e894
[root@ffb-95 ~/gov2]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
78eab8b9e23a chainmaker:v2.2.1 "./chainmaker start …" 4 days ago Up 14 minutes 0.0.0.0:11301->11301/tcp, 0.0.0.0:12301->12301/tcp cm
[root@ffb-95 ~/gov2]$ docker-compose up -d
cm is up-to-date
Creating docker-vm ... done
[root@ffb-95 ~/gov2]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3287ab72fb3b chainmakerofficial/chainmaker-vm-docker-go:v2.2.1 "/bin/startvm" 2 seconds ago Up 1 second 0.0.0.0:22351->22359/tcp docker-vm
78eab8b9e23a chainmaker:v2.2.1 "./chainmaker start …" 4 days ago Up 15 minutes 0.0.0.0:11301->11301/tcp, 0.0.0.0:12301->12301/tcp cm
此时的日志信息
[root@ffb-95 ~/gov2/tmp/data/docker-go]$ tail -f log/docker-go.log.2022062011
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:75 start receiving cdm message
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:128 start sending cdm message, goid: 41
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:75 start receiving cdm message
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:128 start sending cdm message, goid: 53
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:75 start receiving cdm message
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:128 start sending cdm message, goid: 44
2022-06-20 11:37:31.556 [INFO] [Docker CDM Api] rpc/cdm_api.go:75 start receiving cdm message
2022-06-20 11:37:31.560 [INFO] [Docker CDM Api] rpc/cdm_api.go:128 start sending cdm message, goid: 47
2022-06-20 11:37:31.560 [INFO] [Docker CDM Api] rpc/cdm_api.go:75 start receiving cdm message
2022-06-20 11:37:40.862 [INFO] [Docker User Controller] core/user_manager.go:80 init uids success, time: [9.955757321s], total user num: [1000]
具体的现象,操作步骤,前置条件等,尽可能描述清楚,有截图说明更佳
【相关日志文件】(如果有报错日志请贴图,或者上传附件)
chainmaker-go 的 log/system.log & bin/panic.log file *
SDK 的 sdk.log file
1、docker-go/log/docker-go.log.xxxxxx 内容
2022-06-20 11:22:22.778 [ERROR] [Docker MANAGER] dockervm/main.go:46 Err in creating docker manager: mkdir /dms: file exists
2022-06-20 11:22:48.767 [ERROR] [Docker Security Env] security/security_env.go:81 fail to set dms directory, err: [mkdir /dms: file exists]
2022-06-20 11:22:48.767 [ERROR] [Docker MANAGER] module/manager.go:33 fail to init directory: mkdir /dms: file exists
2022-06-20 11:22:48.767 [ERROR] [Docker MANAGER] dockervm/main.go:46 Err in creating docker manager: mkdir /dms: file exists
2022-06-20 11:23:40.338 [ERROR] [Docker Security Env] security/security_env.go:81 fail to set dms directory, err: [mkdir /dms: file exists]
2022-06-20 11:23:40.338 [ERROR] [Docker MANAGER] module/manager.go:33 fail to init directory: mkdir /dms: file exists
2022-06-20 11:23:40.338 [ERROR] [Docker MANAGER] dockervm/main.go:46 Err in creating docker manager: mkdir /dms: file exists
2022-06-20 11:24:40.757 [ERROR] [Docker Security Env] security/security_env.go:81 fail to set dms directory, err: [mkdir /dms: file exists]
2022-06-20 11:24:40.757 [ERROR] [Docker MANAGER] module/manager.go:33 fail to init directory: mkdir /dms: file exists
2022-06-20 11:24:40.757 [ERROR] [Docker MANAGER] dockervm/main.go:46 Err in creating docker manager: mkdir /dms: file exists
2022-06-20 11:25:41.130 [ERROR] [Docker Security Env] security/security_env.go:81 fail to set dms directory, err: [mkdir /dms: file exists]
2022-06-20 11:25:41.130 [ERROR] [Docker MANAGER] module/manager.go:33 fail to init directory: mkdir /dms: file exists
2022-06-20 11:25:41.130 [ERROR] [Docker MANAGER] dockervm/main.go:46 Err in creating docker manager: mkdir /dms: file exists
2、log/system.log.xxxxxx 内容
2022-06-20 11:27:17.215 [ERROR] [Vm] rpc/client.go:81 client[4] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:17.215 [ERROR] [Vm] rpc/client.go:81 client[1] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:17.215 [ERROR] [Vm] rpc/client.go:81 client[5] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:17.215 [ERROR] [Vm] rpc/client.go:81 client[2] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:17.215 [ERROR] [Vm] rpc/client.go:81 client[3] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:19.216 [ERROR] [Vm] rpc/client.go:81 client[1] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:19.216 [ERROR] [Vm] rpc/client.go:81 client[2] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:19.216 [ERROR] [Vm] rpc/client.go:81 client[4] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:19.216 [ERROR] [Vm] rpc/client.go:81 client[5] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:19.216 [ERROR] [Vm] rpc/client.go:81 client[3] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:21.217 [ERROR] [Vm] rpc/client.go:81 client[3] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:21.217 [ERROR] [Vm] rpc/client.go:81 client[5] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:21.217 [ERROR] [Vm] rpc/client.go:81 client[2] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:21.217 [ERROR] [Vm] rpc/client.go:81 client[4] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:21.217 [ERROR] [Vm] rpc/client.go:81 client[1] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:23.218 [ERROR] [Vm] rpc/client.go:81 client[3] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:23.218 [ERROR] [Vm] rpc/client.go:81 client[1] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:23.218 [ERROR] [Vm] rpc/client.go:81 client[5] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:23.218 [ERROR] [Vm] rpc/client.go:81 client[4] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
2022-06-20 11:27:23.218 [ERROR] [Vm] rpc/client.go:81 client[2] fail to get connection stream: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix ../data/docker-go/sock/cdm.sock: connect: connection refused"
3、容器启动的docker-compose.yml内容
version: '3.3'
services:
node1:
container_name: cm
image: chainmaker:v2.2.1
restart: always
working_dir: "/chainmaker-go/bin"
command: "./chainmaker start -c ../config/chainmaker.yml > panic.log"
extra_hosts:
- "qtx.sjgf.org:192.168.0.92"
- "qdmetro.sjgf.org:192.168.0.93"
- "gov1.sjgf.org:192.168.0.94"
- "gov2.sjgf.org:192.168.0.95"
# network_mode: "host"
ports:
- "11301:11301"
- "12301:12301"
volumes:
- ./config:/chainmaker-go/config
- ./tmp/data:/chainmaker-go/data
- ./tmp/log:/chainmaker-go/log
docker-vm:
container_name: docker-vm
image: chainmakerofficial/chainmaker-vm-docker-go:v2.2.1
restart: always
environment:
- ENV_LOG_IN_CONSOLE=false
- ENV_ENABLE_UDS=true
- ENV_LOG_LEVEL=INFO
- ENV_USER_NUM=1000
- ENV_MAX_CONCURRENCY=100
- ENV_TX_TIME_LIMIT=8
privileged: true
ports:
- "22351:22359"
volumes:
- ./tmp/data/docker-go/log:/log
- ./tmp/data/docker-go:/mount
【系统信息】(请填写系统信息,方便定位问题)
- chainmaker-go version * : [v2.2.1]
- docker-vm镜像 version: [chainmakerofficial/chainmaker-vm-docker-go:v2.2.1 ]
- OS & version * : [CentOS Linux release 7.9.2009 (Core)]
- docker镜像 version: [20.10.12]
- docker-compose version: [docker-compose version 1.23.2]
-
管理台 version:
- 如果是管理台的相关问题,请附带管理台版本,如果不是可忽略。
-
区块浏览器 version:
- 如果是浏览器的相关问题,请附带浏览器版本,如果不是可忽略。
-
合约IDE version:
- 如果是合约IDE的相关问题,请附带合约IDE版本,如果不是可忽略。
-
web签名插件 version:
- 如果是web签名插件的相关问题,请附带web签名插件版本,如果不是可忽略。
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information