Questions tagged [socket]
A socket is an abstract network construct with a sending and receiving side. In most modern operating systems (OS) there are device representations, and programming tools to address sockets.
581 questions
0 votes
0 answers
34 views
Socket Leak in Network-Intensive Application: Discrepancy in 'Closed' State Count
I'm experiencing a socket leak in a network-intensive application where the number of sockets in the 'closed' state reported by ss -s does not match the actual count from detailed commands. Here are ...
0 votes
0 answers
73 views
Libvirt TLS socket won't bind to a specific IP address
I'm trying to bind libvirt daemon TLS socket to a specific ip address (10.10.10.254) configured on one end of the VETH pair. I modified /etc/libvirt/libvirtd.conf file accordingly to the libvirt docs: ...
0 votes
0 answers
112 views
Coraza SPOA Error: "response id is empty"
I'm running Coraza SPOA on a HAProxy VM and encountering a recurring error in the logs: root@haproxyvm:~/coraza-spoa# tail -f /var/log/coraza-spoa/coraza-agent.log 3:44PM PNC Error handling request ...
0 votes
1 answer
304 views
How to allocate a tcp port orphaned by a non-existent process without restarting Windows [closed]
I'm encountering a persistent issue where a TCP port remains stuck in the LISTENING state, but the process that allocated it cannot be found. This happens even though the application that originally ...
0 votes
1 answer
1k views
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Suddenly after restarting the machine, I have been facing this error can't connect to MySQL server and table plus is not able to connect with localhost 127.0.0.1. The steps below worked for me, and ...
1 vote
1 answer
222 views
What IP to assign my NIC in order to receive multicast traffic
I have a device (Blackmagic 2110 IP Converter 3x3G) connected to my PC that is sending me some ST-2110 video stream over 239.255.2.164. I need to receive this data. My NIC does not have any IP address ...
1 vote
1 answer
527 views
What is the difference between "packet drops" from "ip -s link" and "socket drops" from "ss -tm"?
ss -tm shows detailed memory information about each TCP session. I found that some of the tcp sessions show sock_drop, here is one: ESTAB ***** some irrelevant info here **** ...
-1 votes
1 answer
550 views
On linux, can I implement my own TCP stack while interoperating with other processes on same host?
I'm aware of two main ways to write and receive network packets from an existing network interface on linux. The first is with the classic sockets API, in which the linux kernel is responsible for ...
0 votes
0 answers
183 views
Apache 2.4 config for fcgi with custom socket listening web app
I need a config for apache 2.4 which just connects to an open socket and talks fcgi over it. I am writing my own fcgi-enabled web app. By now, it opens a listening socket and when a web server (nginx ...
1 vote
0 answers
281 views
Why would a server not send ACK in response to PSH, ACK?
We have a client/server implementation, where the client continuously, periodically sends data at 800Hz over ethernet. The packets are small so we're significantly under the network bandwidth limit. ...
0 votes
1 answer
1k views
Are raw sockets affected by iptables rules?
My understanding, from various sources (e.g. here and here) is that raw sockets are not affected by iptables rules. However in practice, I am seeing iptables prevent me from sending packets on a raw ...
2 votes
0 answers
182 views
Linux Kernel keeps retransmitting data already ACKed by peer
I have the strange issue that a session without obvious cause hangs and timeouts. The session is a syslog stream with rather high volume, and traffic only flows from client to server. In capture files ...
3 votes
0 answers
2k views
Can I make TCP_NODELAY a default setting for all connections on a GNU/Linux system?
This article: It’s always TCP_NODELAY. Every damn time. suggests, as a bottom line, to set TCP_NODELAY by default, always. Can I do that on a (recent) GNU/Linux system... As root, for all sockets ...
2 votes
0 answers
2k views
Cannot connect to a port on Ubuntu 22.04 x64
I have MySQL running on port 1835, as proven by running the command: lsof -i:1835 The following was run to open the port on the firewall: ufw allow 1835/tcp ufw enable ufw reload But the port cannot ...
0 votes
0 answers
91 views
Kernel TLS Socket Redirect
Suppose both the client as well as the server are on the same machine and they want to do mTLS. They both choose to offload the TLS to Kernel (kTLS). Now when the key exchange happens, given the ...
2 votes
0 answers
338 views
What does it mean when netstat outputs a dash in pid / program name column?
Here is some lightly modified output from netstat (I removed the addresses and names) a@xxxxx:/app# netstat -p Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address ...
-1 votes
1 answer
210 views
How does real server, direct return server (DRS), reply to client if a load balancer (LB) uses port address translation (PAT)?
Direct Return Server overview: The DRS allows real servers to directly reply to a client without going through load balancer (LB). The LB ip (VIP) is configured as a loopback (localhost) ip for the ...
0 votes
1 answer
391 views
php-fpm creats only one socket file
I have multiple virtual hosts with unique domain names, users, and root directories for each on Nginx and php8.1-fpm. In the /etc/php/8.1/fpm/pool.d/domain.com.conf contains user = domainuser group = ...
0 votes
1 answer
863 views
Python gethostbyaddr being slow
I'm facing an issue today I can't explain and I'm hoping someone will be able to put me in the right direction. I have a fleet of EC2 servers running a python script. When a user connects to my ...
0 votes
1 answer
226 views
Can not ExecStart service python script as root on Linux
OS: Ubuntu 20.04.6 LTS I created a service that executes python script checker.py. The problem is this service does not execute python script with root privileges, although sirjay user has root ...
0 votes
2 answers
4k views
Fork connections out from a single socat connection
I have an old legacy application I’m trying to get to work with our semi-modern network. This application sends log messages as HTTP requests (one log per request) but does so over a single TCP ...
-1 votes
1 answer
4k views
ping 100% packet loss - can't ping to server
when I try to ping my newly created server it shows: vasanth@vasanth-client:~$ ping -c 4 server.ip.name PING server.ip.name (server.ip.address ) 56(84) bytes of data. --- server.ip.name ping ...
1 vote
0 answers
1k views
clamav-daemon doesn't create /var/run/clamd.ctl
I installed clamav-daemon on Debian 11 and when I try to start it, it doesn't create the LocalSocket /var/run/clamd.ctl. LocalSocket in my /etc/clamav/clamd.conf: LocalSocket /var/run/clamav/clamd....
0 votes
1 answer
169 views
How to track file lifetime using lsof?
I have read article https://tailscale.com/blog/case-of-spiky-file-descriptors/ where author investigates anomalies with the amount of open file descriptors. He said that made snapshot of open files ...
1 vote
1 answer
3k views
Start Apache on-demand using systemd socket activation
I have a local website on Debian 11 which is rarely used so I thought I might want to start Apache using systemd socket activation when visiting the site and then shut down after few minutes of ...
0 votes
1 answer
309 views
How do I setup a SSL certificate for an express.js server behind a load balancer?
I'm restructuring my server structure by splitting them up instead of running everything from one server. I looked here but that just specifies what I were already doing in the original setup with ...
1 vote
0 answers
1k views
Client Listening on 0.0.0.0 when custom network interface doesn't exist?
I'm facing an issue in our environment where I'm starting a ServerSocket (Java), and configuring it to listen on 0.0.0.0. Then I'm creating a network interface, and my client is attempting to connect ...
0 votes
2 answers
8k views
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
EDIT: The following describes my original question, but as long as I haven't resolved the issue yet, I thought maybe I should change settings inside the created mysql POD instead of mysql config files ...
1 vote
1 answer
4k views
Which machine is actually closing the TCP socket and why?
I'm working on a C# application, handling TCP sockets. I have a server application (Hercules) on the remote machine, trying to keep a socket open. I have my application on my machine, subscribing to ...
1 vote
0 answers
184 views
Reached pm.max_children, High sockets allocated, No CPU usage
The issue I have a server that reaches pm.max_children (200) without spike in CPU usage. No network traffic (MB out / MB in) but extremely high number of socket allocated that do not get closed. CPU: ...
3 votes
0 answers
316 views
How to tell whether a linux tcp socket had recent activity?
Most of the time, when changing or upgrading a network service, I would do this during maintenance hours but some services are rarely used so it is tempting to just check whether it is currently in ...
1 vote
0 answers
300 views
How to open communication PYTHON socket with a SERVER SOCKET on AWS EC2 to a CLIENT SOCKET on my local pc?
Sorry my english is not good I want to established connexion from my client socket on my local pc to a host server socket on AWS EC2 instance. I'm trying to follow suggestions from here and code from ...
1 vote
0 answers
86 views
How are Linux ACLs different for files versus sockets
With umask 0022, using default ACL entries default:user::rwx, default:group::rwx, default:mask::rwx and default:other::rwx for a directory, files created with touch (e.g.) have a mask of rw, and ...
1 vote
0 answers
348 views
How to create multiple pools on LEMP Stack, PHP 8.1?
I need to optimize my web app performance, with that in mind I created two PHP-FPM pools for frontend and backend and their respective users. Both pools are listening to different sockets on /etc/php/...
3 votes
1 answer
2k views
Does information piped through a Unix socket touch disk?
I'm trying to understand how fast different IPC mechanisms are, and I know it's possible to create a Unix Socket as a "file" in a directory on a filesystem, but what I don't understand is ...
1 vote
0 answers
134 views
Sockets: divergence in behaviors between linux and windows when binding to INADDR_ANY *and* another address with the same port
Say one attempts to bind two sockets respectively on the two addresses "0.0.0.0:12345" and "127.0.0.1:12345". Depending on the platforms I tested this on, the behavior changes. On ...
0 votes
1 answer
1k views
kubernetes pod with a socket connection not firing 'close' event
I have a Kubernetes deployment where a pod connects to a client via TCP Socket. On connect and disconnect different events happen. In the dev environment the server can respond to connections, data, ...
0 votes
0 answers
950 views
configure inactivity timeout while handling keepalive probes
I am developing a TCP echo server using python and the socket library. I'd like to have a timeout configured for each incoming connection. So to drop and close them if there is inactivity for a ...
0 votes
2 answers
2k views
Ansible - No such file error when activating systemctl Podman user socket
I am running an Ansible playbook on a fresh Oracle Linux 8 system. It includes a step where it asks systemctl to activate a user Podman socket like so: - name: Enable podman socket vars: userid:...
0 votes
1 answer
409 views
Hosting a Python sockets server on the web
I made a simple chat app for my friends and I to use, but I don't want to host the server on my computer, I want to host it on the web. Does anyone know any good services or tutorials on doing this?
2 votes
1 answer
2k views
IPTables log connection pid on OUTPUT chain
I'm trying to find pid of a socket using iptables OUTPUT chain log, or even better adding it into the log. My current iptable rule: sudo iptables -A OUTPUT -j LOG --log-prefix='[PID]' --log-level 7 --...
0 votes
1 answer
267 views
PHP socket connection through XR300 router to a receipt printer
I have a PHP application which is attempting to open a socket connection to a printer through my router. A couple things to note - my networking skills are lacking so I may be missing something ...
2 votes
1 answer
2k views
Failed to get properties: Unit name [email protected] is missing the instance name
I've recently upgraded my MariaDB servers from 10.1 to 10.6 and now when I restart services for example wildfly, I get this message : sudo service wildfly restart Failed to get properties: Unit name ...
2 votes
1 answer
3k views
How do I create a python 3 service that uses socket with systemd?
I am trying to create a service with systemd, where I use python3 to create a simple socket and leave it as a daemon, but I have made several attempts but in both cases without any success. For today ...
3 votes
2 answers
1k views
Fail2ban socket permissions reset on reboot
I have some specific group/permissions set for my fail2ban.sock file to make Zabbix able to monitor Fail2ban as described here https://github.com/hermanekt/zabbix-fail2ban-discovery- I added the ...
0 votes
1 answer
1k views
Mysqli access denied , using UNIX socket [duplicate]
I am trying to learn PHP, and I am setting up the database connection. On Mysql Workbench, I created a database called php, and created a table. Then I created the account "sam"@"...
3 votes
2 answers
34k views
Why am I getting "Connection refused"?
I am running a hello-world http server on an ubuntu EC2 instance, let's say, myurl.com. I am unable to curl it from my client: $ curl myurl.com:4296 curl: (7) Failed to connect to ...
2 votes
1 answer
6k views
Socat - is it possible?
Is there any way to listen and execute a command ( for every connection ) while port forwarding with socat? A non-working example to make it more clear: socat TCP-LISTEN:8080,reuseaddr, "exec:ls&...
0 votes
1 answer
836 views
Not seeing a packet sent from a client to the server in Wireshark
I am new to socket programming and have a couple of questions. For the context, I have a server and client with each having a socket opened: the socket on the server is bounded to INADDR_ANY which ...
5 votes
0 answers
906 views
How to find out which kernel module opened a socket?
When I try to find the process for an opened socket using e.g. ss I get the following output: ❯ sudo ss -tulpen Failed to open cgroup2 by ID Failed to open cgroup2 by ID Netid State Recv-Q Send-Q ...