Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

UAA returns error: getaddrinfo: Name or service not known #50

Closed
skuppa opened this issue Nov 6, 2013 · 3 comments
Closed

UAA returns error: getaddrinfo: Name or service not known #50

skuppa opened this issue Nov 6, 2013 · 3 comments

Comments

@skuppa
Copy link

skuppa commented Nov 6, 2013

With latest code, I was able to deploy bosh-lite successfully but I am trying to login using cf but it fails with error that Name or service not known. Any suggestion?

devops@malligai2:~/git/cf/cf-samples/hello$ 
devops@malligai2:~/git/cf/cf-samples/hello$ cf target
Target Information (where will apps be pushed):
  CF instance: http://api.10.244.0.34.xip.io (API version: 2)
  user: N/A
  target app space: N/A (org: N/A)
devops@malligai2:~/git/cf/cf-samples/hello$ cf login
target: http://api.10.244.0.34.xip.io

Time of crash:
  2013-11-05 23:54:30 -0800

CF::UAA::BadTarget: error: getaddrinfo: Name or service not known

cf-uaa-lib-2.0.0/lib/uaa/http.rb:161:in `rescue in net_http_request'
cf-uaa-lib-2.0.0/lib/uaa/http.rb:149:in `net_http_request'
cf-uaa-lib-2.0.0/lib/uaa/http.rb:137:in `request'
cf-uaa-lib-2.0.0/lib/uaa/http.rb:119:in `http_get'
cf-uaa-lib-2.0.0/lib/uaa/http.rb:89:in `json_get'
cf-uaa-lib-2.0.0/lib/uaa/info.rb:70:in `server'
@syslxg
Copy link

syslxg commented Nov 7, 2013

if the problem is still there, please try

cf target http://api.10.244.0.34.xip.io  --trace 
cf login --trace

and post the outputs

@mkocher
Copy link
Contributor

mkocher commented Nov 7, 2013

Dup of #34

We're pretty sure this is caused by a state the VM can get into where it has no external internet access, or extremely slow external internet access. Halting the vm and bringing it back up again may make the problem go away.

We'd need steps to reproduce the problem, or an explanation of why we're seeing the network not working on the vagrant vm in order to fix this.

@mkocher mkocher closed this as completed Nov 7, 2013
@skuppa
Copy link
Author

skuppa commented Nov 8, 2013

Thanks Gary and mkocher.

The xip.io does not resolve to ip address due to resolv.conf points to 127.0.01 and it looks like a bug in ubuntu 12.04, https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/933723. I removed nameserver 127.0.0.1 from resolv.conf and added nameserver 8.8.8.8 then problem resolved.

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

No branches or pull requests

3 participants