Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: docker compose 启动报错 #11834

Open
sosop opened this issue Dec 16, 2024 · 1 comment
Open

bug: docker compose 启动报错 #11834

sosop opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sosop
Copy link

sosop commented Dec 16, 2024

Current Behavior

version: "3.8"

services:
apisix:
image: "apache/apisix:3.11.0-debian"
restart: always
volumes:
- ./conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
ports:
- "9443:443/tcp"
#network_mode: "host"
networks:
- apisix
etcd:
image: bitnami/etcd:3.5.17
user: root
restart: always
volumes:
- ./data/etcd_data:/bitnami/etcd/data
environment:
ETCD_DATA_DIR: /etcd_data
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
#network_mode: "host"
networks:
- apisix
dashboard:
image: "apache/apisix-dashboard:3.0.1-alpine"
restart: always
volumes:
- ./conf/dashboard/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
depends_on:
- etcd
ports:
- "9000:9000/tcp"
#network_mode: "host"
networks:
- apisix

networks:
apisix:
driver: bridge

Expected Behavior

No response

Error Logs

apisix-1 | /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init
apisix-1 | /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
apisix-1 | 2024/12/16 07:32:08 [error] 1#1: [lua] id.lua:130: init(): failed to write updated local configuration: failed to open file[/usr/local/apisix/conf/config.yaml] for writing
apisix-1 | nginx: [error] [lua] id.lua:130: init(): failed to write updated local configuration: failed to open file[/usr/local/apisix/conf/config.yaml] for writing
apisix-1 | 2024/12/16 07:32:08 [error] 1#1: init_by_lua error: /usr/local/openresty/lualib/resty/core/exit.lua:49: no request found
apisix-1 | stack traceback:
apisix-1 | [C]: in function 'error'
apisix-1 | /usr/local/openresty/lualib/resty/core/exit.lua:49: in function 'ngx_exit'
apisix-1 | /usr/local/apisix/apisix/core/id.lua:131: in function 'init'
apisix-1 | /usr/local/apisix/apisix/init.lua:86: in function 'http_init'
apisix-1 | init_by_lua:9: in main chunk
apisix-1 | nginx: [error] init_by_lua error: /usr/local/openresty/lualib/resty/core/exit.lua:49: no request found
apisix-1 | stack traceback:
apisix-1 | [C]: in function 'error'
apisix-1 | /usr/local/openresty/lualib/resty/core/exit.lua:49: in function 'ngx_exit'
apisix-1 | /usr/local/apisix/apisix/core/id.lua:131: in function 'init'
apisix-1 | /usr/local/apisix/apisix/init.lua:86: in function 'http_init'
apisix-1 | init_by_lua:9: in main chunk
apisix-1 exited with code 1

Steps to Reproduce

1、run apisix via docker compose

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@dosubot dosubot bot added the bug Something isn't working label Dec 16, 2024
@hanqingwu
Copy link
Contributor

`volumes:

  • ./conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro`

why set ro ? can you try setting rw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants