You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/06 02:47:22 UTC

[GitHub] [apisix] kuberxy opened a new issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

kuberxy opened a new issue #3537:
URL: https://github.com/apache/apisix/issues/3537


   ### Issue description
   2021/02/05 14:24:48 [error] 17384#17384: *114551120 failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)
   stack traceback:
   	/usr/local/share/lua/5.1/resty/healthcheck.lua:247: in function 'get_target'
   	/usr/local/share/lua/5.1/resty/healthcheck.lua:424: in function 'get_target_status'
   	/usr/local/share/lua/5.1/apisix/balancer.lua:68: in function 'fetch_health_nodes'
   	/usr/local/share/lua/5.1/apisix/balancer.lua:149: in function 'create_obj_fun'
   	/usr/local/share/lua/5.1/apisix/core/lrucache.lua:92: in function 'lrucache_server_picker'
   	/usr/local/share/lua/5.1/apisix/balancer.lua:246: in function 'pick_server'
   	/usr/local/share/lua/5.1/apisix/balancer.lua:276: in function 'load_balancer'
   	/usr/local/share/lua/5.1/apisix/init.lua:748: in function 'http_balancer_phase'
   	balancer_by_lua:2: in main chunk while connecting to upstream, client: 183.95.49.7, server: , request:
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.1
   * OS (cmd: `uname -a`): 4.15.0-111-generic Ubuntu 18.04
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):openresty/1.15.8.3


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-1000948687


   the `healthcheck` will call `resty-lock`, and the `resty-lock` will call `ngx.sleep`, but `ngx.sleep` can not be called in `balancer` phase. 
   
   so we move it to access phase which allow to call `ngx.sleep`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-774390149


   Have you tried the latest version?  you are using `2.1` version


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-774431409


   Should be fixed by https://github.com/apache/apisix/pull/3240


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] panhow commented on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
panhow commented on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-1000689996


   @spacewander hello , wonder why #3240 can fix this issue ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-774385276


   the same issues:
   [The targets is nil when call the function get_target after add target](https://github.com/Kong/lua-resty-healthcheck/issues/43#issue-607171476)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #3537:
URL: https://github.com/apache/apisix/issues/3537


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy commented on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-774429058


   I did not use it. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] kuberxy edited a comment on issue #3537: bug: failed to run balancer_by_lua*: /usr/local/share/lua/5.1/resty/healthcheck.lua:247: attempt to index field 'targets' (a nil value)

Posted by GitBox <gi...@apache.org>.
kuberxy edited a comment on issue #3537:
URL: https://github.com/apache/apisix/issues/3537#issuecomment-774429058


   I did not use the latest version


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org