Skip to main content

Questions tagged [socket]

is a data communications endpoint for exchanging data between processes executing within the same host operating system.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

How can I have multiple TCP clients connected to server ttyS0?

I'm trying to test following envirorment: One server (it's a router, It has busybox and few other cmd) with a a physical serial port and and open socket #tcpsvd -v 0.0.0.0 -p 999 cat /dev/ttyS0 ...
Carmine Esposito's user avatar
0 votes
1 answer
64 views

What is a port?

I have been running an Apache web server for numerous years and have been using ports as a medium to serve requests. Recently, I began using Unix sockets to serve MySQL requests. The function of Unix ...
user10709800's user avatar
2 votes
1 answer
74 views

Ubuntu server, packets from outside network not reaching local socket but seen on tcpdump

I am running Ubuntu server 22.04, and have a peculiar port forwarding issue with a local machine. This machine has two Ethernet interfaces and the connected enp1s0 interface has an IP address 192.168....
julumme's user avatar
  • 165
1 vote
1 answer
36 views

How do I automatically set the target context for a .sock file to be **httpd_var_run_t** so that nginx can connect to and write to the socket?

The original file context for /run/unicorn.sock is tcontext=system_u:object_r:var_run_t:s0 How do I have the file context automatically be system_u:object_r:httpd_var_run_t:s0 when I start the socket ...
siralbert's user avatar
  • 117
2 votes
0 answers
116 views

How do I setup and start a unix socket in Red Hat?

I couldn't find any specific guides for creating a unix socket in Red Hat Enterprise Linux (RHEL version 9.3) so I used this guide. After creating the gunicorn.socket and gunicorn.service file in /...
siralbert's user avatar
  • 117
0 votes
1 answer
31 views

Too fast checking local ports with python socket

This code example is given in the book "CPython Internals". from queue import Queue import socket import time timeout = 1.0 def check_port(host: str, port: int, results: Queue): sock = ...
maskalev's user avatar
  • 185
1 vote
1 answer
189 views

Assign capability to systemd service and specific user

I am working on an embedded system device which basically has root user. I have a systemd service call.service which works fine with root access. The service basically creates a few sockets and then ...
gst's user avatar
  • 141
0 votes
0 answers
134 views

Gunicorn doesn't create MyProject.sock file

I'm not a Unix expert and I'm having a problem with a WebApp running on Azure on an Ubuntu server (20.04.5 LTS), gunicorn.service doesn't create the MyProjet.sock file. Specific, the WebApp has always ...
rusher83's user avatar
0 votes
1 answer
69 views

compile error with tiny http server c code gcc debian

My distro is MX Linux (Debian) GCC was already installed with distro. I am trying to compile some open source code from Nir Lictman. His Minimalist C web server code compiles in his YouTube video. ...
xstack's user avatar
  • 105
0 votes
1 answer
69 views

Check if a socket file can be used

I use the contromaster option with my SSH command, like so: ssh -i id_rsa -o ControlMaster=auto -o ControlPath='~/.ssh/controlmasters/%r@%h' -o ControlPersist=3600 user@hostname This allows me to ...
s_dav's user avatar
  • 13
0 votes
0 answers
134 views

Is possible to "sniff" a socket? Socat doesn't work

This is the situation: I have two VM (virtual machines) via kvm-qemu connected via virtual-serial (a socket). I created the two vm's with this serial configuration: serial1 (slackware, uses port1 ...
elbarna's user avatar
  • 12.8k
0 votes
0 answers
44 views

DHCP server can not receive my client in virtual interface

I'm writing a DHCP server and my own client using socket in Python3. My client: def client(self): print("DHCP client is starting...\n") dest = ('<broadcast>', ...
anhbe58's user avatar
0 votes
1 answer
142 views

How do I find out reason of missing packets in response to `sendto` syscall?

strace ... -e sendto shows a successful (i.e. positive return value) outcome of trying to send a UDP datagram somewhere, but tcpdump -i any in that network namespace does not show anything relevant in ...
Vi.'s user avatar
  • 5,813
4 votes
4 answers
2k views

Ist it possible to check the peer address before accepting a TCP connection?

I wrote a simple Perl server that listens on a TCP port/socket, accepting connections. Now I wonder: When wanting to implement address-based access control, is it possible to check the address of the ...
U. Windl's user avatar
  • 1,493
0 votes
1 answer
233 views

select() marks a FD to be readable, but there is no data to be read

I'm encountering an issue in my server code where calling accept() on the listening socket will occasionally block, even though select() marked it readable. My understanding is that this isn't a case ...
justin's user avatar
  • 3
0 votes
0 answers
27 views

SocketCAN how can I get result of the operation

Is it possible to get the status of the CAN operation? Example operation: write(socket, &frame, sizeof(frame)); Is it possible to check if the frame was ACK-ed or get any other CAN status ...
0___________'s user avatar
0 votes
0 answers
49 views

Ad-hoc Wi-Fi: disable wireless comms while keeping interface up

