Can't connect to the server, what am I doing wrong?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't connect to the server, what am I doing wrong?

Peter Piekarczyk
Hey everyone, 

I have recently tried using Vagrant and after numerous hours of messing around, I can't seem to get it working. Someone has told me about puppet-sandbox and it installed fairly easily besides the hiera.yaml file but I'm sure the default used is fine. 

The vagrantfile sets up a domain @ 'example.com' and 3 servers. 

puppet, client1, client2 with the IP's of 172.16.32.10, 172.16.32.11, 172.16.32.12

Whenever I tried to visit those IP's in my browser, nothing loads. I have placed those IP addresses in my hosts file with each of the correct domains and they show up in my netstat too when I try running it, but nothing shows up when typing the IP in safari. 

I have also ssh'd into client1 for example and ran an ifconfig with the same address. No luck.

Does anyone have any other suggestions? What am I doing wrong? I think I've google'd every article on the internet!

Thanks,
Peter

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to the server, what am I doing wrong?

Lars Tobias Skjong-Børsting
Hi,

On 2/21/13 7:42 PM, Peter Piekarczyk wrote:

> puppet, client1, client2 with the IP's of 172.16.32.10, 172.16.32.11,
> 172.16.32.12
>
> Whenever I tried to visit those IP's in my browser, nothing loads.

Did you forward port 80 or 443? The default Vagrantfile from
puppet-sandbox only forwards port 8140 (puppet).

--
Best regards, Lars Tobias

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to the server, what am I doing wrong?

Peter Piekarczyk
No, I figured that puppet-sandbox would forward the ports for me. My current vagrant file has this:

puppet_nodes = [
  {:hostname => 'puppet',  :ip => '172.16.32.10', :box => 'precise64', :fwdhost => 8140, :fwdguest => 8140, :ram => 512},
  {:hostname => 'client1', :ip => '172.16.32.11', :box => 'precise64'},
  {:hostname => 'client2', :ip => '172.16.32.12', :box => 'precise64'},
]

I don't know how to port forward more ports besides that. I have tried adding:

      config.vm.forward_port 80, 8140
      config.vm.forward_port 80, 443

But I can't add these because an error pops up that says its already being forwarded.  

Where and how would I forward 80 and 443?

Thanks again for your help
Peter

On Thursday, February 21, 2013 12:57:02 PM UTC-6, Lars Tobias Skjong-Børsting wrote:
Hi,

On 2/21/13 7:42 PM, Peter Piekarczyk wrote:

> puppet, client1, client2 with the IP's of 172.16.32.10, 172.16.32.11,
> 172.16.32.12
>
> Whenever I tried to visit those IP's in my browser, nothing loads.

Did you forward port 80 or 443? The default Vagrantfile from
puppet-sandbox only forwards port 8140 (puppet).

--
Best regards, Lars Tobias

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to the server, what am I doing wrong?

Lars Tobias Skjong-Børsting
On 2/21/13 8:07 PM, Peter Piekarczyk wrote:

> No, I figured that puppet-sandbox would forward the ports for me.

It doesn't forward the web ports unless you configure it yourself.

> I don't know how to port forward more ports besides that. I have tried
> adding:
>
>       config.vm.forward_port 80, 8140
>       config.vm.forward_port 80, 443
>
> But I can't add these because an error pops up that says its already
> being forwarded.

Yes, because after it has forwarded the ports on "puppet", it will try
to forward the same ports for "client1", and on the host, that port is
already spoken for. Same with "client2". What you need to do is forward
a different ":fwdhost" for each node.

> Where and how would I forward 80 and 443?

If you don't care about the web port on "puppet", you can go ahead and
reuse the port forwarding setup for "puppet":

puppet_nodes = [
  {:hostname => 'puppet',  :ip => '172.16.32.10', :box => 'precise64',
:fwdhost => 8140, :fwdguest => 8140, :ram => 512},
  {:hostname => 'client1', :ip => '172.16.32.11', :box => 'precise64',
:fwdhost => 1080, :fwdguest => 80},
  {:hostname => 'client2', :ip => '172.16.32.12', :box => 'precise64',
:fwdhost => 2080, :fwdguest => 80}
]

--
Best regards, Lars Tobias

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to the server, what am I doing wrong?

Peter Piekarczyk
Ah okay cool thanks!

So is there a difference between the top node that has the RAM parameter vs the two bottom ones? Is this something I will have to start getting used to? 

Having two clients means that I have two different web servers running as well? 

On Thursday, February 21, 2013 3:14:00 PM UTC-6, Lars Tobias Skjong-Børsting wrote:
On 2/21/13 8:07 PM, Peter Piekarczyk wrote:

> No, I figured that puppet-sandbox would forward the ports for me.

