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     132MB

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
/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
相关推荐
小小李程序员34 分钟前
LRU缓存
java·spring·缓存
聚名网40 分钟前
手机无法连接服务器1302什么意思?
运维·服务器·智能手机
cnsxjean41 分钟前
SpringBoot集成Minio实现上传凭证、分片上传、秒传和断点续传
java·前端·spring boot·分布式·后端·中间件·架构
hadage2331 小时前
--- stream 数据流 java ---
java·开发语言
香吧香1 小时前
getent使用小结
linux
《源码好优多》1 小时前
基于Java Springboot汽配销售管理系统
java·开发语言·spring boot
代码欢乐豆1 小时前
软件工程第13章小测
服务器·前端·数据库·软件工程
小林想被监督学习2 小时前
Java后端如何进行文件上传和下载 —— 本地版
java·开发语言
Erosion20202 小时前
SPI机制
java·java sec
麻瓜也要学魔法2 小时前
Linux关于vim的笔记
linux·笔记·vim