TLDR: I want to prevent wireless communication with peers on a Raspberry Pi ad-hoc WiFi network but without bringing it down or disabling the interface. This is to simulate the nodes getting out of ...
ClausWorks's user avatar
0 votes
0 answers
15 views

SHIBD Daemon not creating Socl file

The SHIBD daemon is failing to start with the error message "no such file or directory". It appears that the daemon is not writing the file. Any ideas are helpful.
Matt's user avatar
  • 1
0 votes
1 answer
726 views

Does Wayland/Xwayland have a legacy x11 display socket?

I am trying to pass an x11 socket to a docker container as a volume so that it's applications can display on my screen. I am unsure of how to do this seeing as I am on wayland and I, a. do not know ...
Kaympe20's user avatar
0 votes
1 answer
787 views

How to Make a Systemd Private Network Namespace Accessable

So I have an application that only binds to 0.0.0.0 and listens on a port (TCP). The communication is unencrypted and unauthorized so I'd like to work around that without getting too deep into the ...
WesAtWork's user avatar
  • 103
2 votes
0 answers
56 views

How to cancel a packet scheduled for time-based transmission after it's enqueued?

I have a time-sensitive networking application I am writing that involves receiving individual Ethernet frames, and then sending the data onward in another Ethernet frame after a precise 1 second ...
AJMansfield's user avatar
1 vote
2 answers
213 views

Docker on Linux (Manjaro), after system update change location of socket from /var/run/docker.sock to /run/docker.soc - docker doesn't work

After I made regular update of system and apllication, docker (and docker-compose plugin) doesn't work: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker....
petrstepanek99's user avatar
0 votes
0 answers
17 views

Disparity between file-nr and netstat

> netstat | grep :389 | grep ESTABLISHED | wc -l 2116 > cat /proc/sys/fs/file-nr 1920 0 3178047 how can a subset of the number of tcp connections be more than the total number of file ...
soupybionics's user avatar
0 votes
1 answer
56 views

Why does netstat show my socket tutorial program having a port of "x11-1" instead of the port I set in code?

