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
相关推荐
测试界的海飞丝8 小时前
10道软件测试面试题及其答案:
服务器·测试工具·职场和发展
t198751288 小时前
在Ubuntu 22.04系统上安装libimobiledevice
linux·运维·ubuntu
skywalk81638 小时前
linux安装Code Server 以便Comate IDE和CodeBuddy等都可以远程连上来
linux·运维·服务器·vscode·comate
S***26758 小时前
基于SpringBoot和Leaflet的行政区划地图掩膜效果实战
java·spring boot·后端
马剑威(威哥爱编程)8 小时前
鸿蒙6开发视频播放器的屏幕方向适配问题
java·音视频·harmonyos
@游子9 小时前
内网渗透笔记-Day5
运维·服务器
JIngJaneIL9 小时前
社区互助|社区交易|基于springboot+vue的社区互助交易系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·论文·毕设·社区互助
晚风吹人醒.9 小时前
缓存中间件Redis安装及功能演示、企业案例
linux·数据库·redis·ubuntu·缓存·中间件
Yawesh_best9 小时前
告别系统壁垒!WSL+cpolar 让跨平台开发效率翻倍
运维·服务器·数据库·笔记·web安全
V***u4539 小时前
MS SQL Server partition by 函数实战二 编排考场人员
java·服务器·开发语言