Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Fix attempt to index field host.lastQuery a nil value #80

Closed
seifchen opened this issue Nov 20, 2019 · 0 comments
Closed

Fix attempt to index field host.lastQuery a nil value #80

seifchen opened this issue Nov 20, 2019 · 0 comments

Comments

@seifchen
Copy link
Contributor

When I use docker run kong, I got err:

2019/11/20 15:49:33 [error] 61#0: *23 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/dns/balancer/base.lua:1206: attempt to index field 'lastQuery' (a nil value)
stack traceback:
coroutine 0:
        /usr/local/share/lua/5.1/resty/dns/balancer/base.lua: in function 'cb_expire'
        /usr/local/share/lua/5.1/resty/timer.lua:87: in function </usr/local/share/lua/5.1/resty/timer.lua:51>, context: ngx.timer
2019/11/20 15:49:34 [error] 61#0: *30 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/dns/balancer/base.lua:1206: attempt to index field 'lastQuery' (a nil value)
stack traceback:
coroutine 0:
        /usr/local/share/lua/5.1/resty/dns/balancer/base.lua: in function 'cb_expire'
        /usr/local/share/lua/5.1/resty/timer.lua:87: in function </usr/local/share/lua/5.1/resty/timer.lua:51>, context: ngx.timer
2019/11/20 15:49:36 [error] 60#0: *50 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/dns/balancer/base.lua:1206: attempt to index field 'lastQuery' (a nil value)
stack traceback:
coroutine 0:
        /usr/local/share/lua/5.1/resty/dns/balancer/base.lua: in function 'cb_expire'
        /usr/local/share/lua/5.1/resty/timer.lua:87: in function </usr/local/share/lua/5.1/resty/timer.lua:51>, context: ngx.timer
2019/11/20 15:49:37 [error] 60#0: *58 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/dns/balancer/base.lua:1206: attempt to index field 'lastQuery' (a nil value)
stack traceback:
coroutine 0:
        /usr/local/share/lua/5.1/resty/dns/balancer/base.lua: in function 'cb_expire'
        /usr/local/share/lua/5.1/resty/timer.lua:87: in function </usr/local/share/lua/5.1/resty/timer.lua:51>, context: ngx.timer
2019/11/20 15:49:38 [notice] 60#0: *11 [lua] cache_warmup.lua:34: finished warming up DNS entries' into the cache (in 5556ms), context: ngx.timer

environment

os: macOs Catalina:10.15.1
docker image: kong:1.4.0-centos

How to Recurring problem

There is my start.sh

docker run -d  --name kong \
     --network=kong-net \
     -e "KONG_DATABASE=postgres" \
     -e "KONG_PG_HOST=kong-database" \
     -e "KONG_PG_USER=kong" \
     -e "KONG_PG_PORT=5432" \
     -e "KONG_PG_DATABASE=kong" \
     -e "KONG_PG_PASSWORD=password" \
     -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
     -e "KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl" \
     -e "KONG_NGINX_WORKER_PROCESSES=2" \
     -e "KONG_LOG_LEVEL=debug"\
     -e "GUAZI_ENV=dev" \
     -e  "KONG_NGINX_PROXY_PROXY_BIND=0.0.0.0" \
     -p 8000:8000 \
     -p 8001:8001 \
     kong:1.4.0-centos

first

sh start.sh

second

docker rm -f kong

third

wait some minutes

last

sh start.sh
then check the error.log you'll find the error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant