Re: applications on CF cannot download files from internet


Yitao Jiang
 

Maybe the security group block egress requests.
Refer to https://docs.cloudfoundry.org/adminguide/app-sec-groups.html

On Sat, Nov 7, 2015 at 2:24 PM, Youzhi Zhu <zhuyouzhi03(a)gmail.com> wrote:

I deploy My application to my own cloud foundry platform, and the app
needs download some files from internet,but it always failed download, so I
get into the container to do some test with wget, it shows that the
container can connect to internet server but cannot download files.

*vcap(a)193r3tpboqm:~/tmp$ ping www.baidu.com <http://www.baidu.com/>*
*PING www.a.shifen.com <http://www.a.shifen.com/> (180.97.33.107) 56(84)
bytes of data.*
*64 bytes from 180.97.33.107 <http://180.97.33.107/>: icmp_seq=1 ttl=50
time=27.8 ms*
*64 bytes from 180.97.33.107 <http://180.97.33.107/>: icmp_seq=2 ttl=50
time=27.7 ms*
*^C*
*--- www.a.shifen.com <http://www.a.shifen.com/> ping statistics ---*
*2 packets transmitted, 2 received, 0% packet loss, time 1001ms*
*rtt min/avg/max/mdev = 27.740/27.814/27.888/0.074 ms*
*vcap(a)193r3tpboqm:~/tmp$ wget www.baidu.com <http://www.baidu.com/>*
*--2015-11-06 15:25:49-- http://www.baidu.com/ <http://www.baidu.com/>*
*Resolving www.baidu.com... 180.97.33.108, 180.97.33.107*
*Connecting to www.baidu.com <http://www.baidu.com/>|180.97.33.108|:80...
connected.*
*HTTP request sent, awaiting response... 200 OK*
*Length: unspecified [text/html]*
*Saving to: `index.html'*

* [ <=>
]0
--.-K/s *
*vcap(a)193r3tpboqm:~/tmp$ ll | grep index.html *
*-rw-r--r-- 1 vcap vcap 0 2015-11-06 15:25 index.html*
*vcap(a)193r3tpboqm:~/tmp$ *

but the host where dea running can wget files successfully

*root(a)dea03:~# wget www.baidu.com <http://www.baidu.com/>*
*--2015-11-06 23:30:28-- http://www.baidu.com/ <http://www.baidu.com/>*
*Resolving www.baidu.com <http://www.baidu.com/> (www.baidu.com
<http://www.baidu.com/>)... 180.97.33.107, 180.97.33.108*
*Connecting to www.baidu.com <http://www.baidu.com/> (www.baidu.com
<http://www.baidu.com/>)|180.97.33.107|:80... connected.*
*HTTP request sent, awaiting response... 200 OK*
*Length: unspecified [text/html]*
*Saving to: `index.html.1'*

* [ <=>
]
97,308 --.-K/s in 0.09s *

*2015-11-06 23:30:29 (1.03 MB/s) - `index.html.1' saved [97308]*

Does anyone met this situation before? thanks!

my cf version is cf-release170 and the os is Ubuntu 12.04.1 LTS
--

Regards,

Yitao
jiangyt.github.io

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.