NFS time out (mount) with vagrant & puphet - vagrant

I've some trouble with mounting folder using Vagrant & Puphpet.
This is the error message (with --debug) :
/opt/vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
INFO interface: error: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.56.1:/var/www/vm /mnt/vagrant-vflsf_dz1yb40c5aje
Stdout from the command:
Stderr from the command:
mount.nfs: Connection timed out
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.56.1:/var/www/vm /mnt/vagrant-vflsf_dz1yb40c5aje
Stdout from the command:
Stderr from the command:
mount.nfs: Connection timed out
INFO interface: Machine: error-exit ["Vagrant::Errors::NFSMountFailed", "The following SSH command responded with a non-zero exit status.\nVagrant assumes that this means the command failed!\n\nmount -o vers=3,udp 192.168.56.1:/var/www/vm /mnt/vagrant-vflsf_dz1yb40c5aje\n\nStdout from the command:\n\n\n\nStderr from the command:\n\nmount.nfs: Connection timed out\n"]
This is strange 'cause the IP pf the box is "192.168.56.102", not "192.168.56.1" and why "udp" ?
I've installed this package and plugin :
sudo apt-get install nfs-kernel-server
vagrant plugin install vagrant-bindfs
vagrant plugin repair
I'm on :
Vagrant 1.9.3
VirtualBox 5.0.32_Ubuntu r112930
Linux spectre 4.4.0-66-lowlatency #87-Ubuntu SMP PREEMPT Fri Mar 3 16:43:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
If I add --debug with Vagrant, the system ask me for root password, but, without the parameter, don't ask.
Any idea please ?
Thanks
Fabrice

For me the culprit is Cisco's AnyConnect VPN client.
If you disconnect everything will work fine (No more Mounting NFS shared folders hangs).
Hoping to be useful.

Related

Connecting to docker-engine on remote mac using docker-machine

I have a MacMini that is sitting in the server room which has a docker for mac running on it. I'm able to use docker directly on the machine when I ssh in just fine.
$ docker --version
Docker version 19.03.5, build 633a0ea
But I would like to connect to the mac minis docker engine from my own computer using docker-machine. I have tried the following command to create the docker-machine.
docker-machine create -d generic \
--generic-ip-address 10.0.0.0 \
--generic-ssh-key ~/.ssh/mysshkey \
--generic-ssh-user myusername \
--generic-ssh-port 22 \
macmini
Error Messages:
Running pre-create checks...
Creating machine...
(macmini) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Error creating machine: Error detecting OS: Error getting SSH command: ssh command error:
command : cat /etc/os-release
err : exit status 1
output : cat: /etc/os-release: No such file or directory
Has anyone been able to connect remotely to docker-engine running MacOS Catalina using docker-machine? Any tips or pointers would be appreciated. Thank you!

"mount.nfs: Connection timed out" Error while installing open edX on Ubuntu 18.04

I am trying to install vagrant based devstack of open edX (Ginkgo)on Ubuntu 18.04.
But when I do vagrant up, execution stucks at MOUNT. And getting below error after sometime.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.33.1:/home/sahilpatel/ginkgo/edx-platform
/edx/app/edxapp/edx-platform
Stdout from the command:
Stderr from the command:
mount.nfs: Connection timed out
My system versions are below :
Vagrant 2.2.0
Virtualbox 5.2.22r126460

Iptables v1.6.1 can't initialize iptables table `filter' Ubuntu 18.04 Bash Windows

I'm running Ubuntu 18.04 from Windows Bash:
uname -a
Linux DESKTOP-M87DGAS 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22:57:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
I need to open some port with:
sudo ufw allow 22/tcp
But I get the following error:
ERROR: initcaps
[Errno 2] iptables v1.6.1: can't initialize iptables table `filter': Table
does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
I get the same error by typing:
iptables -L
I've already upgrade my kernel with:
sudo apt-get update
sudo apt-get full-upgrade
I've tried to reboot the system but it didn't work.
How can I initiate the iptable filter?
According to the Microsoft WSL page on github.com, iptables isn't supported.
https://github.com/Microsoft/WSL/issues/767
There is a uservoice page for requesting support at
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/32025199-support-iptables
Windows restrict that command in WSL without authorization from administrator.
You just have to run WSL on CMD/Powershell/Ubuntu.exe as administator, then try this command again:
sudo iptables -L -v
I tested on WSL v1, but it should also work on WSL v2.

Vagrant halt is failing with _syntax error near unexpected token `||'_

Vagrant is not able to halt / reload after the initial vagrant up (ie the one where the vm is provisioned). The initial vagrant up completes correctly, however after that I am not able to do the vagrant halt or reload.
The error message that I am getting is
==> default: Attempting graceful shutdown of VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
shutdown -h now
Stdout from the command:
Stderr from the command:
stdin: is not a tty
bash: line 2: syntax error near unexpected token `||'
bash: line 2: `export SSH_AUTH_SOCK= || ||'
List of vagrant plugin I am using
- vagrant-proxyconf (1.5.2)
- vagrant-share (1.1.5, system)
Vagrant version is 1.8.1
Virtualbox [provider] version 4.3.34r104062
Host OS : Windows 7 Enterprise
I have tried re-installing, all the components, destroying the VMs, deleting the config files [ie ~/.VirtualBox & ~/.vagrant.d]
Please help me in resolving the issue
This is not the fix.
The error went away when I again downloaded the code base from github.

Vaprobash: Create new VM failed

I'm trying to install a new VM with VAPROBASH (https://github.com/fideloper/Vaprobash)
but the installation fails when mounting NFS shared folders
I'm using Mac OsX 10.9.2, Vagrant 1.6.2, VirtualBox 4.2.20
=> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o 'nolock,vers=3,udp,noatime' 192.168.22.1:'/Users/user/Sites/myfolder' /vagrant
Stdout from the command:
Stderr from the command:
stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported
Any help would be appreciated! Thanks! I need to start a project!
I´ve found the solution:
adding the line 127.0.0.1 localhost to the /etc/hosts file worked for me as well
I'm with vagrant 1.6.2 and vbox 4.3.10
https://github.com/mitchellh/vagrant/issues/1941#issuecomment-43098597

Resources