I am trying to learn about socket programming, and I have the following function to set up a socket: 29 int CreatePassiveSock(char *protocol, char *portstr, int qlen) { 30 ...
Anthony De Vellis's user avatar
0 votes
1 answer
452 views

conditional flush tcp sockets on linux

whenever I write data to a tcp socket, it waits until its filled with enough data ex: 64k (max packet size) then it sends data to the wire. this misses the data at the right time for the other end. ...
user3840019's user avatar
0 votes
1 answer
57 views

Cannot restart tmux session - Cannot unlink tmux socket file [duplicate]

I am using tmux to create a shared session in /tmp called tekkit. All works fine, with one major exception. When the tmux session is closed, the /tmp/tekkit socket file remains in place. This is a big ...
Kuba0040's user avatar
0 votes
0 answers
30 views

Linux socket modes of IO

There are three modes of i/o. They are Programmed IO, Interrupt IO and DMA. My understanding is, Programmed IO requires CPU to busy-wait while Interrupt IO by nature, is ansynchronous. Where can I ...
cpp's user avatar
  • 101
0 votes
0 answers
155 views

Is it possible to make Linux use Unix Domain Socket automatically on local socket

My team is developing a micro-service web backend. The developers know nothing about deployment, they just deploy the service with some web framework, such as Springboot. The deployment is controlled ...
Yves's user avatar
  • 3,331
1 vote
1 answer
524 views

Openssl output to socket

I want to extract the signer from an S/MIME file inside a node app. I use (child_process.spawn(), which runs this command openssl smime -verify -CAfile c_root.pem -inform DER -signer /proc/self/fd/1 ...
eri's user avatar
  • 905
0 votes
0 answers
141 views

What is the right usage of SIOCGIWSCAN to scan WIFI AP?

I am working on an embedded Linux system (kernel 5.10.24), there is a WLAN interface in the system. Now I want to scan the nearby AP, I think I can use socket and SIOCGIWSCAN command to get the AP ...
wangt13's user avatar
  • 443
2 votes
0 answers
79 views

SOCKET auditd hex value meaning

I have the following log messages from auditd. They appear to log calls to socket. type=SYSCALL msg=audit(05/11/2023 23:19:52.913:2533) : arch=x86_64 syscall=socket success=yes exit=9 a0=inet a1=...
Joel Olsteen's user avatar
0 votes
1 answer
736 views

Application server socket won't open in docker on my machine

Introduction I am developing a proprietary application that uses libevent with libevhtp to create a server socket for http communication. I wrote a Dockerfile to place this application in a docker ...
Alex's user avatar
  • 304
0 votes
0 answers
446 views

Why is /fd/1 (stdout) a socket?

I'm running a game server as a systemd service, and in the .service file, I see that StandardOutput defaults to journal. Ihsan@IhsanServerVM:/proc/28617/fd$ file 1 1: symbolic link to socket:[510374] ...
ihsan's user avatar
  • 101
1 vote
1 answer
157 views

Sending data with raw socket over gretap

I'm trying to write an IS-IS packet to gretap interface with ISO (0x00fe) protocol type. In this case there is no ethernet header so I'm using raw socket. The gretap always puts 0x6558 as the protocol ...
Barry's user avatar
  • 21
1 vote
0 answers
160 views

edge triggered epoll missing 0 byte read on close

I'm trying to understand if its possible to use edge-triggered epoll and avoid the need to call recv() to read from an epoll triggered READ event multiple times, every single time... The epoll manpage ...
Rob A's user avatar
  • 11
0 votes
1 answer
512 views

SockFS mount / interacting with UDP & TCP sockets through filesystem

I was reading about SockFS, and I'm wondering why there seems to be no mount driver for it. That is, if SockFS implements the VFS API for UDP and TCP sockets, why is there no userspace filesystem ...
Charles Langlois's user avatar
1 vote
0 answers
306 views

How is the hardware TX queue selected by default?

NICs may have multiple hardware RX and TX queues, and there are several methods which allow choosing which RX and TX queues are used for a given flow/packet, though most are focused on the RX side. ...
BeeOnRope's user avatar
  • 559
0 votes
0 answers
271 views

Process stucked at recvfrom syscall

A process is stucked at recvfrom syscall. > sudo strace -p 4146278 strace: Process 4146278 attached recvfrom(9 ... I looked up under /proc/4146278/fd. fd 9 seems to be a socket. > sudo ls -al /...
Wei Qiu's user avatar
  • 101
0 votes
1 answer
94 views

Convert a file being downloaded by firefox (.part) into a named pipe?

Slightly unusual usecase: I have a download from firefox which is actually a stream of data. I want to process it in (near) real-time, without saving the data (it's high volume and would fill my drive ...
Gloomy's user avatar
  • 103
0 votes
0 answers
371 views

What would cause a connection refused (wireshark: [RST,ACK]) error?

I have a service running on my RHEL 8 server VM on port 9092. When I send messages to this port from a client, the connection times out. WireShark shows that the server responded with a [RST,ACK], as ...
Zoomzoom's user avatar
  • 101
0 votes
1 answer
669 views

What's the default KeepAlive value for a TCP socket in a UNIX-like Docker container?

I am creating a TCP socket as follows: _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); if (Environment.OSVersion....
Dominique's user avatar
  • 141
0 votes
1 answer
104 views

Is there a way someone can read arrays of bytes which I send with java sockets while using TLS 1.2?

If anyone can answer me pls I just need an anwer. I know thus isn't maybe right place for this question I created chatting app with sockets in Java 8 and i use TLS 1.2 My question is: Is there any way ...
GM dz0ji's user avatar
0 votes
1 answer
193 views

cyrus imap does not start lmtp tcp socket, error message: Servname not supported for ai_socktype, disabling lmtp

Problem: When starting cyrus imap with the following line in /etc/cyrus.conf: SERVICES { ... lmtp cmd="lmtpd -a" listen="[192.168.50.100]:lmtp" prefork=1 proto=tcp4 } ...
Arigion's user avatar
  • 152
1 vote
1 answer
300 views

Linux SO_RCVLOWAT being violated by epoll according to FIONREAD

The more traditional way of dealing with sockets is to have a buffer per connection, and to incrementally read as many bytes as possible once the socket becomes readable. With a framed protocol ...
Mr.Sonic's user avatar
0 votes
1 answer
1k views

Selinux php-fpm httpd and mariadb socket connection

New note with important details I just ran a few version tests and resulted in the following: Alright, here’s my latest update: 10.5 works 10.6 doesn’t 10.7 works 10.8 work etc. I was hoping to use ...
Brian's user avatar
  • 292
1 vote
1 answer
193 views

After enabling ETF qdisc packets are only sent for a few seconds

I have two computers that are connected via an Ethernet cable with Ubuntu 22.04 installed on them. I have a client on computer A) which is sending UDP packets to a server on computer B). I am ...
Nandor Takacs's user avatar
0 votes
1 answer
562 views

Writing to unix socket file as fast as possible

I'm trying to write with perl to a unix socket file as fast as possible but failing on full message buffer. I tried autoflush and manual flush without success. use IO::Select; use IO::Socket::UNIX; ...
user496909's user avatar
1 vote
1 answer
429 views

Number of open sockets in /proc/pid/fd does not agree with netstat

I'm running into a weird socket issue when running my own crawler. It opens and cloees a lot of TCP sockets rapidly due to the protocol design. It's something I have to live with. I'm very sure in ...
Mary Chang's user avatar
2 votes
1 answer
2k views

Find my display socket

I'm trying to find my display socket so I can pass it to a container. I expect it to either be in /tmp/X11.unix or /run/user/xxxx/wayland-0, but neither exist. I'm using KDE Plasma with X11.
Nero gris's user avatar
  • 221
0 votes
1 answer
355 views

websocat server with timestamp

I am running websocat (https://github.com/vi/websocat/) on macOS in server mode for debugging purposes. I would like to display a timestamp on every incoming message. However: I am struggling with ...
dexamenos's user avatar

1
2 3 4 5
9