Skip to content

(macOS) path too long for Unix domain socketΒ #15

@OlivierBouchoms

Description

@OlivierBouchoms

Hello,

Thank you for providing this application 😊

I installed the application using pipx, but encountered an error on macOS. This happens after attempting to connect to the database. The SSH socket path is too long. The website shows the following response:

An unexpected error happened while trying to validate the remote SQLite binary '/usr/bin/sqlite3'.

Logs:

level=INFO message="Started server process [10831]"
level=INFO message="Waiting for application startup."
level=INFO time=1757085125.718441 Setting up application location=/Users/viem/.local/pipx/venvs/litexplore/lib/python3.13/site-packages/litexplore/app.py:594
level=INFO message="Application startup complete."
level=INFO message="Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)"
user@ip's password: 
unix_listener: path "/var/folders/06/6n3s5k3j2rd3zvstvhtwg0sr0000gn/T/ltxyd_mmji8tmp-confs/ip.socket.hPkpOdC1nkJQYOQJ" too long for Unix domain socket

I assume this is because by the temp folder name being quite long by itself on macOS, causing it to become too long.

I fixed this temporarily by replacing the following line, causing the application to be able to start:

SSH_SOCKET_DIR = tempfile.TemporaryDirectory(prefix="ltx", suffix="tmp-confs")
SSH_SOCKET_DIR = tempfile.TemporaryDirectory(prefix="l", suffix="t")

However, if a longer username is configured, it might still overflow. I see some possibilities to fix this:

  • on macOS / Linux, use the /tmp directory instead
  • let the user provide a tmp directory through a command line argument

I'd be willing to help implementing a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions