winnfsd / vagrant-winnfsd

Manage and adds support for NFS for Vagrant on Windows.
Other
567 stars 62 forks source link

winnfsd.exe exits immediately #68

Closed bdw429s closed 7 years ago

bdw429s commented 9 years ago

I'm trying to bring up a Vagrant box with more than one NFS share.

config.vm.synced_folder "../www", "/var/wwwDefault/", type: "nfs"
config.vm.synced_folder "../storage", "/opt/storage", type: "nfs"

Winnfsd.exe starts and then immediately exits. When I turn on logging, a DOS window pops up for a second and then disappears. Naturally, since the service isn't running, the VM hangs for a very long time trying to mount (5 to 10 minutes before timing out). This is what the DOS window looks like right before it closes:

image

Some other issues had comments suggesting that the order that the mapped folders were declared in my VagrantFile would affect the behavior. I tried reversing the order of the two mapped drives and while it appears the first one worked, the second mount output this error:

mount.nfs: access denied by server while mounting 192.168.60.1:/C/Users/Brad.development/Documents/GitHub/vagrant-centos-lucee/www

If I only use one mapped folder, it works great so I know there are no firewalls issues in the way. What is the trick to get more than one NFS mapping work? Why does the winnfsd service exist immediately in some cases? Why do I get a permission denied error in other cases?

Windows 7 host Vagrant 1.7.2 VirtualBox 4.3.30 vagrant-winnfsd 1.1.0 CentOS guest

shodanto commented 9 years ago

Try to run vagrant with admin rights. Open the console you run it in with admin permissions.

bdw429s commented 9 years ago

@shodanto Thanks for the reply. I usually always run Cygwin as administrator, but I'll double check. Note, winnfsd works fine for a single mapping, so it would appear that it's not a permissions issue since I would expect it to never work if that were the case.

bdw429s commented 9 years ago

@shodanto I just tested and confirmed that running my console as administrator has no effect. As before, the winnfsd.exe process starts, then immediately exists without any visible messages which causes the vagrant up to hang for 5 to 10 minutes while trying to mount to the NFS shares before erroring.

ckovey commented 9 years ago

I've run into a similar issue when trying to add winnfs to the Vagrant file of https://github.com/roots/trellis

Windows 8.1, Vagrant 1.7.4, VMware Workstation 11.1.2 (which requires administrator to launch a vagrant), Ubuntu 14 guest

jaroslavl1 commented 8 years ago

Its not related to the number of mounts, its somehow related to the directory you're trying to mount. It seems to be a bug in winnfsd.exe.

I had a case when something like: config.vm.synced_folder "../www", "/var/wwwDefault/", type: "nfs"

worked, but when I created new empty directory www2 and it didn't work anymore: config.vm.synced_folder "../www2", "/var/wwwDefault2/", type: "nfs" I tried putting 1 file in there, it didn't help. Checked access rights, everything ok.

what helped was strangely computer reboot. But then I tried mounting another new directory and nothing helped anymore. It fails even to mount a single directory. Same error like in the 1st post.

altmind commented 8 years ago

@jaroslavl1 i think there is problem that winnfsd can export only 1 mountpoint. and you already have 1 defined(wwwDefault). Its just a guess based on personal experience.

thomshouse commented 8 years ago

I'm seeing this issue as well. Here's what I've tried, and what works:

:x: Re-ordering the mount points, shortest to longest :x: Destroying and rebuilding the vm :x: Running cygwin as administrator :+1: Only mounting one NFS share

I haven't tried rebooting the host and seeing if I can connect with multiple shares; if I have success, I will report back on that.

Host: Windows 7 Vagrant: 1.8.1 VirtualBox: 4.3.12 Vagrant-winnfsd: 1.1.0

worthwhileindustries commented 8 years ago

@thomshouse did you make sure there aren't any nfs mounts that are hanging around? and did you try restarting the winnfsd.exe process? I usually do this every time i restart the vm. Also, if you have several versions of the plugin, I make sure there aren't any older versions of the winnfsd.exe in the plugin directory.

HollyIT commented 8 years ago

The problem is definitely in winnfsd.exe. I just tried mounting without even using vagrant (from a *nix box I got). One export is fine. Mounting a second export throws this:

WinNFSd.exe!CFileTree::findNodeFromRootWithPath(char * path) Line 100 C++ WinNFSd.exe!CMountProg::ProcedureMNT() Line 160 C++ WinNFSd.exe!CMountProg::Process(IInputStream * pInStream, IOutputStream * pOutStream, ProcessParam * pParam) Line 134 C++ WinNFSd.exe!CRPCServer::Process(int nType, IInputStream * pInStream, IOutputStream * pOutStream, char * pRemoteAddr) Line 152 C++ WinNFSd.exe!CRPCServer::SocketReceived(CSocket * pSocket) Line 88 C++ WinNFSd.exe!CSocket::Run() Line 128 C++ WinNFSd.exe!ThreadProc(void * lpParameter) Line 11 C++ WinNFSd.exe!thread_start<unsigned int (__stdcall)(void )>(void * const parameter) Line 115 C++

I opened an issue on the winnfsd repository https://github.com/winnfsd/winnfsd/issues/13

marcharding commented 7 years ago

Fixed since 2.3.0.

bdw429s commented 7 years ago

@marcharding Can you clarify what you mean by that comment or provide a relevant link? The latest release of of this plugin still shows as v1.3.0. Are you referring to a winnfsd release?

marcharding commented 7 years ago

@bdw429s yes i meant winnfsd. i just published version 1.3.1 of the plugin which includes the latest binary.