container cannot communicate with the host

87 views
Skip to first unread message

Youzhi Zhu

unread,
May 22, 2015, 3:17:11 AM5/22/15
to vcap...@cloudfoundry.org
Hi all

    I have an app A and a service B, service B is running on the dea server(ip 10.0.0.254), app A need to connect with service B through tcp, it works normally in my LAN, but when I push A to cf, it cannot connect to B, then I execute bin/wsh to get into the container and ping the host ip,  it's unreachable, as below:

root@18mkbd9n808:~# ping 10.0.0.254
PING 10.0.0.254 (10.0.0.254) 56(84) bytes of data.
From 10.0.0.254 icmp_seq=1 Destination Port Unreachable
From 10.0.0.254 icmp_seq=2 Destination Port Unreachable
^C
--- 10.0.0.254 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1002ms


But if I ping another host in the LAN. it can be reached!!!

root@18mkbd9n808:~# ping 10.0.0.253
PING 10.0.0.253 (10.0.0.253) 56(84) bytes of data.
64 bytes from 10.0.0.253: icmp_seq=1 ttl=63 time=1.60 ms
64 bytes from 10.0.0.253: icmp_seq=2 ttl=63 time=0.421 ms
^C
--- 10.0.0.253 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.421/1.013/1.606/0.593 ms


It's wired!!! my cf-release is cf-175 and I have only one dea server.Does anyone met this situation before? thanks!

Matthew Sykes

unread,
May 22, 2015, 6:01:43 AM5/22/15
to vcap...@cloudfoundry.org
Warden explicitly disables access to the container host. If you move up to a more recent level of cf-release, that behavior is configurable with the `allow_host_access` flag. When that flag is true, this line is skipped:

https://github.com/cloudfoundry/warden/blob/4f1e5c049a12199fdd1f29cde15c9a786bd5fac8/warden/root/linux/net.sh#L128

At the level you're at, that rule is always specified so you'd have to manually change it.


--
This mailing list is for closed, and is available for archival purposes only. For active discussion, please visit https://lists.cloudfoundry.org/mailman/listinfo/cf-dev or email cf-...@lists.cloudfoundry.org
---
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAGO-E6pv-Z3kEVUwMu2Wce1wBDHUpa49mjdOe1PXXrO-bKpVPg%40mail.gmail.com.



--
Matthew Sykes
matthe...@gmail.com

Dhilip Kumar S

unread,
May 27, 2015, 9:23:33 AM5/27/15
to vcap...@cloudfoundry.org

Hi All,

 

While I was following the bosh release steps to deploy diego in bosh-lite environment .  It gets stuck at at the below area for hours how do I debug this?  Any clue would be great

 

Building golang1.4...

  Using final version 'f57ddbc8d55d7a0f08775bf76bb6a27dc98c7ea7'

 

Building cloud_controller_ng...

  Using final version 'e20142a32939a531038ace16a3cbe3b8242987e9'

 

Building libpq...

  Using final version '49cc7477fcf9a3fef7a1f61e1494b32288587ed8'

 

Building nginx...

  Using final version 'c916c10937c83a8be507d3100133101eb403c826'

 

Building rtr...

  Using final version 'cd0d40ad56132a4d1cbc19223078f8ff96727d22'

 

Building doppler...

  Using final version '2135434c91dc5e6f4aab6406b03ac02f9c2207fa'

 

Building uaa...

  No artifact found for uaa

  Generating...

  Pre-packaging...

 

 

Regards,

Dhilip

Filip Hanik

unread,
May 27, 2015, 9:31:53 AM5/27/15
to vcap...@cloudfoundry.org
The script that is executing at the time is:


So what my suggestion is to test if this works is that you can do

1. 'cd src/uaa'
2. ensure that you have a JDK 7 installed
3. run the command './gradlew assemble --info'

and this will tell us if the build process works on your machine.
We're looking for the output 

BUILD SUCCESSFUL

Total time: 40.509 secs
Task timings:
    579ms  :cloudfoundry-identity-common:jar
   7056ms  :cloudfoundry-identity-common:javadoc
   1981ms  :cloudfoundry-identity-scim:compileJava
    747ms  :cloudfoundry-identity-login:compileJava
   3800ms  :cloudfoundry-identity-scim:javadoc
   3141ms  :cloudfoundry-identity-login:javadoc
   3055ms  :cloudfoundry-identity-uaa:war
   1379ms  :cloudfoundry-identity-samples:cloudfoundry-identity-api:javadoc
   2176ms  :cloudfoundry-identity-samples:cloudfoundry-identity-api:war
   1443ms  :cloudfoundry-identity-samples:cloudfoundry-identity-app:javadoc
   2178ms  :cloudfoundry-identity-samples:cloudfoundry-identity-app:war



Reply all
Reply to author
Forward
0 new messages