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 2023/01/10 10:13:27 UTC

[GitHub] [apisix] cloorc opened a new issue, #8648: bug: attempt to index local 'item' (a boolean value)

cloorc opened a new issue, #8648:
URL: https://github.com/apache/apisix/issues/8648

   ### Current Behavior
   
   Newly installed apisix cluster throws following exception:
   
   ```
   2023/01/10 10:03:19 [error] 54#54: *1312995 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   ```
   
   ### Expected Behavior
   
   Running without former issue.
   
   ### Error Logs
   
   2023/01/10 10:06:21 [error] 48#48: *1334880 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:21 [error] 50#50: *1334917 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:22 [error] 56#56: *1334983 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:23 [error] 54#54: *1335145 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:23 [error] 63#63: *1335173 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:23 [error] 51#51: *1335184 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:24 [error] 49#49: *1335318 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:25 [error] 52#52: *1335376 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:26 [error] 50#50: *1335516 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:27 [error] 48#48: *1335606 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:27 [error] 53#53: *1335612 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   2023/01/10 10:06:27 [error] 56#56: *1335624 [lua] config_etcd.lua:662: failed to fetch data from etcd: /usr/local/apisix/apisix/core/config_util.lua:99: attempt to index local 'item' (a boolean value)
   stack traceback:
           /usr/local/apisix/apisix/core/config_util.lua:99: in function 'fire_all_clean_handlers'
           /usr/local/apisix/apisix/core/config_etcd.lua:379: in function 'sync_data'
           /usr/local/apisix/apisix/core/config_etcd.lua:609: in function </usr/local/apisix/apisix/core/config_etcd.lua:599>
           [C]: in function 'xpcall'
           /usr/local/apisix/apisix/core/config_etcd.lua:599: in function </usr/local/apisix/apisix/core/config_etcd.lua:577>,  etcd key: /apisix/routes, context: ngx.timer
   
   
   ### Steps to Reproduce
   
   1. Install apisix cluster with following images: `apache/apisix:3.1.0-debian`
   2. Running at least **4** hours;
   3. Not sure this issue will be throwed as previous.
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.1.0 (3.1.0-debian official docker image)
   - Operating system (run `uname -a`): Linux apisix-v3-0-58d694d79d-8567j 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx version: openresty/1.21.4.1
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): {"boot_time":1672910773,"etcd_version":"3.4.0","hostname":"apisix-v3-0-58d694d79d-8567j","version":"3.1.0","id":"c978a662-9041-4e7b-9a4d-d5bea6ef32f9"}
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --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.

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

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


[GitHub] [apisix] tokers commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

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

   @cloorc Did you see any error log entries before these kinds of errors? I think this error is not the "primary crime scene". Also, is it possible to print the data in your ETCD?


-- 
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] oyiadin commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "oyiadin (via GitHub)" <gi...@apache.org>.
oyiadin commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1475240703

   We've reproduced it in our test env steadily, by inserting and deleting apisix resources while an etcd compaction occurred. And the issue will keep on exist until we restart apisix mannually. So I dive into the source code and find a weired spot:
   
   https://github.com/apache/apisix/blob/e4e7c7327a87e1ff8f190e0608c4a0df2dfb2214/apisix/core/config_etcd.lua#L392-L401
   
   Line#397 returns a "false" while no "err" is provided. After changing this line to `return false, err`, we cannot reproduce the issue anymore with the exactly same way of inserting and deleting while etcd compaction.
   
   But i have no time to reproduce it with minimal step way right now.


-- 
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] tokers commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

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

   > > @cloorc Did you see any error log entries before these kinds of errors? I think this error is not the "primary crime scene". Also, is it possible to print the data in your ETCD?
   > 
   > ETCD works fine. And what may results in this issue? I've no any thoughts about this issue.
   
   I have no idea because I cannot reproduce 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] Liu-Junlin commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "Liu-Junlin (via GitHub)" <gi...@apache.org>.
Liu-Junlin commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1437725235

   I often encounter this problem and need to restart apisix server to recover


-- 
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] cloorc commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

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

   > @cloorc Did you see any error log entries before these kinds of errors? I think this error is not the "primary crime scene". Also, is it possible to print the data in your ETCD?
   
   ETCD works fine. And what may results in this issue? I've no any thoughts about 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] basuotian commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "basuotian (via GitHub)" <gi...@apache.org>.
basuotian commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1449395259

   similar to #8492 ?


-- 
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] zsmlinux commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1450136825

   > similar to #8492 ? related to etcd compaction
   
   I think …… yes


-- 
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] spacewander closed issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "spacewander (via GitHub)" <gi...@apache.org>.
spacewander closed issue #8648: bug: attempt to index local 'item' (a boolean value)
URL: https://github.com/apache/apisix/issues/8648


-- 
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] spacewander commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "spacewander (via GitHub)" <gi...@apache.org>.
spacewander commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1475496133

   > Line#397 returns a "false" while no "err" is provided. 
   
   It's intended. So that the sync will be reentered with `self.need_reload = true`. See
   
   https://github.com/apache/apisix/blob/02421e2ad623b7a2d55fff5b14e286367f8c4117/apisix/core/config_etcd.lua#L651-L653


-- 
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] zsmlinux commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1441325572

   > I often encounter this problem and need to restart apisix server to recover
   
   How much your apisixserver memory using? 
   
   I also have met many times, and I found apisixserver's memory is full last time.


-- 
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] cloorc commented on issue #8648: bug: attempt to index local 'item' (a boolean value)

Posted by "cloorc (via GitHub)" <gi...@apache.org>.
cloorc commented on issue #8648:
URL: https://github.com/apache/apisix/issues/8648#issuecomment-1438849649

   > I often encounter this problem and need to restart apisix server to recover
   
   I guess it could be resulted from compaction(or related operations) of etcd.


-- 
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