GBXing edited a comment on issue #3673:
URL: https://github.com/apache/apisix/issues/3673#issuecomment-787435279


   @Yiyiyimu I used docker locally to start the etcd cluster and Apisix and 
pause one of the etcd nodes, just like the k8s environment
   
   its my exception log:
   
        2021/02/28 10:21:59 [error] 54#54: *13 [lua] config_etcd.lua:566: 
failed to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: attempt to index 
field 'result' (a nil value)
        stack traceback:
                /usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: in 
function 'res_func'
                /usr/local/apisix/apisix/core/config_etcd.lua:125: in function 
'waitdir'
                /usr/local/apisix/apisix/core/config_etcd.lua:305: in function 
'sync_data'
                /usr/local/apisix/apisix/core/config_etcd.lua:540: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:530>
                [C]: in function 'xpcall'
                /usr/local/apisix/apisix/core/config_etcd.lua:530: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:521>,  etcd key: 
/apisix/upstreams, context: ngx.timer
        2021/02/28 10:21:59 [error] 54#54: *6 [lua] config_etcd.lua:566: failed 
to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: attempt to index 
field 'result' (a nil value)
        stack traceback:
                /usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: in 
function 'res_func'
                /usr/local/apisix/apisix/core/config_etcd.lua:125: in function 
'waitdir'
                /usr/local/apisix/apisix/core/config_etcd.lua:305: in function 
'sync_data'
                /usr/local/apisix/apisix/core/config_etcd.lua:540: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:530>
                [C]: in function 'xpcall'
                /usr/local/apisix/apisix/core/config_etcd.lua:530: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:521>,  etcd key: /apisix/ssl, 
context: ngx.timer
        2021/02/28 10:21:59 [error] 53#53: *36 [lua] config_etcd.lua:566: 
failed to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: attempt to index 
field 'result' (a nil value)
        stack traceback:
                /usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: in 
function 'res_func'
                /usr/local/apisix/apisix/core/config_etcd.lua:125: in function 
'waitdir'
                /usr/local/apisix/apisix/core/config_etcd.lua:305: in function 
'sync_data'
                /usr/local/apisix/apisix/core/config_etcd.lua:540: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:530>
                [C]: in function 'xpcall'
                /usr/local/apisix/apisix/core/config_etcd.lua:530: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:521>,  etcd key: 
/apisix/upstreams, context: ngx.timer
        2021/02/28 10:21:59 [error] 53#53: *27 [lua] config_etcd.lua:566: 
failed to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: attempt to index 
field 'result' (a nil value)
        stack traceback:
                /usr/local/apisix//deps/share/lua/5.1/resty/etcd/v3.lua:649: in 
function 'res_func'
                /usr/local/apisix/apisix/core/config_etcd.lua:125: in function 
'waitdir'
                /usr/local/apisix/apisix/core/config_etcd.lua:305: in function 
'sync_data'
                /usr/local/apisix/apisix/core/config_etcd.lua:540: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:530>
                [C]: in function 'xpcall'
                /usr/local/apisix/apisix/core/config_etcd.lua:530: in function 
</usr/local/apisix/apisix/core/config_etcd.lua:521>,  etcd key: 
/apisix/global_rules, context: ngx.timer
        2021/02/28 10:22:28 [error] 53#53: *28 [lua] config_etcd.lua:544: 
failed to fetch data from etcd: etcd-node2 could not be resolved (3: Host not 
found),  etcd key: /apisix/services, context: ngx.timer
        2021/02/28 10:22:29 [error] 54#54: *12 [lua] config_etcd.lua:544: 
failed to fetch data from etcd: etcd-node2 could not be resolved (3: Host not 
found),  etcd key: /apisix/consumers, context: ngx.timer
        2021/02/28 10:23:03 [error] 54#54: *4 [lua] config_etcd.lua:544: failed 
to fetch data from etcd: etcd-node2 could not be resolved (3: Host not found),  
etcd key: /apisix/routes, context: ngx.timer
        2021/02/28 10:23:04 [error] 53#53: *35 [lua] config_etcd.lua:544: 
failed to fetch data from etcd: etcd-node2 could not be resolved (3: Host not 
found),  etcd key: /apisix/consumers, context: ngx.timer
        2021/02/28 10:23:18 [error] 54#54: *445 [lua] config_etcd.lua:544: 
failed to fetch data from etcd: etcd-node2 could not be resolved (3: Host not 
found),  etcd key: /apisix/ssl, context: ngx.timer
   
   and calling the admin api returns:
   
        {
                "error_msg": "etcd-node2 could not be resolved (3: Host not 
found)"
        }


----------------------------------------------------------------
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:
[email protected]


Reply via email to