windows - 在 Windows 上使用 Docker Compose 的 Kong:无法加载上游的初始列表:无法从节点缓存中获取:无法获取回调锁
问题描述
我正在尝试使用 Docker Compose 和 Docker Desktop for Windows 通过 Docker 部署 Kong。
当我启动容器时,我看到了一堆 Lua 错误,从阅读网络上的其他帖子来看,这似乎表明 Kong 在后台使用的 Nginx 代理存在一些问题。
奇怪的是,我仍然可以点击 Kong,而且我不知道这在运行时可能会出现什么实际问题,但我怀疑任何像这样的启动错误。
这是否暗示了一个应该解决的问题?
谢谢
错误:
kong_1 | 2021/10/08 19:51:58 [crit] 1119#0: *43 [lua] balancers.lua:240: create_balancers(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
kong_1 | 2021/10/08 19:51:58 [crit] 1106#0: *45 [lua] balancers.lua:240: create_balancers(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
kong_1 | 2021/10/08 19:51:58 [crit] 1110#0: *39 [lua] balancers.lua:240: create_balancers(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
kong_1 | 2021/10/08 19:51:58 [crit] 1116#0: *42 [lua] balancers.lua:240: create_balancers(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
kong_1 | 2021/10/08 19:51:58 [crit] 1102#0: *38 [lua] balancers.lua:240: create_balancers(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
kong_1 | 2021/10/08 19:51:58 [crit] 1117#0: *50 [lua] balancers.lua:240: create_balancers(): failed loading initial list of upstreams: failed to get from node cache: could not acquire callback lock: timeout, context: ngx.timer
码头工人撰写文件:
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
#######################################
kong-database:
image: postgres:9.6
restart: always
networks:
- kong-net
environment:
POSTGRES_PASSWORD: kong
POSTGRES_USER: kong
POSTGRES_DB: kong
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 5s
timeout: 5s
retries: 5
#######################################
# Kong database migration
#######################################
kong-migration:
image: kong:2.6.0-alpine
command: "kong migrations bootstrap"
networks:
- kong-net
restart: on-failure
environment:
KONG_PG_HOST: kong-database
KONG_DATABASE: postgres
KONG_PG_PASSWORD: kong
links:
- kong-database
depends_on:
- kong-database
#######################################
# Kong: The API Gateway
#######################################
kong:
image: kong:2.6.0-alpine
restart: always
networks:
- kong-net
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong-database
KONG_PG_USER: kong
KONG_PG_PASSWORD: kong
KONG_PROXY_LISTEN: 0.0.0.0:8000
KONG_PROXY_LISTEN_SSL: 0.0.0.0:8443
KONG_ADMIN_LISTEN: 0.0.0.0:8001
depends_on:
- kong-migration
- kong-database
healthcheck:
test: ["CMD", "curl", "-f", "http://kong:8001"]
interval: 5s
timeout: 2s
retries: 15
ports:
- "8001:8001"
- "8000:8000"
#######################################
# Konga database prepare
#######################################
konga-prepare:
image: pantsel/konga:next
command: "-c prepare -a postgres -u postgresql://kong:kong@kong-database:5432/konga_db"
environment:
DB_ADAPTER: postgres
DB_HOST: kong-database
DB_USER: kong
DB_PASSWORD: kong
networks:
- kong-net
restart: on-failure
links:
- kong-database
depends_on:
- kong-database
#######################################
# Konga: Kong GUI
#######################################
konga:
image: pantsel/konga:next
restart: always
networks:
- kong-net
environment:
DB_ADAPTER: postgres
DB_HOST: kong-database
DB_USER: kong
DB_PASSWORD: kong
TOKEN_SECRET: km1GUr4RkcQD7DewhJPNXrCuZwcKmqjb
DB_DATABASE: konga_db
NODE_ENV: production
depends_on:
- kong-database
ports:
- "1337:1337"
解决方案
推荐阅读
- r - R ggplot2:在尝试使用百分比时使用堆叠条形图时无法在 Y 轴上获得正确的标签
- julia - Julia - 在运行时创建的函数中获取运行时参数
- objective-c - 如何在Tableview的三列中放置文本
- mysql - 启用“使用 gRPC 进行文件共享”时,macOS 上的 Docker 2.4 无法正确挂载卷
- python - 错误:找不到满足要求 apturl==0.5.2 的版本(来自 -r /tmp/build_97769b8b/requirements.txt(第 2 行))
- javascript - 屏幕唤醒锁定在交互式画布上
- java - Observable 存储最后一个值,但不能推送新值?
- firebase - 如何防止 Firestore 文档被删除/修改,但允许所有读取和写入
- javascript - 谷歌可视化查询失败
- azure - Azure 服务主体 - 故意强制到期?