docs
docs copied to clipboard
Missing UNIX domain socket path
Testing sock connection
Command: php artisan horizon:status
and then getting this error
Missing UNIX domain socket path.
at vendor/predis/predis/src/Connection/StreamConnection.php:193
189▕ */
190▕ protected function unixStreamInitializer(ParametersInterface $parameters)
191▕ {
192▕ if (!isset($parameters->path)) {
➜ 193▕ throw new \InvalidArgumentException('Missing UNIX domain socket path.');
194▕ }
195▕
196▕ $flags = STREAM_CLIENT_CONNECT;
197▕
+28 vendor frames
29 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Here's my settings:
REDIS_SCHEME=unix
REDIS_HOST=/var/run/redis/redis.sock
REDIS_PASSWORD=null
REDIS_PORT=null
Are you using predis or phpredis?
if you are using phpredis:
- REDIS_HOST = path to socket
- REDIS_PORT = null
if you are using predis:
- REDIS_SCHEME = unix
- REDIS_PATH = path to socket
Maybe this could be mentioned in the "Generic installation guide" ...
This occurred to me when doing php artisan migrate --force
, and when correcting the setting(s) as suggested above, another exception is thrown because stuff already exists :wink:
I bumped into the exact same problem. Please update the installation guide.
Another issue I've encountered after resolving the one in the OP was a permission denied error on the Redis socket. The problem was that the user running the php artisan migrate --force
command did not have rwx access to /run/redis/redis.sock
.
- I'm using a dedicated pixelfed user, I set the pixelfed directory owner to the pixelfed user, so this is the user running php artisan migrate --force`.
- As per the guide on Configuring Redis socket, the permissions for the redis socket are set to 770 by the daemon, which means the redis user and redis group have rwx access to the socket.
- I had to add the pixelfed user to the redis group in order for
php artisan migrate --force
to run without errors.usermod -aG redis pixelfed
Not entirely a big deal, but it would have been courteous if this was mentioned in the guide for using a dedicated pixelfed user.