It doesn't forward the web ports unless you configure it yourself.

> I don't know how to port forward more ports besides that. I have tried
> adding:
>
>       config.vm.forward_port 80, 8140
>       config.vm.forward_port 80, 443
>
> But I can't add these because an error pops up that says its already
> being forwarded.

Yes, because after it has forwarded the ports on "puppet", it will try
to forward the same ports for "client1", and on the host, that port is
already spoken for. Same with "client2". What you need to do is forward
a different ":fwdhost" for each node.

> Where and how would I forward 80 and 443?

If you don't care about the web port on "puppet", you can go ahead and
reuse the port forwarding setup for "puppet":

puppet_nodes = [
  {:hostname => 'puppet',  :ip => '172.16.32.10', :box => 'precise64',
:fwdhost => 8140, :fwdguest => 8140, :ram => 512},
  {:hostname => 'client1', :ip => '172.16.32.11', :box => 'precise64',
:fwdhost => 1080, :fwdguest => 80},
  {:hostname => 'client2', :ip => '172.16.32.12', :box => 'precise64',
:fwdhost => 2080, :fwdguest => 80}
]

--
Best regards, Lars Tobias

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to the server, what am I doing wrong?

Peter Piekarczyk
I still get "page cannot be found" when typing in any of those websites. Neither the IP's work nor the client1.example.com, etc. 


In Network Utility, I SEE puppet.example.com / client1.example.com / client2.example.com but I cannot get a webpage out of them! I have removed the IPs and names out of the hosts file and still no luck! 

I see the IP's now 172.16.32.10/11/12 but when I type them into safari, nothing works!

I can ssh into any of the clients or puppet, run an ifconfig and see the IP address and everything else, but I literally cannot connect to the server via safari.

What am I doing wrong!?

Thanks again for the help!

On Thursday, February 21, 2013 4:33:49 PM UTC-6, Peter Piekarczyk wrote:
Ah okay cool thanks!

So is there a difference between the top node that has the RAM parameter vs the two bottom ones? Is this something I will have to start getting used to? 

Having two clients means that I have two different web servers running as well? 

On Thursday, February 21, 2013 3:14:00 PM UTC-6, Lars Tobias Skjong-Børsting wrote:
On 2/21/13 8:07 PM, Peter Piekarczyk wrote:

> No, I figured that puppet-sandbox would forward the ports for me.

It doesn't forward the web ports unless you configure it yourself.

> I don't know how to port forward more ports besides that. I have tried
> adding:
>
>       config.vm.forward_port 80, 8140
>       config.vm.forward_port 80, 443
>
> But I can't add these because an error pops up that says its already
> being forwarded.

Yes, because after it has forwarded the ports on "puppet", it will try
to forward the same ports for "client1", and on the host, that port is
already spoken for. Same with "client2". What you need to do is forward
a different ":fwdhost" for each node.

> Where and how would I forward 80 and 443?

If you don't care about the web port on "puppet", you can go ahead and
reuse the port forwarding setup for "puppet":

puppet_nodes = [
  {:hostname => 'puppet',  :ip => '172.16.32.10', :box => 'precise64',
:fwdhost => 8140, :fwdguest => 8140, :ram => 512},
  {:hostname => 'client1', :ip => '172.16.32.11', :box => 'precise64',
:fwdhost => 1080, :fwdguest => 80},
  {:hostname => 'client2', :ip => '172.16.32.12', :box => 'precise64',
:fwdhost => 2080, :fwdguest => 80}
]

--
Best regards, Lars Tobias

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can't connect to the server, what am I doing wrong?

Lars Tobias Skjong-Børsting
On 2/21/13 11:40 PM, Peter Piekarczyk wrote:

> I still get "page cannot be found" when typing in any of those websites.
> Neither the IP's work nor the client1.example.com, etc.
>
>
> In Network Utility, I SEE puppet.example.com / client1.example.com /
> client2.example.com but I cannot get a webpage out of them! I have
> removed the IPs and names out of the hosts file and still no luck!
>
> I see the IP's now 172.16.32.10/11/12 but when I type them into safari,
> nothing works!
>
> I can ssh into any of the clients or puppet, run an ifconfig and see the
> IP address and everything else, but I literally cannot connect to the
> server via safari.
>
> What am I doing wrong!?

I assume you have set up a web server on the clients and that they're
actually listening on the ports.

You can check that something is listening from inside the guest
"client1" using nmap:

client1# nmap -sT 172.16.32.11 -p 80

If it is responding with "open" port, you may run the same command but
with port 1080 from your host machine. If you get anything other than
"open", then your port forwarding isn't right.

host# nmap -sT 172.16.32.11 -p 1080

--
Best regards, Lars Tobias

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.