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

Missing UNIX domain socket path #121

Open
okpierre opened this issue Feb 20, 2021 · 4 comments
Open

Missing UNIX domain socket path #121

okpierre opened this issue Feb 20, 2021 · 4 comments

Comments

@okpierre
Copy link

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
@trwnh
Copy link
Member

trwnh commented Feb 21, 2021

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

@trwnh trwnh transferred this issue from pixelfed/pixelfed Feb 21, 2021
@joho1968
Copy link

joho1968 commented Dec 28, 2022

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 😉

@mijutu
Copy link

mijutu commented Oct 7, 2023

I bumped into the exact same problem. Please update the installation guide.

@hyperreal64
Copy link

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.

@trwnh trwnh transferred this issue from pixelfed/support Oct 27, 2023
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

5 participants