DNS configuration with Cloud Foundry

319 views
Skip to first unread message

Guido Davide Dall'Olio

unread,
Nov 5, 2013, 10:03:38 AM11/5/13
to bosh-...@cloudfoundry.org
Hi guys. Sorry to bother, again me!
This is my deployment file: http://pastebin.com/SBy7Lin4
it's working (unbelievable) !

But CloudFoundry is only partially working.

I can set "cf target http://ccng.cf.my.cloud"
I can create space, org, but when I try to push an app I get this error:

cf push
Using manifest file manifest.yml

Creating hello... OK

1: cf.my.cloud
2: none
Domain> cf.my.cloud

Creating route hello.cf.my.cloud... OK
Binding hello.cf.my.cloud to hello... OK
Uploading hello... OK
Preparing to start hello... OK

Time of crash:
  2013-11-05 09:44:38 -0500

Errno::ECONNREFUSED: Connection refused - connect(2)

/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `initialize'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `open'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `block in connect'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `connect'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:745:in `start'
/home/guidodavide/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/net/http.rb:557:in `start'
cfoundry-4.5.3/lib/cfoundry/baseclient.rb:110:in `stream_url'
cfoundry-4.5.3/lib/cfoundry/v2/client.rb:82:in `stream_url'
cf-5.4.1/lib/cf/cli/app/start.rb:55:in `stream_start_log'
cf-5.4.1/lib/cf/cli/app/start.rb:28:in `block in start'
cf-5.4.1/lib/cf/spacing.rb:40:in `block in spaced'
cf-5.4.1/lib/cf/spacing.rb:38:in `each'
cf-5.4.1/lib/cf/spacing.rb:38:in `spaced'
cf-5.4.1/lib/cf/cli/app/start.rb:17:in `start'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
cf-5.4.1/lib/manifests/plugin.rb:44:in `call'
cf-5.4.1/lib/manifests/plugin.rb:44:in `wrap_with_optional_name'
cf-5.4.1/lib/manifests/plugin.rb:11:in `block in default_to_app_from_manifest'
mothership-0.5.1/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in `block (2 levels) in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:73:in `invoke'
cf-5.4.1/lib/cf/cli/app/push/create.rb:91:in `start_app'
cf-5.4.1/lib/cf/cli/app/push.rb:59:in `setup_new_app'
cf-5.4.1/lib/cf/cli/app/push.rb:48:in `push'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
cf-5.4.1/lib/manifests/plugin.rb:108:in `call'
cf-5.4.1/lib/manifests/plugin.rb:108:in `block in push_with_manifest'
mothership-0.5.1/lib/mothership/callbacks.rb:74:in `with_filters'
cf-5.4.1/lib/manifests/plugin.rb:105:in `push_with_manifest'
cf-5.4.1/lib/manifests/plugin.rb:90:in `block in wrap_push'
cf-5.4.1/lib/cf/spacing.rb:40:in `block in spaced'
cf-5.4.1/lib/cf/spacing.rb:38:in `each'
cf-5.4.1/lib/cf/spacing.rb:38:in `spaced'
cf-5.4.1/lib/manifests/plugin.rb:89:in `wrap_push'
cf-5.4.1/lib/manifests/plugin.rb:25:in `block in <class:ManifestsPlugin>'
mothership-0.5.1/lib/mothership/command.rb:82:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:82:in `block (2 levels) in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in `execute'
cf-5.4.1/lib/cf/cli.rb:195:in `block (2 levels) in execute'
cf-5.4.1/lib/cf/cli.rb:206:in `save_token_if_it_changes'
cf-5.4.1/lib/cf/cli.rb:194:in `block in execute'
cf-5.4.1/lib/cf/cli.rb:123:in `wrap_errors'
cf-5.4.1/lib/cf/cli.rb:190:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-5.4.1/bin/cf:18:in `<top (required)>'
/home/guidodavide/.rbenv/versions/1.9.3-p448/bin/cf:23:in `load'
/home/guidodavide/.rbenv/versions/1.9.3-p448/bin/cf:23:in `<main>'


I think the manifest file should be ok. But I'm not complete sure...
Probably my DNS configuration is not correct or is not correct domain configuration in deployment file. It's my first time using a DNS server.

I set up a VM with only DNS server running, its ip is 10.1.0.3. All VMs running in my OpenStack have /etc/resolv.conf with 10.1.0.3 and 8.8.8.8 nameservers.
All machine can reach internet and ping 10.1.0.3 (DNS server), host server too.
Now, I don't know if my problem is DNS related.

From deployment file you can see cloudfoundry router is on 10.1.0.20 machine.

This is my DNS configuration:
/etc/bind/named.conf.local
# Our forward zone
zone "my.cloud" {
type master;
file "/etc/bind/zones/db.my.cloud";
};

zone "0.1.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.10";
};

/etc/bind/zones/db.my.cloud Here I set a wildcard for *.cf.my.cloud , pointing to router VM right?
;
; BIND data file for local loopback interface
;
$TTL 604800
@        IN         SOA            tiny-dns.my.cloud. webuser.my.cloud. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
my.cloud.            IN          NS           tiny-dns.my.cloud.
my.cloud.            IN          A             10.1.0.3
;@                       IN          A             127.0.0.1
;@                       IN          AAAA        ::1
tiny-dns                  IN          A            10.1.0.3
gateway                IN          A            10.1.0.1
cf                  IN          A            10.1.0.20
*.cf.my.cloud.          IN              A       10.1.0.20
www                     IN         CNAME      my.cloud.

/etc/bind/named.conf.options
options {
        directory "/var/cache/bind";

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.
        allow-recursion { any; };
        allow-query { any; };
        forwarders {
         8.8.8.8;
        };

        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};


Now
if I nslookup, dig, host http://ccng.cf.my.cloud from VMs and host machine
I always obtain 10.1.0.20 ip (router VM) -> correct right?

BUT if I ping http://ccng.cf.my.cloud I get a "unknown host" !!!

BUT cf target http://ccng.cf.my.cloud answers me with OK and I can login!

BUT if I "nmap -p 80 http://ccng.cf.my.cloud" I get a "PORT   STATE SERVICE 80/tcp open  http"

Where's the problem?
Any help is really really appreciated...I think I'm really close to get a working CF on my OpenStack :D

Guido Davide Dall'Olio

unread,
Nov 5, 2013, 10:20:20 AM11/5/13
to bosh-...@cloudfoundry.org
OK, probably I'm missing this

directory_server_protocol: http

Under DEA. Let me just re-deploy.

Guido Davide Dall'Olio

unread,
Nov 5, 2013, 11:13:29 AM11/5/13
to bosh-...@cloudfoundry.org
It was that flag.

CF works!!!!!

DNS is correct!

YEAH

Jamie van Dyke

unread,
Nov 5, 2013, 11:14:33 AM11/5/13
to Guido Davide Dall'Olio, bosh-...@cloudfoundry.org
Congratulations! :)
To unsubscribe from this group and stop receiving emails from it, send an email to bosh-users+...@cloudfoundry.org.

Wayne E. Seguin

unread,
Nov 6, 2013, 12:26:01 AM11/6/13
to bosh-...@cloudfoundry.org, Guido Davide Dall'Olio
Achievement Unlocked!
Reply all
Reply to author
Forward
0 new messages