Questions tagged [unix-socket]

UNIX domain sockets are a technology for interprocess communication on a single computer.

UNIX domain sockets are a technology for interprocess communication on a single computer. They allow processes on the same machine to establish bidirectional connections to exchange either continuous byte streams or datagram messages.

The API is in many places the same as the one used for TCP/IP network sockets. A UNIX domain socket listening for connections may be represented as an inode in the file system, depending on the operating system and the parameters used to bind that socket.

Unix Domain Sockets can only communicate within a Linux OS kernel, they can not communicate externally to a kernel.

Details are provided in the unix(7) man page.

699 questions
0
votes
2 answers

Fail to connect a uds client socket

I'm new to unix domain sockets so i tried beej's code for client and server from: http://beej.us/guide/bgipc/html/multi/unixsock.html The server "works" but the client gives me an error when calling "connect" function. I'm getting: "Invalid…
user3206874
  • 795
  • 2
  • 7
  • 15
0
votes
1 answer

Ruby UNIXServer with Node.js client and chunked data

I've this Ruby server that uses a Unix Socket: require 'socket' require 'json' server = UNIXServer.new('/tmp/ciccio.sock') loop do sock = server.accept loop do begin data = sock.recv(1024) break if data.empty? # calculate…
Pioz
  • 6,051
  • 4
  • 48
  • 67
0
votes
0 answers

Cannot connect to .sock file

'Error: connect ENOENT unix:/run/php-fpm/php-fpm.sock\n at Object.exports._errnoException (util.js:860:11)\n at exports._exceptionWithHostPort (util.js:883:20)\n at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)' When I am…
Piesek64
  • 67
  • 1
  • 8
0
votes
1 answer

Ruby UNIXServer with Node.js client

I've this Ruby server that uses a Unix Socket: require 'socket' server = UNIXServer.new('/tmp/ciccio.sock') loop do sock = server.accept loop do begin data = sock.recv(1024) data = "DO SOMETHING -> #{data}" …
Pioz
  • 6,051
  • 4
  • 48
  • 67
0
votes
2 answers

How can we invoke a segmentation fault/core dump for any daemon process without code access?

How can we invoke a segmentation fault/core dump for any daemon process without code access ?
0
votes
0 answers

Connect to Postgres over UNIX socket running under root

I'm trying to connect to Postgres in a C program using libpq. When I'm running under my own username (which is the same as the username I've created for my Postgres database) everything is fine. When I try to run the program under root it fails…
Elektito
  • 3,863
  • 8
  • 42
  • 72
0
votes
0 answers

Unable to open Unix domain socket

I am trying to listen to UDS, so created UDSSocketClient with socketFile as /tmp/.sock/9001 with socketType = 1, and i get Unable to open Unix domain socket exception. amonUdsSocket = new UnixDomainSocketClient(socketFile, socketType); Ideally i…
nocturnal
  • 395
  • 2
  • 6
  • 15
0
votes
1 answer

Connection refused when using abstract namespace unix sockets

I have a strange problem with unix socket (US) using so-called abstract namespaces when using Python and "pure" C (Python 3.x but looks like 2.x have the same problem). "Normal" socket works like a charm. With "abstract" one US my code works only…
soutys
  • 1
  • 3
0
votes
2 answers

two (wrong) connections on a socket that uses listen(1)

I'm developing two applications in C++ that use C Linux socket calls, a server and a client. The server listens on a specific port A and retrieves a connection using the accept function. I'm using int result = ::listen(mySocketFileDescriptor, 1);…
user3770392
  • 453
  • 5
  • 12
0
votes
1 answer

No address first run with bi-directional unix domain socket

I have two daemons (one client and one server) that communicate thru unix domain sockets (local sockets). The problem I encounter is that the first time a datagram is received in the server with the function recvfrom then the client address provided…
ria
  • 339
  • 2
  • 9
0
votes
1 answer

Sending UDP packet to 2 clients and only one receive

(sorry by advance for my English...) I am working on a network between a PC and a set of Zedboards connected by Ethernet. I use the UDP protocol, and here's my problem: - All my cards and my PC are correctly connected to a switch and have their own…
malek
  • 1
  • 3
0
votes
1 answer

Unix socket error postgresql 9.4

I just installed postgresql 9.4 on a brand new 15.04 ubuntu install and I'm unable to start the psql server. Every time I try to run sudo -u postgres psql, it gives me the following error: psql: could not connect to server: No such file or…
Andrea
  • 394
  • 2
  • 15
0
votes
2 answers

after "rm -R /tmp/.X11-unix", nothing special happens?

I'm learning something about X11. And I was wondering what would happen if I'd deleted the directory "/tmp/.X11-unix". I tried it but actually, nothing special happened. Every GUI app runs unaffected. Why ? I thought X client communicated with X…
waterbully
  • 19
  • 1
  • 1
0
votes
2 answers

Why is the program broken down when it runs at if((hptr = gethostbyname(buffer)) == NULL)

This is the server of a socket communication. When the client sends a URL to the server, the server sends the IP to client. When it runs hptr = gethostbyname(buffer), it always returns NULL. Why? Thank you! #include #include…
DaveyTao
  • 33
  • 6
0
votes
2 answers

password expire date removing for linux

i have below commands am using it for removing expire date for my user at unix it's working but for linux it's not working below example is for unix if anyone have a linux command like this i'll be thankful root@servername>passwd -s user user PS …
Mariwan
  • 9
  • 2
  • 9