Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd-server could not be resolved (3: Host not found) #42

Closed
to2false opened this issue Apr 14, 2020 · 6 comments
Closed

etcd-server could not be resolved (3: Host not found) #42

to2false opened this issue Apr 14, 2020 · 6 comments

Comments

@to2false
Copy link
Contributor

I created a network named gateway, then let ectd-server and test-api-gateway joined this network.

docker exec -it test-api-gateway sh
/usr/local/apisix # ping etcd-server
PING etcd-server (172.19.0.2): 56 data bytes
64 bytes from 172.19.0.2: seq=0 ttl=64 time=0.272 ms
64 bytes from 172.19.0.2: seq=1 ttl=64 time=0.071 ms
64 bytes from 172.19.0.2: seq=2 ttl=64 time=0.068 ms
64 bytes from 172.19.0.2: seq=3 ttl=64 time=0.116 ms
64 bytes from 172.19.0.2: seq=4 ttl=64 time=0.078 ms
64 bytes from 172.19.0.2: seq=5 ttl=64 time=0.066 ms

But got error as the title after request

curl http://127.0.0.1:8080/apisix/admin/services/1 -X PUT -d '
{
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "127.0.0.1:9081": 1
        }
    }
}'
{"error_msg":"etcd-server could not be resolved (3: Host not found)"}

Specify ip works

@linsir
Copy link
Member

linsir commented Apr 14, 2020

You should change the etcd address to etcd-server in config.yaml

@to2false
Copy link
Contributor Author

@linsir I changed it, If not, I won't get this error

@linsir
Copy link
Member

linsir commented Apr 14, 2020

Try add 127.0.0.11 to dns_resolver in config.yaml

@to2false
Copy link
Contributor Author

it works, thx

@izayoi-akira
Copy link

it works, thx

How to configure this

@to2false
Copy link
Contributor Author

@izayoi-akira #42 (comment) the above reply explains the steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants