7

I have a Python process on a single box which creates a flock of mini servers, small Python processes which provide some specialized computation. Each of those creates and listens on a Unix domain socket using multiprocessing.connection.Listener ("file_path"), each with a different path, of course.

Is it possible to access a socket on a remote machine, with something like a path of unix://remote/file_path, or file://remote/file_path?

Using port numbers is not practical, since the set of mini servers is dynamic.

3
  • 2
    No, it's not possible to access Unix domain sockets remotely. Commented Nov 24, 2016 at 1:13
  • @Barmar I disagree. You can pass the data from the socket to the network with socat, but for that you need socat on the target system. Commented Dec 21, 2020 at 17:43
  • @12431234123412341234123 You can access practically anything if you can run a program on the remote system. I interpreted the question as being about accessing the socket directly, not through a proxy application. Commented Dec 21, 2020 at 17:46

1 Answer 1

11

Unix domain sockets are meant for inter-process communication within the same host machine. Data sent through these sockets are handled entirely inside the kernel. For communication between processes in different machines, you should use network sockets.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.