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 2022/03/28 06:21:15 UTC

[GitHub] [apisix] ukanwat opened a new issue #6732: bug: dns service discovery upstreams are not working in GKE

ukanwat opened a new issue #6732:
URL: https://github.com/apache/apisix/issues/6732


   ### Current Behavior
   
   APISIX is throwing an error related to port being 0 when upstream has discovery_type "dns".
   same exact setup works fine with clusters from other kubernetes providers.
   
   ### Expected Behavior
   
   Should not throw the error `http_access_phase(): failed to set upstream: invalid nodes format: failed to validate item 1: property "port" validation failed: expected 0 to be at least 1`
   
   ### Error Logs
   
   in web response -
   503 Service Temporarily Unavailable
   in apisix pod -
   init.lua:520: http_access_phase(): failed to set upstream: invalid nodes format: failed to validate item 1: property "port" validation failed: expected 0 to be at least 1
   
   ### Steps to Reproduce
   
   1. Create a standard Google Kubernetes Engine cluster.
   2. Install APISIX with ingress controller and dashboard via api7 helm chart version 0.8.4 using this [values.yaml](https://gist.githubusercontent.com/ukanwat/46b505edccf4d10f7241042815f72f72/raw/8f8af4ca5803a4b60e780e281a5c7609731877de/apisix-values.yaml) file (in ingress-apisix namespace).
   3. create this upstream via admin api  - `    {
         "id": "398808046194655761",
         "create_time": 1647237719,
         "update_time": 1647237719,
         "timeout": {
           "connect": 6,
           "send": 6,
           "read": 6
         },
         "type": "roundrobin",
         "scheme": "http",
         "discovery_type": "dns",
         "pass_host": "node",
         "name": "apisix-dashboard",
         "service_name": "apisix-dashboard.ingress-apisix.svc.cluster.local",
         "keepalive_pool": {
           "idle_timeout": 60,
           "requests": 1000,
           "size": 320
         }
       }`
       4. create this route via admin api - `{"id":"398808266596942353","create_time":1647237850,"update_time":1647441243,"uri":"/*","name":"apisix-dashboard","priority":50,"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"host":"apisix-dashboard.example.com","plugins":{"redirect":{"http_to_https":true}},"upstream_id":"398808046194655761","labels":{"API_VERSION":"v1"},"status":1}`
       5. visit the host in the route and then check the logs in the apisix pod.
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.12.1
   - Operating system (run `uname -a`): kubernetes (GKE)
   Rest of the values are whatever is bundled in apisix/apisix version 0.8.4 helm chart.
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - 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

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



[GitHub] [apisix] tzssangglass commented on issue #6732: bug: dns service discovery upstreams are not working in GKE

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


   > Also what should I do to get the packet capture file?
   
   `tcpdump` : https://www.tcpdump.org/manpages/tcpdump.1.html


-- 
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] ukanwat edited a comment on issue #6732: bug: dns service discovery upstreams are not working in GKE

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


   In the GKE dashboard, it shows that the Target Port is 0 and in the service config it is http. Could this mean that SRV record has port zero?


-- 
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 #6732: bug: dns service discovery upstreams are not working in GKE

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


   


-- 
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 #6732: bug: dns service discovery upstreams are not working in GKE

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


   As a workaround, you can add the port to the "service_name" ("apisix-dashboard.ingress-apisix.svc.cluster.local").


-- 
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 #6732: bug: dns service discovery upstreams are not working in GKE

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


   I guess GKE's SRV record is an SRV with port zero. Would you provide a packet capture file to prove it? Thanks!


-- 
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] shuaijinchao commented on issue #6732: bug: dns service discovery upstreams are not working in GKE

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


   Checking only SRV records can also use `nslookup` to query the target DNS server.


-- 
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] ukanwat commented on issue #6732: bug: dns service discovery upstreams are not working in GKE

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


   For what pod, do you need the packet capture file?


-- 
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] ukanwat edited a comment on issue #6732: bug: dns service discovery upstreams are not working in GKE

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


   In the GKE dashboard, Target Port is shown as 0 and in the service config it is http. Could this mean that SRV record has port zero?
   Also what should I do to get the packet capture file?


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