NFS problem on macOS Sonoma

Hi there,

I’m bumping into this issue with a fresh Trellis clone on a M1/2/3 MacBook running macOS Sonoma 14.4* when running trellis up:

==> default: Installing NFS client...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Could not kickstart service "com.apple.nfsd": 1: Operation not permitted
/bin/launchctl exited with status 1
==> 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 vers=3 10.211.55.2:/Users/user/Work/test.com/site /vagrant-nfs-test.com

Stdout from the command:

Stderr from the command:

mount.nfs: an incorrect mount option was specified

By the looks of things, I’m not alone:

Is there nothing we can do then wait for a fix? I don’t quit understand where/when to run this command: sudo nfsd update like suggested here and how that’s is suppose to fix it, when the playbook stops running?

Any suggestions are welcome!
Thanks

I was also having the same issue. I actually just managed to solve it by running the sudo nfsd update command in the same directory where I had run the vagrant up / trellis up command, directly after the command exited with the error. Not sure what the command really does TBH and whether it’s the definitive solution to this issue though.

2 Likes

Ah check, just tried that. I presume you have to run trellis up again after that?

Because the initial provisioning of my vagrant box exits with an error and therefore the nfsd mounts are not recognized and the second time provisioning it fails at the composer task:

TASK [wordpress-install : Install Dependencies with Composer] ******************
failed: [default] (item=example.com) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "example.com", "value": {"admin_email": "user@example.com", "admin_user": "example", "cache": {"enabled": false}, "cron_interval": "*/1", "env": {"db_name": "example_development", "db_prefix": "wp_", "db_user": "example", "log_channel": "stack"}, "local_path": "../site", "multisite": {"enabled": false}, "site_hosts": [{"canonical": "example.test", "redirects": ["www.example.test"]}], "ssl": {"enabled": true, "provider": "self-signed"}, "xmlrpc": {"enabled": false}}}, "msg": "Composer could not find a composer.json file in /srv/www/example.com/current To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage", "stdout": "Composer could not find a composer.json file in /srv/www/example.com/current\nTo initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage\n", "stdout_lines": ["Composer could not find a composer.json file in /srv/www/example.com/current", "To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage"]}

When I ssh into the box, the srv/www/example.com/current folder doesn’t have any composer files, only the web folder?

Thanks – this fixed it for me as well.

1 Like

Nevermind… 20mins later when reprovisioning its not working (even after subsequently running it) Hmm… it’s odd. I had no issues initially with my first environment. It’s only since creating a second Vagrant box now and deploying another environment.

I’ve got the feeling it only happens with new projects that are not added yet in the /etc/exports file.
Then the first time running trellis up will fail while mounting the nfs volumes.
When I run sudo nfsd update, shutdown the box and run trellis up again, that error seems to be gone.
After that, you need to finish provisioning the box with trellis provision development.
It shouldn’t affect deploying remote servers though I think?

2 Likes

I believe you’re correct about the remote deployments. I wasn’t seeing any issues yet. I’m going to try this order of operations to get my new environment going.

Confirmed – working now after this sequence.

1 Like