堡塔新春特惠活动,企业版1099元/年,永久授权最高立减28000元查看活动
当前位置:论坛首页 > Linux面板 > 讨论

【待反馈】docker容器修改映射端口出现错误

发表在 Linux面板2024-2-11 23:49 [复制链接] 10 401

出错了,面板运行时发生错误!Exception: too many values to unpack (expected 2)

使用道具 举报 只看该作者 回复
发表于 2024-2-11 23:51:01 | 显示全部楼层
我想把本地8000映射从80修改为443出现这个错误
使用道具 举报 回复 支持 反对
发表于 2024-2-12 01:04:36 | 显示全部楼层
弄着弄着所有网站项目都看不到了,但是还在正常运行。。。
使用道具 举报 回复 支持 反对
发表于 2024-2-13 11:32:46 | 显示全部楼层
您好 麻烦将详细的报错截图出来看看 当前无法判断是什么问题导致的 另外是最新版面板吗
使用道具 举报 回复 支持 反对
发表于 2024-2-13 17:27:13 | 显示全部楼层
REQUEST_DATE: 2024-02-13 17:26:10
  VERSION: CentOS  7.9.2009 x86_64(Py3.7.9)  -   8.0.5
REMOTE_ADDR: 160.16.58.53
REQUEST_URI: POST /btdocker/container/upgrade_container?
REQUEST_FORM: {'data': '{"id":"3253f3c7a816c1f5046fe3f043a7107e5124ecc410b210b9c31877002f8f2d6c","new_name":"dk_wordpress-wordpress-1","new_image":"wordpress:latest","new_publish_all_ports":"0","new_port":{"443/tcp":"8000"},"new_network":"dk_wordpress_default","new_ip_address":"172.18.0.3","new_command":"","new_entrypoint":"","new_auto_remove":"0","new_privileged":"0","new_restart_policy":{"Name":"always"},"new_mem_reservation":"0","new_cpu_quota":0,"new_mem_limit":"0","new_labels":"com.docker.compose.config-hash=db59993e96cb6687e6cbc3c706fe2b410ea5af6061da6bcb959282686e7b3de8\\ncom.docker.compose.container-number=1\\ncom.docker.compose.depends_on=db:service_started:false\\ncom.docker.compose.image=sha256:14425bb2eae98ef05853f78e2c8bc3d91cff3b465f2933c6f105ac697facb3ea\\ncom.docker.compose.oneoff=False\\ncom.docker.compose.project=dk_wordpress\\ncom.docker.compose.project.config_files=/www/dk_project/dk_app/dk_wordpress/docker-compose.yml\\ncom.docker.compose.project.working_dir=/www/dk_project/dk_app/dk_wordpress\\ncom.docker.compose.service=wordpress\\ncom.docker.compose.version=2.24.2\\n","new_environment":"WORDPRESS_DB_PASSWORD=wordpress\\nWORDPRESS_DB_NAME=wordpress\\nWORDPRESS_DB_HOST=db:3306\\nWORDPRESS_DB_USER=wordpress\\nPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\nPHPIZE_DEPS=autoconf \\t\\tdpkg-dev \\t\\tfile \\t\\tg++ \\t\\tgcc \\t\\tlibc-dev \\t\\tmake \\t\\tpkg-config \\t\\tre2c\\nPHP_INI_DIR=/usr/local/etc/php\\nAPACHE_CONFDIR=/etc/apache2\\nAPACHE_ENVVARS=/etc/apache2/envvars\\nPHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\\nPHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\\nPHP_LDFLAGS=-Wl,-O1 -pie\\nGPG_KEYS=39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC\\nPHP_VERSION=8.2.15\\nPHP_URL=https://www.php.net/distributions/php-8.2.15.tar.xz\\nPHP_ASC_URL=https://www.php.net/distributions/php-8.2.15.tar.xz.asc\\nPHP_SHA256=eca5deac02d77d806838275f8a3024b38b35ac0a5d9853dcc71c6cbe3f1f8765\\n","new_volumes":{"/var/lib/docker/volumes/ff784c5657e86e7a788e517eca18bcc8d4f2ff1490e80ccfe49253746786b7b2/_data":{"bind":"/var/www/html","mode":"rw"}}}'}
  USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
使用道具 举报 回复 支持 反对
发表于 2024-2-13 17:27:53 | 显示全部楼层
REQUEST_DATE: 2024-02-13 17:26:10
  VERSION: CentOS  7.9.2009 x86_64(Py3.7.9)  -   8.0.5
