Open chrispsplash opened 1 year ago
Thanks for digging into that further. The daemon is probably seeing ENAMETOOLONG
when it attempts to bind()
and is then just terminating without surfacing that error.
I'm a little surprised the same error isn't showing up in the connect()
operation from the CLI. I'll have to dig into why the timeout is taking priority in the error reporting.
For now (and in general) the only thing I can think of would be to use a shorter path, but the CLI and daemon should do a better job of surfacing those errors.
Do you know the length threshold at which the name ticks over into being too long for a Unix Domain Socket?
It looks like the exact length limitations were determined here.
One workaround I could imagine is what's done with the Windows Named Pipe transport. In that case, we just use the .sock
file within the daemon directory to record the name of the allocated named pipe. We could do something similar here, i.e. allocating a random socket in (e.g.) /tmp
that won't exceed the length limit and then just storing its path in the daemon directory.
I see two issues (one for garden-cli and one for rancher-desktop) which put the max length for unix domain socket name at 104 (for MacOS)
confirmed! moving the project, thus the mutagen data dir, to a shorter path does work. 👌
Basically, if MUTAGEN_DATA_DIRECTORY is very long then the mutagen daemon won't start. This is a problem for some tools (like garden.io) which create data dirs for each project being synched.
Error example
The version of Mutagen that you're using
The platform(s) that you're using
Reproduction steps
Example script