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
0 answers
4 views

sockstat of php-fpm doesn't match config file

I am trying to get a test system up and running under FreeBSD (actually under a TrueNAS jail) using nginx, php and php-fpm. This is the first time I've tried to build such a system, and FreeBSD isn't ...
Peter M's user avatar
  • 227
0 votes
0 answers
5 views

How to allocate socket buffer memory from local memory of specific NUMA node

My computer has 2 CPUs, and each node has its local memory. They operate using NUMA architecture. The operating system (O/S) is Rocky Linux 9.1 (x86_64). Additionally, each CPU is equipped with a ...
raon's user avatar
  • 1
2 votes
0 answers
25 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
0 answers
51 views

Specifiy which SPI interface to use for SocketCAN interface

I am using a Raspberry Pi 4b with Raspberry Pi OS (kernel 5.15) and a custom CAN HAT with 3xMCP2517FD CAN controllers connected to SPI0/1/4 of the Raspberry Pi to communicate to other CAN nodes on ...
general_andreas's user avatar
0 votes
1 answer
57 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
55 views

QEMU CAN Bus Emulation; error on socket bind: No such device

The goal is to run following C program in the VM. int main(int argc, char **argv) { int s, i; int nbytes; struct sockaddr_can addr; struct ifreq ifr; struct can_frame frame; ...
snikers12's user avatar
0 votes
0 answers
103 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
46 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
0 votes
0 answers
54 views

Using chrony with non-root sockets

I'm trying to used chrony in conjunction with a C++ application I'm working on. Ideally I would like to send information to chrony using sockets rather than SHM, but it seems that chrony can only ...
Morten Nissov's user avatar
1 vote
0 answers
39 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
95 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
58 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
  • 528
0 votes
0 answers
85 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
50 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
45 views

Socket buffer data structure format (from file descriptor to buffer)

I'm trying to learn basic I/O and how kernel manages interface between I/O resources and processes. I got interested in how it manages buffering, and want to ask about sockets as an example. Is the ...
BipedalJoe's user avatar
0 votes
0 answers
124 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
242 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
  • 131
0 votes
1 answer
49 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
66 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
0 votes
0 answers
37 views

Auditd - SOCKADDR - AF_LOCAL - Parsing issues

(Cross posted) I set out to parse an auditd log entry containing a SOCKADDR event. I am running into issues with additional data and trying to identify where its coming from and the structure of it. ...
johnnyb's user avatar
  • 101
1 vote
1 answer
129 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
529 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
0 answers
47 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
0 answers
450 views

How to create a dummy/Virtual network interface programmatically using C/C++ in Linux

I am new to socket programming . Recently i have been looking at the codes here in this platform , such as: https://stackoverflow.com/questions/5094495/programmatically-enable-disable-unix-network-...
Hamza khan's user avatar
0 votes
1 answer
336 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
154 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
657 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
  • 211
0 votes
1 answer
131 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
0 votes
2 answers
366 views

Why is there less latency and jitter when there is additional high bandwidth traffic between two computers with Ubuntu 22.04 installed on them?

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) and I am ...
Nandor Takacs's user avatar
-2 votes
1 answer
260 views

How does a telegram bot work in Linux?

I wrote a simple telegram bot and it works great without conflicting with my firewall. But my question is this, in the firewall I have ports 80 and 443 allowed for my site, but when I write a TCP ...
Djon Doe's user avatar
0 votes
0 answers
336 views

Socat serial to tcp for authorized users

Hello everyone I hope you doing well I have a raspberry pi and I kind need a serial port server which can access from internet Now I use socat command like bellow on my raspberry and from putty on ...
Hamidreza's user avatar
0 votes
0 answers
49 views

ENOSYS (_SIGN 38) while bind() raw socket in MINIX 3

Code Snippet: // Open internal socket int raw_internal_1 =0; raw_internal_1 = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); if(raw_internal_1 < 0){ perror("Error[01]: ...
Reiki Yamya's user avatar
0 votes
1 answer
46 views

EPROTOTYPE (_SIGN 41 ) while creating raw socket() in MINIX 3

The following is my code snippet that is producing EPROTOTYPE error, aka, Protocol Wrong Type for Socket. I checked for the headers in /usr/include in MINIX 3, sys/socket.h contains definitions for ...
Reiki Yamya's user avatar
0 votes
1 answer
116 views

Facing difficulties sending bytes containing white spaces python irc bot

Trying to make a basic irc bot in python (3.9.2) that can response specific commands when invoked. It works although when a response contains whitespace or a space, only the first word gets displayed ...
atheros's user avatar
  • 256
1 vote
1 answer
42 views

