Unable to join HyperV node to swarm

21 views
Skip to first unread message

DC

unread,
Apr 24, 2020, 9:10:00 AM4/24/20
to Vagrant
I am using the latest vagrant version running on my windows 10 professional x64. I configured my Network device to share the connection with my internal virtual switch (HyperV). Everything seams okay and I can bring up my VM without any issues. I am using the following box (generic/ubuntu1804).

The problem that I have is that once that my host gets the assigned the admin role, after run "docker swarm init", I tried to add the Hypervisor as a Worker node and I seems like is docker can not see it :-/.

These are the steps that I followed:

# Bring up w1 (My vagrantfile will handle the provider,etc) IP = 192.163.135.199
vagrant up w1

# host machine
docker init swarm
To add a worker to this swarm, run the following command:

docker swarm join --token SWMTKN-1-36gi398mfzkq8q9f4qt6u5wll7xv88a4u0osv8rpofmmvknunn-91ogycjru6p29p44f7iam63il 192.163.135.197:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

# Switch to Worker 
$env:DOCKER_HOST="192.163.135.199"

# I verified that docker can see this node

docker info

# docker shows Name: w1 :-)

# Join the current node as worker
docker swarm join --token SWMTKN-1-36gi398mfzkq8q9f4qt6u5wll7xv88a4u0osv8rpofmmvknunn-91ogycjru6p29p44f7iam63il 192.163.135.197:2377
Error response from daemon: Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.

Troubleshooting:

I ping the VM and the host is able to see it, but if  I try to ping the host from the VM, it failed :-/. I am guessing that it has to do with the way that I configured the internal virtual switch :-/. Any recommendation? 


Alvaro Miranda Aguilera

unread,
Apr 27, 2020, 5:00:46 AM4/27/20
to vagra...@googlegroups.com
so, make sure you can ping both IP from both host

on machine1
- ping local
- ping remote

on machine2
- ping local
- ping remote

if one fails, then you should focus on that first.

As you are using hyper-v, I can't help much, but basically you may want to see way to give to the VMs an IP from your network.

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 vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/aa877eb8-2fd8-4e9c-b9ec-f3b586794631%40googlegroups.com.


--
Alvaro

kathir

unread,
Apr 27, 2020, 5:52:34 AM4/27/20
to vagra...@googlegroups.com
Hi

When i tried to use vagrant file provisioning using external shell script, i ended up to look into log file as it says

  Could not find the X.Org or XFree86 Window System, skipping 

Please suggest 
Thanks & Regards,
Kathirvel G


Alvaro Miranda Aguilera

unread,
May 5, 2020, 5:08:02 AM5/5/20
to vagra...@googlegroups.com
You don't seems to have an X running.

This usually happens if you run a graphical application or an application that need graphics

just ssh to the machine, copy and run the script to see if you see the same error.

if you hit the same error, the error is coming from the scripts and the way is being run and not vagrant.

Thanks
Alvaro



--
Alvaro

kathir

unread,
May 5, 2020, 5:29:39 AM5/5/20
to vagra...@googlegroups.com
yes that's correct

I already did that individual commands are running in ssh, but not able run through vagrant external script provisioning

i got the above error, is it related guest addition or what is that X ?

Thanks & Regards,
Kathirvel G

Alvaro Miranda Aguilera

unread,
May 6, 2020, 2:10:10 PM5/6/20
to vagra...@googlegroups.com
if you share the script we can have a look

Xwindows





--
Alvaro

kathir

unread,
May 11, 2020, 12:08:57 PM5/11/20
to vagra...@googlegroups.com
Hi Please find the attached vagrant file & script file for your reference

As i am getting the error
Thanks & Regards,
Kathirvel G

Vagrantfile
vagrant.log
script.sh

Alvaro Miranda Aguilera

unread,
May 12, 2020, 4:57:21 PM5/12/20
to vagra...@googlegroups.com
hello

attached what works

were some error on the script and removed yum upgrade. 
better not do that as may break modules in the kernel.

    default: Installed:

    default:   awscli.noarch 0:1.14.28-5.el7_5.1                                             

    default: 

    default: Dependency Installed:

    default:   PyYAML.x86_64 0:3.10-11.el7                                                   

    default:   jbigkit-libs.x86_64 0:2.0-11.el7                                              

    default:   libjpeg-turbo.x86_64 0:1.2.90-8.el7                                           

    default:   libtiff.x86_64 0:4.0.3-32.el7                                                 

    default:   libwebp.x86_64 0:0.3.0-7.el7                                                  

    default:   libyaml.x86_64 0:0.1.4-11.el7_0                                               

    default:   python-backports.x86_64 0:1.0-8.el7                                           

    default:   python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7                    

    default:   python-cffi.x86_64 0:1.6.0-5.el7                                              

    default:   python-dateutil.noarch 0:1.5-7.el7                                            

    default:   python-docutils.noarch 0:0.11-0.3.20130715svn7687.el7                         

    default:   python-enum34.noarch 0:1.0.4-1.el7                                            

    default:   python-idna.noarch 0:2.4-1.el7                                                

    default:   python-ipaddress.noarch 0:1.0.16-2.el7                                        

    default:   python-pillow.x86_64 0:2.0.0-20.gitd1c6db8.el7_7                              

    default:   python-ply.noarch 0:3.4-11.el7                                                

    default:   python-pycparser.noarch 0:2.14-1.el7                                          

    default:   python-s3transfer.noarch 0:0.1.13-1.el7.0.1                                   

    default:   python-setuptools.noarch 0:0.9.8-7.el7                                        

    default:   python-six.noarch 0:1.9.0-2.el7                                               

    default:   python2-cryptography.x86_64 0:1.7.2-2.el7                                     

    default:   python2-pyasn1.noarch 0:0.1.9-7.el7                                           

    default: 

    default: Complete!

    default: Python 3.6.8

    default: aws-cli/1.14.28 Python/2.7.5 Linux/3.10.0-957.12.2.el7.x86_64 botocore/1.8.35

[kikitux:~/Downloads/x] 




---
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 vagrant-up+...@googlegroups.com.


--
Alvaro

awscli-works.zip
Reply all
Reply to author
Forward
0 new messages