727 questions
2
votes
0
answers
70
views
Using JDK16+ unix domain socket support to connect to clamd randomly fails for the n-th connection (n > 1) when using non-blocking IO
I try to connect to the clamd service (antivirus) on an Ubuntu Linux System. clamd on Ubuntu Linux can be contacted using a unix domain socket, which is by default registered under the path /var/run/...
-1
votes
1
answer
71
views
How to handle a fragmented UDS/UDP message? [closed]
I'm building a high velocity distributed database in Rust, using io_uring, eBPF and the NVMe API, which means I cannot use 99% of the existing libraries/frameworks out there, but instead I need to ...
2
votes
1
answer
142
views
Is there any restrictions on unix socket path length
The application written in golang and is ran within Debian bookworm based docker container fails to listen for the unix socket with the error message listen unix [socket-path]: bind: invalid argument
...
1
vote
1
answer
74
views
why does nginx say "91: Protocol wrong type for socket" when it tries to connect to my rust-based unix socket server?
i'm writing a sort of tool to analyse traffic that goes to nginx on my server by logging them into a database, then perform certain actions on them. i've decided the best way to do this would be to ...
-1
votes
1
answer
66
views
Exclusive unix-socket write permissions for shared libraries
I have a logging application and shared library, that write to this application via unix socket.
I want to implement exclusive access of writing to logging application only for the dynamic library.
I ...
0
votes
0
answers
47
views
Second client connect() on unix domain socket succeeds even when listen() set to zero and server only accepts a single connection
I am writing a Python 3-based server/client program using a Unix-domain socket. I am trying to build the server such that only a single client can connect to the server and subsequent connect() calls ...
0
votes
0
answers
41
views
Docker Volume Socket Release Issue
Having some application that is ran within a container.
Besides the rest it starts listening a unix socket within a pre mounted volume directory. Previously file is pre cleaned up if exists any.
The ...
4
votes
1
answer
72
views
How can I create a BufReader and safely continue reading ancillary data from an underlying unix socket?
I'm writing some Rust code where I have a UnixStream socket that I want to receive ancillary messages as well as normal messages.
For the normal messages, it would be useful to use BufReader's ...
3
votes
1
answer
105
views
Splicing from stdin to a socket: Broken pipe
With the following, the client has a small chance of receiving "Broken pipe" when it attempts to splice, despite the socket being, as far as I can see, open. (The "small chance" ...
2
votes
1
answer
85
views
Splicing standard input to a socket
As part of a larger program, I would like to copy everything from standard input to a UNIX domain socket. I figured that splice(2) would likely be appropriate but I'm having trouble using it.
Minimal ...
0
votes
0
answers
126
views
Unix domain sockets in rust with interprocess intermittent 'failed to fill whole buffer'
I have a rust program that starts up a server process and listens on a specific unix domain socket for incoming connections. Incoming connections connect to this domain socket, send a single request ...
1
vote
1
answer
131
views
Behaviour of one-side socket close for UNIX socket with SOCK_DGRAM vs. SOCK_STREAM
When closing a UNIX socket on one side I would expect the other side to be notified of that by a read call, that returns 0. However when using SOCK_DGRAM, the read-call blocks indefinitely. Even when ...
0
votes
0
answers
77
views
Raw UDP packet being dropped
I am learning raw socket programming in linux Ubuntu but i have a problem. My udp packet is not shown in Wireshark. I suspect that its being dropped by my router because of a mistake I made.
here is ...
2
votes
2
answers
556
views
How to open a socket /proc/pid/fd/3 file?
A process' file descriptors can be seen in /proc/pid/fd dir, where some of them can be opened and read or written. For example, if I pipe something to a process on stdin, it will show up as /proc/pid/...
0
votes
1
answer
153
views
How to serve a nuxt 3 webapp with unix socket instead of http
Is it possible to build a Nuxt 3 App so that it will use a unix socket instead of serving on a local tcp port? I am intending to make an app with pywebview and nuxt3. I want the pywebview to display ...
1
vote
0
answers
177
views
How to bind ktor to a unix socket?
I can't find a way to bind ktor server to a Unix socket, whatever engine I use. I've found the socket API, but I cant find a way to have ktor handle requests coming from it as it would with plain HTTP ...
1
vote
2
answers
397
views
PHP file is not found when a path contains spaces using a FastCGI Unix socket
I am transferring a site that was built on Windows XAMPP to a server running Ubuntu 24.04 (Noble Numbat), Apache 2.4.62, and PHP 7.4.33. Everything is working fine, except PHP files containing spaces ...
0
votes
1
answer
118
views
how to shutdown sockets owned by an other thread
In my application I'm making use of unix domain sockets to perform local communication and I've used the uds crate for that. I need to shutdown the sockets(both listeners and clients, selectively), ...
0
votes
0
answers
42
views
Bind: Socket operation on non-socket. UNIX Sockets
While the Socket itself is initialized, Binding Socket refused to bind returning -1 (socket operation on non-socket). Socket code:
#include "Socket.hpp"
Network::Socket::Socket(int domain, ...
0
votes
1
answer
679
views
Unable to connect to the Unix socket for GVMD interactions : "Connection Refused"
I'm trying to implement a script within the docker-compose of greenbone-community-edition. This script uses the socket located in /run/gvmd/gvmd.sock to establish a connection and execute Python ...
0
votes
2
answers
65
views
The signal emmited from UnixDomain datagram socket server running on a QThread never received
The Files which I've created
I've created WorkerThread class extended QThread as follow:
// https://stackoverflow.com/a/14546167/11073131
#ifndef THREAD_H
#define THREAD_H
#include <QThread>
#...
0
votes
1
answer
488
views
Unix domain sockets in Rust
I have written a sample code wherein I'm trying to make use of unix domain sockets to communicate between 2 threads, but not able to make that happen. After client connecting to the server, client not ...
0
votes
1
answer
137
views
Is it possible to send data continuously to a unix domain socket without any reading counterpart?
I need to connect two processes with unix sockets: a producer that streams a video, a consumer that should read the video and process it.
As the video stream comes from a live stream, I initially ...
1
vote
1
answer
97
views
IPC between non-isolated and isolated CPUs
I have 2 CPUs - cpu1 and cpu2. Process A (non-real-time) runs on cpu1, Process B (real-time) runs on cpu2. I want to isolate cpu2 from the Linux scheduler by using isolcpus or tuned-profiles-realtime. ...
1
vote
0
answers
150
views
confusion in unix socket to use for query in postgresql through php
i try to build website in ubuntu vps using nginx, php7.4, and PostgreSQL.
my goal is using unix socket to communicate through ajax-phpfpm-postgresql to execute query sql in PHP program.
i have change ...
1
vote
1
answer
214
views
What could create unix sockets in PHP 8.2 as a side-effect?
In two of our many PHP pods (we're running under Kubernetes) we have a problem with a Unix socket leak. Our PHP CLI process seems to be opening and not closing many unix sockets, until in an unrelated ...
0
votes
0
answers
119
views
Polling a UnixDatagram for new messages in Rust: how to handle WouldBlock error?
I am writing a small application in Rust that runs a loop every 250ms.
I want the application to check a UnixDatagram every time the loop runs to see if there are new messages passed into the Datagram....
0
votes
0
answers
127
views
What value should be initialized in hints parameter of getaddrinfo()?
In the hints parameter of getaddrinfo(), there is a pointer to the addrinfo struct, but what value should I initialize in the addrinfo object? In the addrinfo struct, there are several values that can ...
2
votes
2
answers
2k
views
Unix Socket Connections Refused On Docker Volume
I seem to be hitting some sort of permissions issue while trying to use unix sockets between my host and a Docker container.
Within a running container, I have a server listening to a unix socket on a ...
0
votes
1
answer
1k
views
How to get a connection between Google Cloud Run and Google Cloud SQL?
What I have: A Java11 Spring Boot application (embedded tomcat 9) with Hikari Pool (Grails 4) in a Docker Container based on eclipse-temurin:11-jre.
What I need: My application needs a connection to a ...
-1
votes
1
answer
426
views
What is the correct way of passing data through Unix sockets?
I'm working on a personal project to try to better understand inter-process communications on Unix. I have two binaries i compiled in C and I am attempting to pass data from one process to another ...
0
votes
1
answer
137
views
read() seems to block, even though O_NONBLOCK flag is passed [closed]
I am trying to write a chat program using UNIX Sockets. It is supposed to work similar to nc -U '/tmp/...' -l.
Currently I am only testing a unidirectional approach, but can't seem to get it working.
...
0
votes
0
answers
215
views
How to replicate this mpv socat command but as a PHP 8.2 cURL request?
I'm trying to use mpv's API. I have followed this: https://mpv.io/manual/master/#json-ipc
I started mpv with: mpv /path/to/file.mkv --input-ipc-server=/tmp/mpvsocket.
I ran echo '{ "command"...
2
votes
1
answer
438
views
Unable to connect to docker mysql unix socket
I'm trying to setup mysql within a docker container but I want to connect to it via a unix socket when I try to connect I get this error:
(web-YtJryoMm-py3.8) redacted@myhost testsocket % mysql -u ...
3
votes
1
answer
898
views
If I have a file descriptor with an integer value above 1024, can select() still work on it?
The man page for select() states:
WARNING: select() can monitor only file descriptors numbers that are less than FD_SETSIZE (1024)—an unreasonably low limit for many modern applications.
This is ...
0
votes
0
answers
51
views
Bind failed: address already in use with SO_REUSEADDR [duplicate]
I am building the socket part of a project I am working on and I keep getting bind failed: address already in use. I tried to use SO_REUSEADDR too but it doesn't seem to solve it. How do I fix this?
...
2
votes
1
answer
444
views
UNIX socket read happening even though client does not send data
I am facing a very strange issue, I have a simple UNIX STREAM socket server/client code running on Linux. client occasionally sends a message to server (I tested with sending only once also), however ...
1
vote
0
answers
148
views
Get file descriptor output in resumed syscall using strace
I am using command:
sudo strace --trace=sendto,recvfrom,read,write,ipc -yy -s 10000 -fp $pid 2>&1
where pid is the the process id I want to trace.
When i get outputs, there are some unfinished ...
0
votes
0
answers
377
views
Can't make gunicorn systemd service recognize change in code without rebooting my linux computer
I have deployed a simple Django app locally on my ubuntu machine using systemd.
I have created two files gunicorn.socket and gunicorn.service according to many tutorials on the web. When I change my ...
0
votes
1
answer
804
views
tor.service starts but unix socket not work
I am wonna set my own site in Tor network with .onion domain on Ubuntu 22.04.2 LTS.
I am install tor, nginx and configure nginx and /etc/tor/torrc file to work with unix socket.
/etc/tor/torrc config ...
3
votes
1
answer
1k
views
.net 7.0 kestrel appsettings.json configuration for unix sockets
I have an open-source service application written in c#, running on .net 7, on Linux, which exposes an HTTP service, using Kestrel, to provide some monitoring endpoints for application state and ...
1
vote
0
answers
176
views
Passing unix domain sockets as STDIN, then using them in child processes
I am working on an archaically old code base. Within this code base, we create unix domain sockets, and we pass those to child processes as stdin:
int listenFD = socket(AF_UNIX, SOCK_STREAM, 0);
...
...
0
votes
0
answers
208
views
How to use SocketCAN via Unix Domain Sockets in Java?
I am trying to figure out how to use a SocketCAN connection in Java.
As stated in the SocketCAN doc, SocketCAN is designed very similar to TCP and UDP Sockets. It also provides a network interface for ...
1
vote
0
answers
250
views
HTTP POST request using java 16 or above to UNIX domain socket server
I have server that can be communicate using REST api over UNIX domain socket.
I want to have java application that can do POST operation on UNIX domain socket using JAVA 16 or above. But, I have no ...
1
vote
1
answer
1k
views
Interact with Chrony using Unix Sockets in Python
I have a python application where I need to be able to dynamically add an NTP server to Chrony. From the command line I can do:
sudo chronyc add server time.google.com
My understanding is that ...
0
votes
0
answers
157
views
Sending a file descriptor from Go to C
I am trying to send a file descriptor using an abstract UNIX domain socket but the client side just hangs and never get the descriptor. I am not sure why.
For C code I am trying to use syscalls ...
1
vote
0
answers
86
views
How do I configure the jetty http client over JAXRS to connect to a unix domain socket?
I have the following code to connect to a JAXRS endpoint using jersey and the jetty HTTP client as follows:
ClientConfig config = new ClientConfig();
config.connectorProvider(new ...
1
vote
0
answers
435
views
SpringBoot configuration to enable unix sockets in Windows
I'm trying to configure Springboot(Tomcat) to start using unix-socket in Windows, but I get an error "Address already in use: bind". I have my own connector with port 0, but in debug mode it ...
0
votes
1
answer
977
views
How to regenerate php-fpm sockets
I have a server running Apache 2.4 and php 8.1 with FPM for several virtual domains, and just now I noticed one of these domains is missing it's fpm socket in /var/php-fpm... Been googling how to ...
0
votes
1
answer
130
views
No SIGHUP on default Ubuntu by closing socketpair
The following code should call the signal handler once the pipes are closed by the parent. The signal handler will be sporned by the child, cause it waits one second. This wait cycle should be ...