cloudfoundry-attic / bosh-lite

A lite development env for BOSH
Apache License 2.0
319 stars 244 forks source link

can not access api.bosh-lite.vm from host machine #412

Closed Omnipresent closed 7 years ago

Omnipresent commented 7 years ago

I've followed the instructions to get bosh-lite running on AWS with CF.

I have CF running on bosh-lite, but I can't seem to be able to do cf l -a https://api.bosh-lite.com from my host machine. I've ran the ./bin/add-route script but it doesn't help.

omni@my-host:~/workspace/bosh-lite$ cf l -a https://api.bosh-lite.com -u admin -p admin --skip-ssl-validation
API endpoint: https://api.bosh-lite.com
FAILED
Error performing request: Get https://api.bosh-lite.com/v2/info: dial tcp 10.244.0.34:443: getsockopt: no route to host
TIP: If you are behind a firewall and require an HTTP proxy, verify the https_proxy environment variable is correctly set. Else, check your network connection.

omni@my-host:~/workspace/bosh-lite$ ping 10.244.0.34
PING 10.244.0.34 (10.244.0.34) 56(84) bytes of data.
From 192.168.50.1 icmp_seq=1 Destination Host Unreachable
From 192.168.50.1 icmp_seq=2 Destination Host Unreachable

omni@my-host:~/workspace/bosh-lite$ ./bin/add-route
+ old_ips=10.244.0.0/19
+ ips=10.244.0.0/16
+ gw=192.168.50.4
+ echo 'Adding the following route entry to your local route table to enable direct container access: 10.244.0.0/16 via 192.168.50.4. Your sudo password may be required.'
++ uname
+ '[' Linux = Darwin ']'
++ uname
+ '[' Linux = Linux ']'
+ type route
+ type ip
+ sudo ip route del 10.244.0.0/19 via 192.168.50.4
RTNETLINK answers: No such process
+ sudo ip route add 10.244.0.0/16 via 192.168.50.4
RTNETLINK answers: File exists

I CAN ssh into the AWS box and am able to cf l -a https://api.bosh-lite.com

omni@my-host:~/workspace/bosh-lite$ vagrant ssh
ubuntu@agent-id-bosh-0:~$ cf l -a https://api.bosh-lite.com -u admin -p admin --skip-ssl-validation
API endpoint: https://api.bosh-lite.com
Authenticating...
OK
xpioneer1991 commented 7 years ago

hello,Omnipresent,I also have this problem. I can ping the ip.

vagrant@bosh-lite:~$ cf l -a https://api.bosh-lite.com -u admin -p admin --skip-ssl-validation API endpoint: https://api.bosh-lite.com FAILED Error performing request: Get https://api.bosh-lite.com/v2/info: dial tcp: i/o timeout TIP: If you are behind a firewall and require an HTTP proxy, verify the https_proxy environment variable is correctly set. Else, check your network connection. vagrant@bosh-lite:~$ ping 10.244.0.34 PING 10.244.0.34 (10.244.0.34) 56(84) bytes of data. 64 bytes from 10.244.0.34: icmp_seq=1 ttl=64 time=0.040 ms 64 bytes from 10.244.0.34: icmp_seq=2 ttl=64 time=0.055 ms

dpb587-pivotal commented 7 years ago

Sorry this issue got lost - the bin/add-route script is preconfigured to work for the vagrant IP (192.168.50.4). If you're running things externally on AWS you'll need to customize the gw in the script.

This Vagrant-based bosh-lite approach is being deprecated - you may want to try out the newer recommendation in cloudfoundry/bosh-deployment. Still under development, but would appreciate the feedback.