REMOTE_ADDR: 160.16.58.53
REQUEST_URI: POST /btdocker/container/upgrade_container?
REQUEST_FORM: {'data': '{"id":"3253f3c7a816c1f5046fe3f043a7107e5124ecc410b210b9c31877002f8f2d6c","new_name":"dk_wordpress-wordpress-1","new_image":"wordpress:latest","new_publish_all_ports":"0","new_port":{"443/tcp":"8000"},"new_network":"dk_wordpress_default","new_ip_address":"172.18.0.3","new_command":"","new_entrypoint":"","new_auto_remove":"0","new_privileged":"0","new_restart_policy":{"Name":"always"},"new_mem_reservation":"0","new_cpu_quota":0,"new_mem_limit":"0","new_labels":"com.docker.compose.config-hash=db59993e96cb6687e6cbc3c706fe2b410ea5af6061da6bcb959282686e7b3de8\\ncom.docker.compose.container-number=1\\ncom.docker.compose.depends_on=db:service_started:false\\ncom.docker.compose.image=sha256:14425bb2eae98ef05853f78e2c8bc3d91cff3b465f2933c6f105ac697facb3ea\\ncom.docker.compose.oneoff=False\\ncom.docker.compose.project=dk_wordpress\\ncom.docker.compose.project.config_files=/www/dk_project/dk_app/dk_wordpress/docker-compose.yml\\ncom.docker.compose.project.working_dir=/www/dk_project/dk_app/dk_wordpress\\ncom.docker.compose.service=wordpress\\ncom.docker.compose.version=2.24.2\\n","new_environment":"WORDPRESS_DB_PASSWORD=wordpress\\nWORDPRESS_DB_NAME=wordpress\\nWORDPRESS_DB_HOST=db:3306\\nWORDPRESS_DB_USER=wordpress\\nPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\nPHPIZE_DEPS=autoconf \\t\\tdpkg-dev \\t\\tfile \\t\\tg++ \\t\\tgcc \\t\\tlibc-dev \\t\\tmake \\t\\tpkg-config \\t\\tre2c\\nPHP_INI_DIR=/usr/local/etc/php\\nAPACHE_CONFDIR=/etc/apache2\\nAPACHE_ENVVARS=/etc/apache2/envvars\\nPHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\\nPHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\\nPHP_LDFLAGS=-Wl,-O1 -pie\\nGPG_KEYS=39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC\\nPHP_VERSION=8.2.15\\nPHP_URL=https://www.php.net/distributions/php-8.2.15.tar.xz\\nPHP_ASC_URL=https://www.php.net/distributions/php-8.2.15.tar.xz.asc\\nPHP_SHA256=eca5deac02d77d806838275f8a3024b38b35ac0a5d9853dcc71c6cbe3f1f8765\\n","new_volumes":{"/var/lib/docker/volumes/ff784c5657e86e7a788e517eca18bcc8d4f2ff1490e80ccfe49253746786b7b2/_data":{"bind":"/var/www/html","mode":"rw"}}}'}
  USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
使用道具 举报 回复 支持 反对
发表于 2024-2-13 17:28:42 | 显示全部楼层
Traceback (most recent call last):
  File "/www/server/panel/class/btdockerModel/containerModel.py", line 312, in upgrade_container
    new_container_config = self.structure_new_container_conf(get)
  File "/www/server/panel/class/btdockerModel/containerModel.py", line 468, in structure_new_container_conf
    "environment": dp.set_kv(new_environment) if type(new_environment) != list else new_environment,
  File "/www/server/panel/class/btdockerModel/dk_public.py", line 92, in set_kv
    k, v = i.split('=')
ValueError: too many values to unpack (expected 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/www/server/panel/BTPanel/__init__.py", line 2315, in publicObject
    res = run_obj.run(toObject, defs, get)
  File "/www/server/panel/BTPanel/__init__.py", line 2262, in run
    result = getattr(toObject, get.action)(get)
  File "class/panelController.py", line 81, in model
    result = PluginLoader.module_run(module_name,def_name,pdata)
  File "/www/server/panel/class/btdockerModel/containerModel.py", line 387, in upgrade_container
    raise Exception(a)
Exception: too many values to unpack (expected 2)
使用道具 举报 回复 支持 反对
发表于 2024-2-13 17:30:35 | 显示全部楼层
是最新面板,我看了论坛用了这个命令 mv /www/server/panel/data/db/docker.db /www/backup/dockerdb_backup
导致我现在所有项目都找不到了
使用道具 举报 回复 支持 反对
发表于 2024-2-13 17:31:37 | 显示全部楼层
但是新建的项目就可以正常显示
使用道具 举报 回复 支持 反对
发表于 2024-2-13 17:33:18 | 显示全部楼层
宝塔用户_zbtmqm 发表于 2024-2-13 17:31
但是新建的项目就可以正常显示

我修复和重启面板都不行
使用道具 举报 回复 支持 反对
发表于 2024-2-20 14:24:23 | 显示全部楼层
宝塔用户_zbtmqm 发表于 2024-2-13 17:33
我修复和重启面板都不行

修复一下面板试试,昨天已经修复了
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
宝塔面板交流QQ群宝塔面板交流群-6群
快速回复 返回顶部 返回列表