欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 新车 > example-apisix-1 清空日志之后启动异常处理

example-apisix-1 清空日志之后启动异常处理

2024/10/25 20:19:52 来源:https://blog.csdn.net/jizhang05292/article/details/141611468  浏览:    关键词: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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com