本文主要是介绍example-apisix-1 清空日志之后启动异常处理,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
异常信息
2024/08/27 11:34:33 [emerg] 1#1: bind() to unix:/usr/local/apisix/conf/config_listen.sock failed (98: Address already in use)
nginx: [emerg] bind() to unix:/usr/local/apisix/conf/config_listen.sock failed (98: Address already in use)
2024/08/27 11:34:33 [emerg] 1#1: bind() to unix:/usr/local/apisix/conf/config_listen.sock failed (98: Address already in use)
nginx: [emerg] bind() to unix:/usr/local/apisix/conf/config_listen.sock failed (98: Address already in use)
2024/08/27 11:34:33 [emerg] 1#1: bind() to unix:/usr/local/apisix/conf/config_listen.sock failed (98: Address already in use)
nginx: [emerg] bind() to unix:/usr/local/apisix/conf/config_listen.sock failed (98: Address already in use)
2024/08/27 11:34:33 [emerg] 1#1: still could not bind()
解决方法
关键性命令:删除旧容器
docker rm -f 2d5a0de63285
启动新容器
docker run -d --name apisix --restart=unless-stopped --network=host apache/apisix:3.4.1-debian
[root@ip-10-19-183-21 overlay2]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bitnami/etcd latest 2c38d37087d8 12 months ago 144MB
apache/apisix latest 5ff94b1954c2 13 months ago 328MB
apache/apisix 3.4.1-debian cc6278b25513 13 months ago 333MB
apache/apisix-dashboard latest 2f0aed4002d7 16 months ago 360MB
apache/apisix-dashboard 3.0.1-alpine e7673027fec5 16 months ago 136MB
bitnami/etcd 3.4.15 8c7e00e786b8 3 years ago 132MBrequest etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused
all etcd nodes are unavailable
Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused, retry time=1
Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused, retry time=2
/usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init
/usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused
all etcd nodes are unavailable
Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused, retry time=1
Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused, retry time=2
[root@ip-10-19-183-21 overlay2]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2d5a0de63285 apache/apisix:3.4.1-debian "/docker-entrypoint.…" 2 minutes ago Restarting (1) 7 seconds ago apisix
a58c65718d25 bitnami/etcd:3.4.15 "/opt/bitnami/script…" 12 months ago Up 13 minutes 0.0.0.0:2379->2379/tcp, :::2379->2379/tcp, 2380/tcp example-etcd-1
0a9c7ac185dd apache/apisix-dashboard:3.0.1-alpine "/usr/local/apisix-d…" 12 months ago Up 13 minutes 0.0.0.0:10701->9000/tcp, :::10701->9000/tcp example-apisix-dashboard-1
[root@ip-10-19-183-21 overlay2]# docker rm -f 2d5a0de63285
2d5a0de63285
[root@ip-10-19-183-21 overlay2]# docker run -d --name apisix --restart=unless-stopped --network=host apache/apisix:3.4.1-debian
cfa9f6fc29d9cf03461ae46141e49c280e97274440ca6dc3bf2cd3fe54d361c4
这篇关于example-apisix-1 清空日志之后启动异常处理的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!