deploy CF on OpenStack behind proxy : bosh upload stemcell failed with 'Connection timed out'

88 views
Skip to first unread message

Brice Vandeputte

unread,
Aug 8, 2013, 5:06:25 AM8/8/13
to bosh-...@cloudfoundry.org
hi,
 i'm always following the Deploying Cloud Foundry on OpenStack guide
 following deploying micro bosh instance i now try to success the next step : uploading bosh stemcell 



Director task 5

Update stemcell
  downloading remote stemcell: Connection timed out - connect(2) (00:03:09)                         
Error                   1/6 00:03:09                                                                

Error 100: Connection timed out - connect(2)

Task 5 error

For a more detailed error report, run: bosh task 5 --debug


 so my openstack instance (the bosh vm too) is behind a proxy
 as described in assumption in validate openstack (Can access the Internet from within instances?)  an instance could access internet if a proxy is set
 so i answer YES to this assumption because a customization script could set the proxy; here is a sample :

#!/bin/bash
INSTANCE_USER=myuser
PROFILE_SCRIPT=/home/$INSTANCE_USER/.bash_profile
PROXY_PRESENT=`grep http_proxy $PROFILE_SCRIPT | wc -l`
if [[ $PROXY_PRESENT == "1" ]]
 then
   echo "proxy OK in $PROFILE_SCRIPT"
 else
   echo "proxy missing from $PROFILE_SCRIPT ; we add it"
   echo "export http_proxy=proxy.intranet.fr:8080" >> $PROFILE_SCRIPT
   echo "export https_proxy=proxy.intranet.fr:8080" >> $PROFILE_SCRIPT
   echo "export no_proxy='127.0.0.1,localhost,169.254.169.254'" >> $PROFILE_SCRIPT
fi

 with bosh micro i think i can't set this custo script ?

 this case i try to add it by hand once bosh agent running 

i try updating the following files :
    /etc/profile OR /home/vcap/.bash_profile && /home/root/.bash_profile
    (then always reboot the bosh agent)
but seems not solve my connect timeout issue 
(cat /proc/<bosh agent or director PID>/environ never contains http_proxy env var)

as described in this isssue (for AWS) https://github.com/cloudfoundry/bosh/issues/77 
   i try to update director manifest file (target vm) :  /var/vcap/jobs/director/config/director.yml 
   by adding "proxy_uri" attribute
but seems not solving my connect timeout too.. :'(

do you think that proxy_uri is supported for OpenStack ? 
could i update bosh target vm to set http_proxy env var by hand ? where ?

should i restart the "micro bosh deploy" from scratch  including   "proxy_uri" attribute into micro_bosh.yml ?

in advance thanks
Regards
Brice

Brice Vandeputte

unread,
Aug 8, 2013, 5:07:48 AM8/8/13
to bosh-...@cloudfoundry.org
in addition; i miss to include the task debug output :

E, [2013-08-08T08:44:43.577181 #1220] [task:5] ERROR -- : Connection timed out - connect(2)
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:762:in `initialize'
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:762:in `open'
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
/var/vcap/packages/ruby/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
/var/vcap/packages/ruby/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:762:in `connect'
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:744:in `start'
/var/vcap/packages/ruby/lib/ruby/1.9.1/net/http.rb:557:in `start'
/var/vcap/packages/director/gem_home/gems/director-1.5.0.pre.870/lib/director/download_helper.rb:18:in `download_remote_file'
/var/vcap/packages/director/gem_home/gems/director-1.5.0.pre.870/lib/director/jobs/update_stemcell.rb:97:in `block in download_remote_stemcell'

Brice Vandeputte

unread,
Aug 8, 2013, 5:31:40 AM8/8/13
to bosh-...@cloudfoundry.org
Ok

i was thinking that the target vm download the stemcell but this is the client (oops)

then i just find a way to get it:
(set proxy)
(unset proxy)
and simply launch
$ bosh upload stemcell latest-bosh-stemcell-openstack.tgz

(sorry for the noise)
regards
Reply all
Reply to author
Forward
0 new messages