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/08/28 03:24:17 UTC

[GitHub] [apisix] lilien1010 opened a new issue #2129: bug: set route fail when ETCD host is domain in K8S env

lilien1010 opened a new issue #2129:
URL: https://github.com/apache/apisix/issues/2129


   ### Issue description
    
   recently I am try build a helm package for Kubesphere's built-in AppStore
   
   but if I use internal dns for etcd, it will show an error like this 
   ```
   {"error_msg":"apisix-mhkykh-etcd-0.apisix-mhkykh-etcd could not be resolved (3: Host not found)"}
   ```
   
   and here is the configuration of config.yaml
   ```
   etcd:
     host:
       - "http://apisix-mhkykh-etcd-0.apisix-mhkykh-etcd:2379"
     prefix: "/apisix" # apisix configurations prefix
     timeout: 3 # 3 seconds
   ```
   
   it works fine inside the docker cli
   ```
   curl http://apisix-mhkykh-etcd-0.apisix-mhkykh-etcd:2379/version
   {"etcdserver":"3.3.12","etcdcluster":"3.3.0"}
   ```
   
   ```
   cat /etc/resolv.conf
   nameserver 169.254.25.10
   search apisix-test-liling.svc.cluster.local svc.cluster.local cluster.local
   options ndots:5
   ```
   
   also the the resolver inside the `nginx.conf` is using local nameserver
   cat conf/nginx.conf
   ```
       resolver 169.254.25.10 valid=30;
       resolver_timeout 5;
    ....
   
       init_by_lua_block {
           require "resty.core"
           apisix = require("apisix")
   
           local dns_resolver = { "169.254.25.10", }
           local args = {
               dns_resolver = dns_resolver,
           }
           apisix.http_init(args)
       }
   ```
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.5-alpine
   * OS: K8S 
   
   ### Minimal test code / Steps to reproduce the issue
   test code:
   https://github.com/lilien1010/helm-charts/tree/add_apisix_and_etcd
   cd src/main
   `helm dependency update apisix`
    `helm package apisix`
   
   
   
   ### What's the expected result?
   it should works fine when etcd is a internal domain


----------------------------------------------------------------
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] lilien1010 edited a comment on issue #2129: bug: set route fail when ETCD host is domain in K8S env

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


   that's weird
   I found the nameserver is not ok,
   when I try
   `nslookup apisix-mhkykh-etcd-0.apisix-mhkykh-etcd`
   it shows
   ```
   Server:         169.254.25.10
   Address:        169.254.25.10:53
   
   ** server can't find apisix-mhkykh-etcd-0.apisix-mhkykh-etcd: NXDOMAIN
   
   ** server can't find apisix-mhkykh-etcd-0.apisix-mhkykh-etcd: NXDOMAIN
   
   ```


----------------------------------------------------------------
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] github-actions[bot] commented on issue #2129: bug: set route fail when ETCD host is domain in K8S env

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #2129:
URL: https://github.com/apache/apisix/issues/2129#issuecomment-973931544


   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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] github-actions[bot] commented on issue #2129: bug: set route fail when ETCD host is domain in K8S env

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #2129:
URL: https://github.com/apache/apisix/issues/2129#issuecomment-986002406


   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any 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] angus9487 commented on issue #2129: bug: set route fail when ETCD host is domain in K8S env

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


   User the address like this:
   etcd:
         host:                          
           - "http://{{ ServiceName }}.{{ Namespace}}.svc.cluster.local:2379"
   
   eg.     http://apisix-etcd.apisix-test.svc.cluster.local:2379


----------------------------------------------------------------
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] lilien1010 commented on issue #2129: bug: set route fail when ETCD host is domain in K8S env

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


    
   ![image](https://user-images.githubusercontent.com/3814966/91535359-9b8dd400-e945-11ea-8442-f2c9b6ef346e.png)
   


----------------------------------------------------------------
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] lilien1010 commented on issue #2129: bug: set route fail when ETCD host is domain in K8S env

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


   that's wired
   I found the nameserver is not ok,
   when I try
   `nslookup apisix-mhkykh-etcd-0.apisix-mhkykh-etcd`
   it shows
   ```
   Server:         169.254.25.10
   Address:        169.254.25.10:53
   
   ** server can't find apisix-mhkykh-etcd-0.apisix-mhkykh-etcd: NXDOMAIN
   
   ** server can't find apisix-mhkykh-etcd-0.apisix-mhkykh-etcd: NXDOMAIN
   
   ```


----------------------------------------------------------------
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] github-actions[bot] closed issue #2129: bug: set route fail when ETCD host is domain in K8S env

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #2129:
URL: https://github.com/apache/apisix/issues/2129


   


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