rdouman opened a new issue #4048:
URL: https://github.com/apache/apisix/issues/4048


   ## Issue description
   I have a 10 node kubernetes cluster running APISIX as a gateway, We're using 
etcd 3.4.14 deployed as a cluster via the bitnami helm chart.  We're 
intermittently receiving the errors below on container startup.
   
   2021/04/14 14:09:03 [error] 42#42: *1 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["\/ecom\/*"],"vars":{},"hosts":["dev.url","develop.url"],"id":"350417588708180914","update_time":1618401644,"status":1,"create_time":1618394758,"name":"ecom_dev_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.development.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","POST","PUT","DELETE"]},
 context: init_worker_by_lua*
   2021/04/14 14:09:03 [error] 42#42: *1 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["\/ecom\/*"],"vars":{},"hosts":["uat.url","stage.url"],"id":"350426062628324274","update_time":1618401371,"status":1,"create_time":1618399809,"name":"ecom_uat_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.uat.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"]},
 context: init_worker_by_lua*
   2021/04/14 14:09:03 [error] 41#41: *2 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["\/ecom\/*"],"vars":{},"hosts":["dev.url","develop.url"],"id":"350417588708180914","update_time":1618401644,"status":1,"create_time":1618394758,"name":"ecom_dev_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.development.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","POST","PUT","DELETE"]},
 context: init_worker_by_lua*
   2021/04/14 14:09:03 [error] 41#41: *2 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["\/ecom\/*"],"vars":{},"hosts":["uat.url","stage.url"],"id":"350426062628324274","update_time":1618401371,"status":1,"create_time":1618399809,"name":"ecom_uat_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.uat.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"]},
 context: init_worker_by_lua*
   2021/04/14 14:09:03 [error] 45#45: *3 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["\/ecom\/*"],"vars":{},"hosts":["dev.url","develop.url"],"id":"350417588708180914","update_time":1618401644,"status":1,"create_time":1618394758,"name":"ecom_dev_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.development.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","POST","PUT","DELETE"]},
 context: init_worker_by_lua*
   2021/04/14 14:09:03 [error] 45#45: *3 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["\/ecom\/*"],"vars":{},"hosts":["uat.url","stage.url"],"id":"350426062628324274","update_time":1618401371,"status":1,"create_time":1618399809,"name":"ecom_uat_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.uat.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"]},
 context: init_worker_by_lua*
   
   APISIX appears to be listening on the exposed port, but returns 404 route 
not found whenever trying to access one of the configured end points on 
containers with the above error in the logs.
   
   
   ## Expected behavior
   APIXSIX should start up with no errors in the error logs and successfully 
route traffic on the exposed routes.
   
   ## How to Reproduce
   
   1. Deploy APISIX gateway on kubernetes cluster.  Scale the deployment and 
check the logs.
   
   
   ## Environment
   
   * apisix version (cmd: `apisix version`):
   apache/apisix:2.2-alpine
   
   * OS (cmd: `uname -a`):
   /etc/os-release
   NAME="openSUSE MicroOS"
   # VERSION="20210408"
   ID="opensuse-microos"
   ID_LIKE="suse opensuse opensuse-tumbleweed"
   VERSION_ID="20210408"
   PRETTY_NAME="openSUSE MicroOS"
   ANSI_COLOR="0;32"
   CPE_NAME="cpe:/o:opensuse:microos:20210408"
   BUG_REPORT_URL="https://bugs.opensuse.org";
   HOME_URL="https://www.opensuse.org/";
   DOCUMENTATION_URL="https://en.opensuse.org/Portal:MicroOS";
   LOGO="distributor-logo"
   
   
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   3.4.14
   
   * apisix-dashboard version, if have:
   apache/apisix-dashboard:2.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:
[email protected]


Reply via email to