IP_MINTTL is not working on raw socket

We are implementing TTL security feature to OSPF. As part of this, We need to validate the incoming ospf packets based on ttl value. For this, we are using IP_MINTTL socket option to validate the ...
Rajesh Girada's user avatar
1 vote
0 answers
148 views

Turn a script do while to a systemctl service to intercept a tcp connection state

I made a little script that refresh browser, when web-server is down and connection is lost, with an infinite loop do/while true. I want to turn it in a service for a better and clean solution. The ...
Alessandro's user avatar
0 votes
0 answers
149 views

is it possible to pipe websocat OR wscat to a php script and echo

The question is about doing computation on live data that arrives via a high speed wss websocket... to show it live on the terminal. When I try to pipe websocat OR wscat to a simple .sh or a .php I ...
John R's user avatar
  • 115
0 votes
0 answers
211 views

SSH or telnet as an unpriviledged user leads to 'socket: Permission denied' error

I'm running a strange 3.0.35 heavily patched kernel on an embedded device (Kobo eReader). Maybe it partly explains this issue.Basically: kobo:/$ ssh root@127.0.0.1 socket: Permission denied ssh: ...
Nicolas Mailloux's user avatar
0 votes
0 answers
334 views

get data from socket on port

I have a specific service that sends data on port 5555. I need to open socket on shell unix to listen on this port and print output on shell. Service is deployed as docker container. So, I run ...
init's user avatar
  • 31
1 vote
1 answer
310 views

Is 2 pipes more expensive than 1 socketpair?

Suppose I want to launch a co-process and attach its standard input and output to the main process, what we have here are 2 options: call pipe(2) and create 2 pipes, and attach them separately to the ...
DannyNiu's user avatar
  • 620
3 votes
0 answers
147 views

Linux: Are sockets always on device 00:08?

After opening up a socket in a C program, I ran fstat on it and printed out the major and minor device numbers. I got a major number of 0 and a minor number of 8. Looking at the Linux kernel ...
Daniel Walker's user avatar
1 vote
0 answers
167 views

dovecot: Force TCP socket disconnect on imap login failure?

I'm running dovecot 2.2.13 under Debian 8. I'd like to force an immediate TCP socket disconnect after any imap login attempt that fails. Right now, if invalid credentials are supplied during an imap ...
HippoMan's user avatar
  • 455
1 vote
0 answers
77 views

XDMCP locally using Unix sockets

Is there any way to start a XDMCP session, say with Xephyr in LightDM, locally through Unix Sockets instead of IP? For performance I was wondering if, somehow, I can avoid any network stack working ...
igorkattar's user avatar
1 vote
1 answer
302 views

websocat / wscat save a new file per seconds

This question is about saving a wss:// stream into multiple files... while execution (NOT AFTER) EXAMPLE : websocat "wss://stream.binance.com:9443/ws/btcusdt@depth" > /path/$(date +%s)....
John R's user avatar
  • 115
0 votes
2 answers
96 views

systemd service file closing socket

I need to run a C++ binary with systemd. When I execute the binary directly or with a bash script it runs fine for days: nohup ./testbinary & ./test.sh test.sh: #!/bin/bash LD_LIBRARY_PATH="...
user523897's user avatar
4 votes
1 answer
2k views

Why is zsh listening on port 22?

I'm SSH'ed into a virtual machine and looking at /proc/<pid>/net/tcp for my zsh shell. I see this line sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid ...
Daniel Walker's user avatar
0 votes
2 answers
44 views

What is the difference between 0.0.0.0:99 and [::]:99?

My ss -lt shows these lines LISTEN 0 4096 127.0.0.53%lo:domain 0.0.0.0:* ...
MarkoGM's user avatar
  • 15
0 votes
0 answers
588 views

Program cannot acquire the capabilities it needs (raw sockets)

Note: This is partly a programming question, but my gut feeling is that this has more to do with the Linux' security capabilities framework in general, hence posting here instead of StackOverflow. I ...
huoneusto's user avatar
  • 131
4 votes
1 answer
481 views

What does SCM mean in unix sockets context (SCM_RIGHTS etc.)?

From man 7 unix SCM_RIGHTS Send or receive a set of open file descriptors from another process. The data portion contains an integer array of the file descriptors. The passed file descriptors ...
deshalder's user avatar
  • 183
1 vote
1 answer
995 views

Clear socket buffer of CAN adapter

I have a USB/CAN adapter, from lsusb: OpenMoko, Inc. Geschwister Schneider CAN adapter it provides a socket interface, from ip addr: 5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast ...
Mark's user avatar
  • 667

1
2 3 4 5
8