Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running init_project.sh fails to sync vagrant folders #188

Open
localhosted opened this issue May 31, 2018 · 12 comments
Open

Running init_project.sh fails to sync vagrant folders #188

localhosted opened this issue May 31, 2018 · 12 comments

Comments

@localhosted
Copy link

I'm using virtualbox 5.2.2 and vagrant 2.0.1and the setup fails with:


$ bash init_project.sh
[2018-05-30 23:13:52] Checking requirements [/f/E/Projects/magento2/vagrant-magento/scripts/host/check_requirements.sh]
[2018-05-30 23:13:57] Installing missing vagrant plugins [init_project.sh]
[2018-05-30 23:14:01] Generating random IP address, and host name to prevent collisions (if no custom values specified) [init_project.sh]
[2018-05-30 23:14:04] Installing Magento dependencies via Composer [init_project.sh]
[2018-05-30 23:14:08] Executing composer command [/f/E/Projects/magento2/vagrant-magento/scripts/host/composer.sh]
[2018-05-30 23:14:11] >  Checking requirements [/f/E/Projects/magento2/vagrant-magento/scripts/host/check_requirements.sh]
[2018-05-30 23:14:18] >  Installing composer [/f/E/Projects/magento2/vagrant-magento/scripts/host/composer.sh]
[2018-05-30 23:14:28] >  composer --ignore-platform-reqs --no-interaction install [/f/E/Projects/magento2/vagrant-magento/scripts/host/composer.sh]
[2018-05-30 23:14:32] Initializing vagrant box [init_project.sh]
[2018-05-30 23:15:35] Directory '/f/E/Projects/magento2/vagrant-magento/etc' was not mounted as expected by Vagrant.
        Please make sure that 'paliarush/magento2.ubuntu' Vagrant box was downloaded successfully (if not, this may help http://stackoverflow.com/questions/35519389/vagrant-cannot-find-box)
        And that Vagrant is able to mount VirtualBox shared folders on your environment (see https://www.vagrantup.com/docs/synced-folders/basic_usage.html ).
        Also remove any stale declarations from /etc/exports on the host. [/f/E/Projects/magento2/vagrant-magento/scripts/host/check_mounted_directories.sh]

@mrtuvn
Copy link

mrtuvn commented May 31, 2018

run bash with admin permission if you using window. Linux make sure you have mount folder contain script have full permissions

@localhosted
Copy link
Author

Had to add this line to get_host_os.sh:

elif [[ "$(expr substr "${os_name}" 1 6)" == "MSYS_N" ]]; then
    echo "Windows"

@kevmul
Copy link

kevmul commented Jun 7, 2018

I tried both these approaches, unfortunately I was unsuccessful.
I have Windows 10 x64
Vagrant 2.1.1
VirtualBox 5.2.12
When I access the site in the browser I get an apache folder browser thinger. Says "Index Of".

@franckgarnier21
Copy link

franckgarnier21 commented Jun 8, 2018

Do not put the host sync folder in an encrypted home folder.

@TomashKhamlai
Copy link

Try to disable firewall ;-)
on Ubuntu:

sudo systemctl disable ufw && sudo systemctl stop ufw

I had this:

==> magento2.vg: Mounting NFS shared folders...
[2018-08-15 16:49:50] 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.10.1:/home/tkhamlai/vagrant-magento/magento2ce /home/tkhamlai/vagrant-magento/magento2ce

Stdout from the command:



Stderr from the command:

mount.nfs: Connection timed out

Disabling the firewall solved the problem.

@Morgy93
Copy link

Morgy93 commented Sep 27, 2018

Same error here on three very different windows machines.

It seems to be some issue with virtualbox itself, since the shared folders are simply not available on the guest machine.

edit

Well, the etc folder is present, but empty:
image

@Morgy93
Copy link

Morgy93 commented Sep 27, 2018

Actually I just saw that this has already been mentioned here: #173
Gonna try those exact versions now and see..

@Morgy93
Copy link

Morgy93 commented Sep 27, 2018

Well, I used vb.gui=true and files are present now: image

But the same error persists. 🤔

@Morgy93
Copy link

Morgy93 commented Sep 27, 2018

Wait, this is totally plausible to me, since it checks for ${vagrant_dir}/etc/guest/mysql/my.cnf which is in fact missing for me here. Just need to find out why now..

@Morgy93
Copy link

Morgy93 commented Sep 27, 2018

Please kill me .. I figured it all out: Wrong git config
I had CRLF which of course doesn't work on Linux.

From requirements:

git config --global core.autocrlf false
git config --global core.eol LF
git config --global diff.renamelimit 5000

@ilgala
Copy link

ilgala commented Oct 1, 2018

In ubuntu 16.04 I've resolved this issue by restoring file permissions of the etc folder and by installing these nfs-common and nfs-kernel-server:

sudo apt-get install nfs-common nfs-kernel-server

@refaelgold
Copy link

refaelgold commented Feb 5, 2019

2019-02-05_10-01-13

-Mac OS Solution -
1.Open mac os settings on privacy
2.Open up the permission(Locker icon)
3.go to "Full Disk Acssess"
4.Add the command line program.(Iterms phpstorm CLI in my case).
5.press "OK" :)

@paliarush i really think its need to be at FAQ. Its takes me a lot of time to find the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants