Unable to connect to vagrant container from a remote machine

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

Unable to connect to vagrant container from a remote machine

praveenhello124
Hi all,

I have created a container in Vagrant which I have to connect from a remote computer. But when I ping to  IP of container from remote computer, i am getting Request timedout error.

$ping 192.168.66.90

Request timeout for icmp_seq 0

Request timeout for icmp_seq 1

Request timeout for icmp_seq 2

Request timeout for icmp_seq 3

Request timeout for icmp_seq 4


Kindly help in resolving this issue

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/6dab389c-925d-4acd-ae9f-9ec9d8752cfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect to vagrant container from a remote machine

Antony Stone
On Thursday 22 June 2017 at 01:59:40, [hidden email] wrote:

> Hi all,
>
> I have created a container in Vagrant which I have to connect from a remote
> computer.

Please define "remote":

What's the IP address of the machine you are trying to ping from?

We can see from the information below that you're trying to ping the address
192.168.66.90.

If that is not in the same network segment as the machine you're pinging from,
please show us the routing table for *both* machines, so we can see whether
the requests are likely to reach the target, and whether the replies are
likely to return.

Also, what happens if you start from the Vagrant machine and try to ping the
"remote computer"?  Does that show anything different?

> But when I ping to  IP of container from remote computer, i am
> getting *Request timedout error.*
>
> *$ping 192.168.66.90*
>
> Request timeout for icmp_seq 0
>
> Request timeout for icmp_seq 1
>
> Request timeout for icmp_seq 2
>
> Request timeout for icmp_seq 3
>
> Request timeout for icmp_seq 4

Regards,


Antony.

--
"If I've told you once, I've told you a million times - stop exaggerating!"

                                                   Please reply to the list;
                                                         please *don't* CC me.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect to vagrant container from a remote machine

praveenhello124
Hi Antony Stone,


Thanks for the reply. Please find my answers below:

1) The remote computer I meant t say is a different computer other than the one which is having the vagrant container.
2) I made typo in earlier post, the IP address is 192.168.65.90   (not 192.168.66.90)
3)  IP of machine from which I am pinging: 172.25.44.127
     IP of Vagrant container that I am trying to ping from other machine: 192.168.65.90
4) Routing table of machine from which I am pinging:

[root@blade7 ycsb-0.5.0]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.25.44.1     0.0.0.0         UG    100    0        0 eno1
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.25.44.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0d1
192.168.2.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0
192.168.65.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0


Routing table of the vagrant container that I am trying to ping from other machine:

[root@m1 vagrant]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3
9.0.1.0         44.128.0.2      255.255.255.0   UG    0      0        0 vtep1024
9.0.2.0         44.128.0.3      255.255.255.0   UG    0      0        0 vtep1024
10.0.2.0        0.0.0.0         255.255.255.0   U     100    0        0 enp0s3
44.128.0.0      0.0.0.0         255.255.240.0   U     0      0        0 vtep1024
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.65.0    0.0.0.0         255.255.255.0   U     100    0        0 enp0s8

5) I am able to ping to 172.25.44.127 (remote machine) from Vagrant container . 


Kindly help in being able to ping to  the vagrant container from remote machine 



On Wednesday, June 21, 2017 at 5:07:39 PM UTC-7, Antony Stone wrote:
On Thursday 22 June 2017 at 01:59:40, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="AkSFddgBAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">praveen...@... wrote:

> Hi all,
>
> I have created a container in Vagrant which I have to connect from a remote
> computer.

Please define "remote":

What's the IP address of the machine you are trying to ping from?

We can see from the information below that you're trying to ping the address
192.168.66.90.

If that is not in the same network segment as the machine you're pinging from,
please show us the routing table for *both* machines, so we can see whether
the requests are likely to reach the target, and whether the replies are
likely to return.

Also, what happens if you start from the Vagrant machine and try to ping the
"remote computer"?  Does that show anything different?

