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 2020/10/27 03:41:30 UTC
[GitHub] [apisix] jeffguorg opened a new issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
jeffguorg opened a new issue #2533:
URL: https://github.com/apache/apisix/issues/2533
### Issue description
Hi, we are setting up a k8s cluster and setting up apisix to be the api gateway. but apisix could not proxy the request to the grpc backend services: "failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed" said in logs/error.log
backend server is ensured that it is always reachable from apisix
### Environment
* apisix version (cmd: `apisix version`): 1.5
* OS: Kubernetes v1.18.8-aliyun.1 /Alpine Linux 3.11.6
[config.txt](https://github.com/apache/apisix/files/5442801/config.txt)
[output.txt](https://github.com/apache/apisix/files/5442802/output.txt)
----------------------------------------------------------------
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] jeffguorg edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719115231
@membphis
yes, i started to use apisix just a few day ago before 2.0 is released.
so this is already fix in 2.0, right? is it possible to backport it to 1.5? i'm worried that 2.x branch is not stable enough for production
edit: Found that resolv.conf can be overwrite manually after set dnsPolicy: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy. i would try this workaround first
----------------------------------------------------------------
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] jeffguorg edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719119397
setting resolv.conf does not fix this problem.
```bash
guochao@chao-20kna04gcd ~ % curl http://<my-server>/
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
guochao@chao-20kna04gcd ~ % kubectl --namespace apisix exec -it apisix-msfhx -- cat /etc/resolv.conf
nameserver 172.21.0.10
```
i'm gonna give 2.0 a try
----------------------------------------------------------------
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] gxthrj commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718511923
@membphis I am not sure if dns resolver in GRPC work the same as in http
----------------------------------------------------------------
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] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719115231
@membphis
yes, i started to use apisix just a few day ago before 2.0 is released.
so this is already fix in 2.0, right? is it possible to backport it to 1.5? i'm worried that 2.x branch is not stable enough for production
----------------------------------------------------------------
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] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718407572
@membphis
Hi, dns resolver(resolv.conf) was set by kubernetes and dns service looks good to me:
```
guochao@chao-20kna04gcd ~ % kubectl --namespace apisix exec -it apisix-pt4rv -- bash
bash5.0# ping some-k8s-svc.default.svc.cluster.local -w 3
PING some-k8s-svc.default.svc.cluster.local (172.21.10.79): 56 data bytes
64 bytes from 172.21.10.79: seq=0 ttl=64 time=0.053 ms
64 bytes from 172.21.10.79: seq=1 ttl=64 time=0.070 ms
64 bytes from 172.21.10.79: seq=2 ttl=64 time=0.069 ms
--- some-k8s-svc.default.svc.cluster.local ping statistics ---
4 packets transmitted, 3 packets received, 25% packet loss
round-trip min/avg/max = 0.053/0.064/0.070 ms
bash-5.0# cat conf/nginx.conf | grep resolv
resolver 172.21.0.10 valid=30;
resolver_timeout 5;
local dns_resolver = { "172.21.0.10", }
dns_resolver = dns_resolver,
bash-5.0# cat /etc/resolv.conf
nameserver 172.21.0.10
search apisix.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
```
here is the logs/error.log
[output.txt](https://github.com/apache/apisix/files/5456597/output.txt)
```
guochao@chao-20kna04gcd ~ % kubectl --namespace apisix exec -it apisix-pt4rv -- bash
bash-5.0# cat logs/error.log
2020/10/29 06:45:58 [info] 1#1: [lua] core.lua:22: use config_center: etcd
2020/10/29 06:45:58 [info] 1#1: [lua] init.lua:46: parse_args(): dns resolver["172.21.0.10"]
2020/10/29 06:45:58 [notice] 1#1: [lua] id.lua:69: init(): not found apisix uid, generate a new one: 06576e9a-7193-4607-acf9-2001bc663adc
2020/10/29 06:45:58 [notice] 1#1: using the "epoll" event method
2020/10/29 06:45:58 [notice] 1#1: openresty/1.17.8.2
2020/10/29 06:45:58 [notice] 1#1: built by gcc 9.3.0 (Alpine 9.3.0)
2020/10/29 06:45:58 [notice] 1#1: OS: Linux 3.10.0-1062.18.1.el7.x86_64
2020/10/29 06:45:58 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2020/10/29 06:45:58 [notice] 1#1: start worker processes
2020/10/29 06:45:58 [notice] 1#1: start worker process 35
2020/10/29 06:45:58 [notice] 1#1: start worker process 36
2020/10/29 06:45:58 [notice] 35#35: sched_setaffinity(): using cpu #0
2020/10/29 06:45:58 [notice] 1#1: start cache manager process 37
2020/10/29 06:45:58 [notice] 36#36: sched_setaffinity(): using cpu #1
2020/10/29 06:45:58 [notice] 1#1: start cache loader process 38
2020/10/29 06:45:58 [debug] 35#35: *1 [lua] events.lua:211: do_event_json(): worker-events: handling event; source=resty-worker-events, event=started, pid=35, data=nil
2020/10/29 06:45:58 [info] 35#35: *1 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/ operator: <=, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *1 [lua] radixtree.lua:179: insert_route(): insert route path: /apisix/admin/ dataprt: 1, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *1 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/stream_routes operator: <=, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *1 [lua] radixtree.lua:179: insert_route(): insert route path: /apisix/admin/stream_routes dataprt: 2, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *1 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/plugins/list operator: =, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *1 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/plugins/reload operator: =, context: init_worker_by_lua*
2020/10/29 06:45:58 [debug] 36#36: *2 [lua] events.lua:211: do_event_json(): worker-events: handling event; source=resty-worker-events, event=started, pid=36, data=nil
2020/10/29 06:45:58 [info] 36#36: *2 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/ operator: <=, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] radixtree.lua:179: insert_route(): insert route path: /apisix/admin/ dataprt: 1, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/stream_routes operator: <=, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] radixtree.lua:179: insert_route(): insert route path: /apisix/admin/stream_routes dataprt: 2, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/plugins/list operator: =, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/admin/plugins/reload operator: =, context: init_worker_by_lua*
2020/10/29 06:45:58 [debug] 35#35: *1 [lua] prometheus_resty_counter.lua:70: new(): start timer for shdict prometheus-metrics on worker 0
2020/10/29 06:45:58 [debug] 35#35: *1 [lua] evp.lua:142: openssl11=true err=nil
2020/10/29 06:45:58 [info] 35#35: *1 [lua] plugin.lua:126: load(): load plugin times: 1, context: init_worker_by_lua*
2020/10/29 06:45:58 [debug] 36#36: *2 [lua] prometheus_resty_counter.lua:70: new(): start timer for shdict prometheus-metrics on worker 1
2020/10/29 06:45:58 [info] 35#35: *1 [lua] plugin.lua:165: load_stream(): stream plugins: [{"priority":1000,"preread":"function: 0x7f0d7b3b1838","schema":{"properties":{"protocol_level":{"type":"integer"},"upstream":{"type":"object","properties":{"ip":{"type":"string"},"port":{"type":"number"}}},"protocol_name":{"type":"string"}},"type":"object","required":["protocol_name","protocol_level","upstream"]},"log":"function: 0x7f0d7b3b1970","check_schema":"function: 0x7f0d7b3b15d0","name":"mqtt-proxy","version":0.1}], context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *1 [lua] plugin.lua:167: load_stream(): load stream plugin times: 1, context: init_worker_by_lua*
2020/10/29 06:45:58 [notice] 35#35: *1 [lua] debug.lua:44: read_debug_yaml(): failed to fetch /usr/local/apisix/conf/debug.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/debug.yaml': No such file or directory, context: init_worker_by_lua*
2020/10/29 06:45:58 [debug] 36#36: *2 [lua] evp.lua:142: openssl11=true err=nil
2020/10/29 06:45:58 [debug] 35#35: *8 [lua] config_etcd.lua:147: readdir key: /apisix/proto res: {"createdIndex":21,"modifiedIndex":21,"key":"\/apisix\/proto","dir":true}
2020/10/29 06:45:58 [debug] 35#35: *5 [lua] config_etcd.lua:147: readdir key: /apisix/ssl res: {"createdIndex":18,"modifiedIndex":18,"key":"\/apisix\/ssl","dir":true}
2020/10/29 06:45:58 [debug] 35#35: *9 [lua] config_etcd.lua:147: readdir key: /apisix/consumers res: {"createdIndex":16,"modifiedIndex":16,"key":"\/apisix\/consumers","dir":true}
2020/10/29 06:45:58 [debug] 35#35: *6 [lua] config_etcd.lua:147: readdir key: /apisix/global_rules res: {"createdIndex":19,"modifiedIndex":19,"key":"\/apisix\/global_rules","dir":true}
2020/10/29 06:45:58 [debug] 35#35: *3 [lua] config_etcd.lua:147: readdir key: /apisix/routes res: {"nodes":[{"value":{"priority":0,"methods":["GET","POST"],"uri":"\/*","id":"bfe058f5-f3c2-426f-820e-dc6535a51777","service_protocol":"grpc","service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"createdIndex":31,"key":"\/apisix\/routes\/bfe058f5-f3c2-426f-820e-dc6535a51777","modifiedIndex":31}],"modifiedIndex":12,"createdIndex":12,"key":"\/apisix\/routes","dir":true}
2020/10/29 06:45:58 [info] 36#36: *2 [lua] plugin.lua:126: load(): load plugin times: 1, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] plugin.lua:165: load_stream(): stream plugins: [{"priority":1000,"preread":"function: 0x7f0d7b3b1398","schema":{"properties":{"protocol_level":{"type":"integer"},"upstream":{"type":"object","properties":{"ip":{"type":"string"},"port":{"type":"number"}}},"protocol_name":{"type":"string"}},"type":"object","required":["protocol_name","protocol_level","upstream"]},"log":"function: 0x7f0d7b3b14d0","check_schema":"function: 0x7f0d7b3b1130","name":"mqtt-proxy","version":0.1}], context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 36#36: *2 [lua] plugin.lua:167: load_stream(): load stream plugin times: 1, context: init_worker_by_lua*
2020/10/29 06:45:58 [debug] 35#35: *10 [lua] config_etcd.lua:147: readdir key: /apisix/upstreams res: {"createdIndex":13,"modifiedIndex":13,"key":"\/apisix\/upstreams","dir":true}
2020/10/29 06:45:58 [debug] 35#35: *7 [lua] config_etcd.lua:147: readdir key: /apisix/services res: {"nodes":[{"value":{"upstream":{"nodes":{"some-k8s-svc.default.svc.cluster.local:5202":1},"hash_on":"vars","type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"createdIndex":28,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}],"modifiedIndex":14,"createdIndex":14,"key":"\/apisix\/services","dir":true}
2020/10/29 06:45:58 [notice] 36#36: *2 [lua] debug.lua:44: read_debug_yaml(): failed to fetch /usr/local/apisix/conf/debug.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/debug.yaml': No such file or directory, context: init_worker_by_lua*
2020/10/29 06:45:58 [info] 35#35: *7 [lua] service.lua:81: filter(): filter service: {"value":{"upstream":{"nodes":[{"host":"some-k8s-svc.default.svc.cluster.local","port":5202,"weight":1}],"hash_on":"vars","type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}, context: ngx.timer
2020/10/29 06:45:58 [debug] 35#35: *18 [lua] events.lua:211: do_event_json(): worker-events: handling event; source=resty-worker-events, event=started, pid=36, data=nil
2020/10/29 06:45:58 [debug] 36#36: *26 [lua] config_etcd.lua:147: readdir key: /apisix/upstreams res: {"createdIndex":13,"modifiedIndex":13,"key":"\/apisix\/upstreams","dir":true}
2020/10/29 06:45:58 [debug] 36#36: *25 [lua] config_etcd.lua:147: readdir key: /apisix/consumers res: {"createdIndex":16,"modifiedIndex":16,"key":"\/apisix\/consumers","dir":true}
2020/10/29 06:45:58 [debug] 36#36: *23 [lua] config_etcd.lua:147: readdir key: /apisix/services res: {"nodes":[{"value":{"upstream":{"nodes":{"some-k8s-svc.default.svc.cluster.local:5202":1},"hash_on":"vars","type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"createdIndex":28,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}],"modifiedIndex":14,"createdIndex":14,"key":"\/apisix\/services","dir":true}
2020/10/29 06:45:58 [info] 36#36: *23 [lua] service.lua:81: filter(): filter service: {"value":{"upstream":{"nodes":[{"host":"some-k8s-svc.default.svc.cluster.local","port":5202,"weight":1}],"hash_on":"vars","type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}, context: ngx.timer
2020/10/29 06:45:58 [debug] 36#36: *21 [lua] config_etcd.lua:147: readdir key: /apisix/ssl res: {"createdIndex":18,"modifiedIndex":18,"key":"\/apisix\/ssl","dir":true}
2020/10/29 06:45:58 [debug] 36#36: *22 [lua] config_etcd.lua:147: readdir key: /apisix/global_rules res: {"createdIndex":19,"modifiedIndex":19,"key":"\/apisix\/global_rules","dir":true}
2020/10/29 06:45:58 [debug] 36#36: *19 [lua] config_etcd.lua:147: readdir key: /apisix/routes res: {"nodes":[{"value":{"priority":0,"methods":["GET","POST"],"uri":"\/*","id":"bfe058f5-f3c2-426f-820e-dc6535a51777","service_protocol":"grpc","service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"createdIndex":31,"key":"\/apisix\/routes\/bfe058f5-f3c2-426f-820e-dc6535a51777","modifiedIndex":31}],"modifiedIndex":12,"createdIndex":12,"key":"\/apisix\/routes","dir":true}
2020/10/29 06:45:58 [debug] 36#36: *24 [lua] config_etcd.lua:147: readdir key: /apisix/proto res: {"createdIndex":21,"modifiedIndex":21,"key":"\/apisix\/proto","dir":true}
2020/10/29 06:45:59 [notice] 36#36: *52 [lua] debug.lua:44: read_debug_yaml(): failed to fetch /usr/local/apisix/conf/debug.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/debug.yaml': No such file or directory, context: ngx.timer
(......repeated a lot of times......)
2020/10/29 06:46:28 [notice] 36#36: *804 [lua] debug.lua:44: read_debug_yaml(): failed to fetch /usr/local/apisix/conf/debug.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/debug.yaml': No such file or directory, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *8 [lua] config_etcd.lua:229: waitdir key: /apisix/proto prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *8 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *5 [lua] config_etcd.lua:229: waitdir key: /apisix/ssl prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *5 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *9 [lua] config_etcd.lua:229: waitdir key: /apisix/consumers prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *9 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *6 [lua] config_etcd.lua:229: waitdir key: /apisix/global_rules prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *6 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *7 [lua] config_etcd.lua:229: waitdir key: /apisix/services prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *7 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *3 [lua] config_etcd.lua:229: waitdir key: /apisix/routes prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *3 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *10 [lua] config_etcd.lua:229: waitdir key: /apisix/upstreams prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 35#35: *10 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *26 [lua] config_etcd.lua:229: waitdir key: /apisix/upstreams prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *26 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *25 [lua] config_etcd.lua:229: waitdir key: /apisix/consumers prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *25 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *23 [lua] config_etcd.lua:229: waitdir key: /apisix/services prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *23 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *22 [lua] config_etcd.lua:229: waitdir key: /apisix/global_rules prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *22 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *19 [lua] config_etcd.lua:229: waitdir key: /apisix/routes prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *19 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *24 [lua] config_etcd.lua:229: waitdir key: /apisix/proto prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *24 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *21 [lua] config_etcd.lua:229: waitdir key: /apisix/ssl prev_index: 32, context: ngx.timer
2020/10/29 06:46:28 [info] 36#36: *21 [lua] config_etcd.lua:230: res: null, context: ngx.timer
2020/10/29 06:46:29 [notice] 35#35: *842 [lua] debug.lua:44: read_debug_yaml(): failed to fetch /usr/local/apisix/conf/debug.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/debug.yaml': No such file or directory, context: ngx.timer
(......repeated a lot of times......)
2020/10/29 06:46:33 [notice] 36#36: *948 [lua] debug.lua:44: read_debug_yaml(): failed to fetch /usr/local/apisix/conf/debug.yaml attributes: cannot obtain information from file '/usr/local/apisix/conf/debug.yaml': No such file or directory, context: ngx.timer
2020/10/29 06:46:33 [debug] 36#36: *954 [lua] plugin.lua:202: create_obj_fun(): fetched api routes: [{"methods":["POST"],"uri":"\/apisix\/batch-requests","handler":"function: 0x7f0d7b3f2d80"}]
2020/10/29 06:46:33 [debug] 36#36: *954 [lua] plugin.lua:202: create_obj_fun(): fetched api routes: [{"methods":["POST"],"uri":"\/apisix\/plugin\/wolf-rbac\/login","handler":"function: 0x7f0d7b431f48"},{"methods":["PUT"],"uri":"\/apisix\/plugin\/wolf-rbac\/change_pwd","handler":"function: 0x7f0d7b432120"},{"methods":["GET"],"uri":"\/apisix\/plugin\/wolf-rbac\/user_info","handler":"function: 0x7f0d7b4321c8"}]
2020/10/29 06:46:33 [debug] 36#36: *954 [lua] plugin.lua:202: create_obj_fun(): fetched api routes: [{"methods":["GET"],"uri":"\/apisix\/plugin\/jwt\/sign","handler":"function: 0x7f0d8007ade0"}]
2020/10/29 06:46:33 [debug] 36#36: *954 [lua] plugin.lua:202: create_obj_fun(): fetched api routes: [{"methods":["GET"],"uri":"\/apisix\/status","handler":"function: 0x7f0d7b4b5430"}]
2020/10/29 06:46:33 [debug] 36#36: *954 [lua] plugin.lua:202: create_obj_fun(): fetched api routes: [{"methods":["GET"],"uri":"\/apisix\/prometheus\/metrics","handler":"function: 0x7f0d8b77fbb8"}]
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree_uri.lua:66: create_radixtree_router(): insert uri route: {"priority":0,"methods":["GET","POST"],"uri":"\/*","id":"bfe058f5-f3c2-426f-820e-dc6535a51777","service_protocol":"grpc","service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"}, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree_uri.lua:87: create_radixtree_router(): route items: [{"handler":"function: 0x7f0d7b291b78","methods":["POST"],"paths":"\/apisix\/batch-requests"},{"handler":"function: 0x7f0d7b292820","methods":["POST"],"paths":"\/apisix\/plugin\/wolf-rbac\/login"},{"handler":"function: 0x7f0d7b292948","methods":["PUT"],"paths":"\/apisix\/plugin\/wolf-rbac\/change_pwd"},{"handler":"function: 0x7f0d7b292aa0","methods":["GET"],"paths":"\/apisix\/plugin\/wolf-rbac\/user_info"},{"handler":"function: 0x7f0d7b2931c8","methods":["GET"],"paths":"\/apisix\/plugin\/jwt\/sign"},{"handler":"function: 0x7f0d7b293918","methods":["GET"],"paths":"\/apisix\/status"},{"handler":"function: 0x7f0d7b294050","methods":["GET"],"paths":"\/apisix\/prometheus\/metrics"},{"priority":0,"methods":["GET","POST"],"handler":"function: 0x7f0d7b294940","paths":"\/*"}], client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/batch-requests operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/plugin/wolf-rbac/login operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/plugin/wolf-rbac/change_pwd operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/plugin/wolf-rbac/user_info operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/plugin/jwt/sign operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/status operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: /apisix/prometheus/metrics operator: =, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:307: pre_insert_route(): path: / operator: <=, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] radixtree.lua:179: insert_route(): insert route path: / dataprt: 1, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] init.lua:338: http_access_phase(): matched route: {"value":{"priority":0,"methods":["GET","POST"],"uri":"\/*","id":"bfe058f5-f3c2-426f-820e-dc6535a51777","service_protocol":"grpc","service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":31,"has_domain":false,"key":"\/apisix\/routes\/bfe058f5-f3c2-426f-820e-dc6535a51777","modifiedIndex":31}, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] init.lua:489: grpc_access_phase(): route: {"value":{"priority":0,"methods":["GET","POST"],"uri":"\/*","id":"bfe058f5-f3c2-426f-820e-dc6535a51777","service_protocol":"grpc","service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":31,"has_domain":false,"key":"\/apisix\/routes\/bfe058f5-f3c2-426f-820e-dc6535a51777","modifiedIndex":31}, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] plugin.lua:332: merge_service_route(): service conf: {"value":{"upstream":{"nodes":[{"host":"some-k8s-svc.default.svc.cluster.local","port":5202,"weight":1}],"hash_on":"vars","type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] plugin.lua:333: merge_service_route(): route conf: {"value":{"priority":0,"methods":["GET","POST"],"uri":"\/*","id":"bfe058f5-f3c2-426f-820e-dc6535a51777","service_protocol":"grpc","service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":31,"has_domain":false,"key":"\/apisix\/routes\/bfe058f5-f3c2-426f-820e-dc6535a51777","modifiedIndex":31}, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] balancer.lua:160: pick_server(): route: {"value":{"service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525","upstream":{"nodes":[{"host":"some-k8s-svc.default.svc.cluster.local","port":5202,"weight":1}],"hash_on":"vars","type":"roundrobin"},"id":"bfe058f5-f3c2-426f-820e-dc6535a51777"},"clean_handlers":{},"modifiedIndex":28,"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","_cache_ver":{"value":{"upstream":{"hash_on":"vars","nodes":[{"host":"some-k8s-svc.default.svc.cluster.local","port":5202,"weight":1}],"type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}} while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] balancer.lua:161: pick_server(): ctx: {"conf_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525","var":{"host":"<my-server>","request_method":"GET","uri":"\/","remote_addr":"<mylaptopip>","_request":"cdata<void *>: 0x55a409c06330"},"upstream_version":28,"upstream_key":"roundrobin#route_bfe058f5-f3c2-426f-820e-dc6535a51777","upstream_healthcheck_parent":"table: 0x7f0d7b2995c0","conf_type":"service","conf_version":28,"upstream_conf":"table: 0x7f0d7b299750","matched_route":{"value":{"service_id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525","upstream":{"nodes":[{"host":"some-k8s-svc.default.svc.cluster.local","port":5202,"weight":1}],"hash_on":"vars","type":"roundrobin"},"id":"bfe058f5-f3c2-426f-820e-dc6535a51777"},"clean_handlers":{},"modifiedIndex":28,"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","_cache_ver":{"value":{"upstream":{"hash_on":"vars","nodes":[{"host":"some-k8s-svc.default.svc.cluster.l
ocal","port":5202,"weight":1}],"type":"roundrobin"},"id":"66ebf6d4-5a75-44c9-b25c-e3e562b88525"},"clean_handlers":{},"createdIndex":28,"has_domain":true,"key":"\/apisix\/services\/66ebf6d4-5a75-44c9-b25c-e3e562b88525","modifiedIndex":28}},"plugins":{}} while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 [lua] balancer.lua:264: load_balancer(): proxy request to some-k8s-svc.default.svc.cluster.local:5202 while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [error] 36#36: *954 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [info] 36#36: *954 client <mylaptopip> closed keepalive connection
```
repeated lines(phpadmin attack) removed, and real server's ip are replaced, any other lines are untouched
----------------------------------------------------------------
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] tokers commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718535042
It seems APISIX doesn't treat the endpoint as domain, maybe it's a bug in the `merge_service_route` (the `has_domain` isn't attached on setvice's upstream). @membphis
----------------------------------------------------------------
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 closed issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis closed issue #2533:
URL: https://github.com/apache/apisix/issues/2533
----------------------------------------------------------------
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] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719119397
setting resolv.conf to ```nameserver 172.21.0.10``` does not fix this problem.
i'm gonna give 2.0 a try
----------------------------------------------------------------
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] jeffguorg edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719115231
@membphis
yes, i started to use apisix just a few day ago before 2.0 is released.
so this is already fix in 2.0, right? is it possible to backport it to 1.5? i'm worried that 2.x branch is not stable enough for production
edit: Found that resolv.conf can be overwrite manually after set dnsPolicy to None: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy. i would try this possible workaround first
----------------------------------------------------------------
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 #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-722370628
I think we can close this issue. let us try to fix this bug by issue: #2532
----------------------------------------------------------------
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] tokers commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
tokers commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718481376
> @gxthrj please help me to confirm if the APISIX can support this resolver for k8s ENV.
>
> ```
> bash-5.0# cat /etc/resolv.conf
> nameserver 172.21.0.10
> search apisix.svc.cluster.local svc.cluster.local cluster.local
> options ndots:5
> ```
>
> especially about `search apisix.svc.cluster.local svc.cluster.local cluster.local`, I am not sure for this.
The search option is the root cause that we can use the short name instead of the FQDN to communicate with a Service. We can support to use short name and respect the /etc/resolv.conf but FQDN is more semantic and unambiguous.
----------------------------------------------------------------
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] moonming commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718386861
I copy the error msg:
```
kubectl --namespace apisix exec -it apisix-ctznq -- cat logs/error.log
# 2020/10/27 02:39:56 [warn] 1#1: low address bits of 172.17.0.0/12 are meaningless in /usr/local/apisix/conf/nginx.conf:141
# 2020/10/27 02:39:56 [warn] 1#1: low address bits of 172.17.0.0/12 are meaningless in /usr/local/apisix/conf/nginx.conf:153
# 2020/10/27 02:41:15 [error] 36#36: *2063 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
# 2020/10/27 02:41:19 [error] 36#36: *2163 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
# 2020/10/27 02:41:20 [error] 36#36: *2192 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
# 2020/10/27 02:41:20 [error] 36#36: *2202 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
# 2020/10/27 02:41:20 [error] 36#36: *2210 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
# 2020/10/27 02:41:21 [error] 36#36: *2225 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
# 2020/10/27 02:49:00 [error] 36#36: *14299 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
guochao@chao-20kna04gcd /tmp % kubectl --namespace apisix exec -it apisix-ctznq -- curl some-k8s-svc.default.svc.cluster.local:5202
# gRPC requires HTTP/2
```
@membphis please take a look
----------------------------------------------------------------
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] gy09535 commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
gy09535 commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719466474
another problem is apisix how to support all dns resolve rules , now can just support name server , I think when the host is not find ,we should search another domain such as "service.name.apisix.svc.cluster.local" and "service.name.cluster.local" etc....
```
nameserver xxxxxx
search apisix.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
```
----------------------------------------------------------------
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] gxthrj commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718503941
> @gxthrj please help me to confirm if the APISIX can support this resolver for k8s ENV.
>
> ```
> bash-5.0# cat /etc/resolv.conf
> nameserver 172.21.0.10
> search apisix.svc.cluster.local svc.cluster.local cluster.local
> options ndots:5
> ```
>
> especially about `search apisix.svc.cluster.local svc.cluster.local cluster.local`, I am not sure for this.
the search meaning: *.apisix.svc.cluster.local *.svc.cluster.local *.cluster.local will use 172.21.0.10 nameserver.
the config of /etc/resolv.conf looks correct
----------------------------------------------------------------
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 #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-722370985
@gy09535 please feel free to reopen this issue if you think we still need 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718390939
> [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while
this domain should be parsed into IP address.
1. Do we set the right DNS resolver?
2. We should to check more error log. Before this, should be an earlier error log.
please provide a full error log for confirming 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719150249
@membphis solution confirmed. i recreated the cluster and reconfigured apisix and it works like a charm.
still... do you have any plan to backport the patch to 1.x branch?
----------------------------------------------------------------
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] gy09535 edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
gy09535 edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719466474
Another problem is apisix how to support all dns resolve rules , now can just support name server , I think when the host is not find ,we should search another domain such as "service.name.apisix.svc.cluster.local" and "service.name.cluster.local" etc... I think we can support this.
```
nameserver xxxxxx
search apisix.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
```
----------------------------------------------------------------
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 #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718424096
only one error log was found
`2020/10/29 06:46:33 [error] 36#36: *954 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <mylaptopip>, server: , request: "GET / HTTP/1.1", host: "<my-server>"`
I think we can get more. Please make a try with this way(only fetched the error log which contains `error` word:
```
cat logs/error.log | grep error
```
----------------------------------------------------------------
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] gxthrj commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-717634802
please show us `/etc/resolv.conf`
----------------------------------------------------------------
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] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-717641928
@gxthrj
is it related to #2532?
```
$ guochao@chao-20kna04gcd ~ % kubectl --namespace apisix exec -it apisix-ctznq -- cat /etc/resolv.conf
nameserver 172.21.0.10
search apisix.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
```
----------------------------------------------------------------
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] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-717998181
sorry to bother, but do you have any idea on this? @moonming
----------------------------------------------------------------
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] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718448972
@membphis
> only one error log was found
yes. and all error logs follows the pattern: ```failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream```
> Please make a try with this way(only fetched the error log which contains error word:
> ```cat logs/error.log | grep error```
```bash
bash-5.0# sed -n '/error/{s:(xx.xx.xx.xx):<my-server>:g; s:(xx.xx.xx.xx):<my-laptop>:g; s:(real-svc-name):some-k8s-svc:g; p}' logs/error.log # lines that match error { replace secrets and print }
2020/10/29 06:46:33 [error] 36#36: *954 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <my-laptop>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:48:33 [error] 35#35: *4097 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: 192.241.237.233, server: , request: "GET /hudson HTTP/1.1", host: "<my-server>"
2020/10/29 07:32:39 [error] 36#36: *73764 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: 178.32.197.81, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:46:33 [error] 36#36: *954 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: <my-laptop>, server: , request: "GET / HTTP/1.1", host: "<my-server>"
2020/10/29 06:48:33 [error] 35#35: *4097 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: 192.241.237.233, server: , request: "GET /hudson HTTP/1.1", host: "<my-server>"
2020/10/29 07:32:39 [error] 36#36: *73764 [lua] balancer.lua:267: load_balancer(): failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed while connecting to upstream, client: 178.32.197.81, server: , request: "GET / HTTP/1.1", host: "<my-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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] gy09535 commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
gy09535 commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-722304979
> > Another problem is apisix how to support all dns resolve rules , now can just support name server , I think when the host is not find ,we should search another domain such as "service.name.apisix.svc.cluster.local" and "service.name.cluster.local" etc... I think we can support this.
> > ```
> > nameserver xxxxxx
> > search apisix.svc.cluster.local svc.cluster.local cluster.local
> > options ndots:5
> > ```
>
> that is a todo feature. do you know how it works? and welcome PR always
We can discuss in this issue : https://github.com/apache/apisix/issues/2532
My idea is do it in our lua function and expand resolve code, If we can not find Ip we can do other resolve logical below "/etc/resolv.conf" , I think I can do this.
----------------------------------------------------------------
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 #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-717982064
I do not why :( . Does anyone know this?
----------------------------------------------------------------
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 #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718668527
> It seems APISIX doesn't treat the endpoint as domain, maybe it's a bug in the `merge_service_route` (the `has_domain` isn't attached on setvice's upstream). @membphis
I fixed this bug for days, I found that @jeffguorg is using the version `1.5`. please make a try with `2.0` 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] membphis commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-718425768
@gxthrj please help me to confirm if the APISIX can support this resolver for k8s ENV.
```
bash-5.0# cat /etc/resolv.conf
nameserver 172.21.0.10
search apisix.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
```
especially about `search apisix.svc.cluster.local svc.cluster.local cluster.local`, I am not sure for this.
----------------------------------------------------------------
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