> But when I ping to  IP of container from remote computer, i am
> getting *Request timedout error.*
>
> *$ping 192.168.66.90*
>
> Request timeout for icmp_seq 0
>
> Request timeout for icmp_seq 1
>
> Request timeout for icmp_seq 2
>
> Request timeout for icmp_seq 3
>
> Request timeout for icmp_seq 4

Regards,


Antony.

--
"If I've told you once, I've told you a million times - stop exaggerating!"

                                                   Please reply to the list;
                                                         please *don't* CC me.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/7e5d7735-f002-4a08-8f37-7c335ba3f671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to connect to vagrant container from a remote machine

Alvaro Miranda Aguilera
Hello.

from this:

Kindly help in being able to ping to  the vagrant container from remote machine 

By default containers in docker have a private IP that exists only between the VM (in this case) and the docker container.

The docker way to expose services is exposing ports, either on a random one or on a custom one.

If you want to assign routable IP to the docker network, is duable but fair advanced, I would suggest do it first without Vagrant to learn the process and then see if the same setup can be easily implemented by Vagrant.

Alvaro

On Thu, Jun 22, 2017 at 2:39 AM, <[hidden email]> wrote:
Hi Antony Stone,


Thanks for the reply. Please find my answers below:

1) The remote computer I meant t say is a different computer other than the one which is having the vagrant container.
2) I made typo in earlier post, the IP address is 192.168.65.90   (not 192.168.66.90)
3)  IP of machine from which I am pinging: 172.25.44.127
     IP of Vagrant container that I am trying to ping from other machine: 192.168.65.90
4) Routing table of machine from which I am pinging:

[root@blade7 ycsb-0.5.0]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.25.44.1     0.0.0.0         UG    100    0        0 eno1
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.25.44.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0d1
192.168.2.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0
192.168.65.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0


Routing table of the vagrant container that I am trying to ping from other machine:

[root@m1 vagrant]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3
9.0.1.0         44.128.0.2      255.255.255.0   UG    0      0        0 vtep1024
9.0.2.0         44.128.0.3      255.255.255.0   UG    0      0        0 vtep1024
10.0.2.0        0.0.0.0         255.255.255.0   U     100    0        0 enp0s3
44.128.0.0      0.0.0.0         255.255.240.0   U     0      0        0 vtep1024
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.65.0    0.0.0.0         255.255.255.0   U     100    0        0 enp0s8

5) I am able to ping to 172.25.44.127 (remote machine) from Vagrant container . 


Kindly help in being able to ping to  the vagrant container from remote machine 



On Wednesday, June 21, 2017 at 5:07:39 PM UTC-7, Antony Stone wrote:
On Thursday 22 June 2017 at 01:59:40, [hidden email] wrote:

> Hi all,
>
> I have created a container in Vagrant which I have to connect from a remote
> computer.

Please define "remote":

What's the IP address of the machine you are trying to ping from?

We can see from the information below that you're trying to ping the address
192.168.66.90.

If that is not in the same network segment as the machine you're pinging from,
please show us the routing table for *both* machines, so we can see whether
the requests are likely to reach the target, and whether the replies are
likely to return.

Also, what happens if you start from the Vagrant machine and try to ping the
"remote computer"?  Does that show anything different?

> But when I ping to  IP of container from remote computer, i am
> getting *Request timedout error.*
>
> *$ping 192.168.66.90*
>
> Request timeout for icmp_seq 0
>
> Request timeout for icmp_seq 1
>
> Request timeout for icmp_seq 2
>
> Request timeout for icmp_seq 3
>
> Request timeout for icmp_seq 4

Regards,


Antony.

--
"If I've told you once, I've told you a million times - stop exaggerating!"

                                                   Please reply to the list;
                                                         please *don't* CC me.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/7e5d7735-f002-4a08-8f37-7c335ba3f671%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezqQLnu4SKxi2FJLdyG0p6aaqwMtWGjzAxJ-efzCC3NCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.