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
1
vote
1answer
367 views

Can't open ssh connection because max socket reached

I've a VPS and about 100 headless device connected to VPS througth ssh inverse connection. In the last days, the VPS reject ssh connections few minutes after reboot it with this message ...
1
vote
0answers
56 views

init script that run a socket continuously

I run my script(socket) as daemon with init-script : #!/bin/bash ### BEGIN INIT INFO # Provides: sock_serv # Required-Start: $local_fs $syslog $remote_fs # Required-Stop: $...
2
votes
1answer
66 views

Get SELinux permisison list associated with socket base

This shows the permissions associated with the tcp_socket class: > seinfo -c tcp_socket -x Classes: 1 class tcp_socket inherits socket { connectto name_connect ...
1
vote
1answer
544 views

Connections in /proc/[pid]/net/tcp which don't appear in /proc/net/tcp

I'm implementing code to fetch all network connections and associate them with the PIDs using them. Say, for tcp4, for each pid, I'm listing /proc/pid/fd, searching there for links to sockets, ...
0
votes
1answer
584 views

tell tar to ignore sockets - I don't want to see warnings

I have this warning message about sockets with tar: ERRO[0000] Can't add file /home/ubuntu/backup-db/.bunion.sock to tar: archive/tar: sockets not supported how can I tell tar that I don't ...
-1
votes
1answer
148 views

Shell fails to find file descriptor file when `cat`ing it [duplicate]

I created a TCP socket and tried to examine its file descriptor. I can list it without a problem: [/proc/24846/fd]$ ls -al 11 lrwx------ 1 danb danb 64 10-Sep-19 22:58 11 -> 'socket:[38186892]' ...
0
votes
1answer
497 views

Linux gives an ephemeral port that is already used and bind on any interface “::” by the NFS service

I have a Java socket server that was created with ephemeral port (bind with port 0) on "localhost". However, after it is up and running, the netstat shows that there is another process listening to ...
0
votes
1answer
94 views

Get Originating device(physical device) info for Packets trapped on Bridge

Lets assume below given is the set of net devices that my frame is intended to traverse over. eth0(1) -> bond0(2) -> bridge(3) -> vlan100(4). >>> (number) is the ifindex for each netdevice I have ...
-1
votes
1answer
162 views

producer connect to consumer with unix domain sockets

I have this: producer-client | consumer-server the consumer starts a tcp server listening on a unix domain socket (something like that), and the client (the producer) will connect to it. However, ...
1
vote
2answers
674 views

How to create a socket forwarder as a server?

I'm looking for a tool that starts a socket server, and forwards incoming requests on that socket port to another internal one. I found socat is able to forward socket ports in general: socat tcp-l:...
0
votes
2answers
84 views

How can I know what is the binary value I receive in a tcp socket?

in a socket created in the following way: nc -k -l 3111 I receive this message: �...
0
votes
1answer
130 views

delete tmux socket file created with -S after session exit

I create a tmux session and want to share it with a different user. So I start tmux like this: tmux -S /tmp/tmuxshareds new-session -s 'mysession' chgrp tmuxshare /tmp/tmuxshareds This works fine ...
0
votes
1answer
287 views

How can a client talk to another client using unix domain sockets?

Using bash we might have something like this with netcat: nc -lk -U /my/fifo | while read line; do # line => {"client_id":123} done; clients send data like this: echo '{"client_id":123,"data":...
1
vote
0answers
275 views

How to deal efficiently with “Address already in use”?

If I attempt to run my own Python program which listens on a particular port, I may get: socket.error: [Errno 98] Address already in use If the program didn't terminate gracefully. While this may ...
0
votes
1answer
820 views

Systemd socket: listendatagram vs listenstream

In this very nice presentation of systemd the first speaker presents two cases of socket-based service activation. The first unit file corresponds to a tftp socket and it is the following tftp....
-1
votes
2answers
103 views

Client to Client Communication

I need to connect to a Raspberry-pi from an Android, over a long distance (so via the internet). My aim is to switch a controller circuit from a remote location, by using internet and android app. ...
-1
votes
3answers
1k views

How to send literal string over TCP (netcat/socat-like), but provided by command arguments?

If I want to send a string over TCP in a shell environment, I can do something like: echo text | nc 1.2.3.4 9876 Cool. Interactively, that works. Now I want to do this programmatically by spawning a ...
0
votes
1answer
333 views

How can I find out which processes are using or listening on which network interfaces?

ifconfig lists several network interfaces, some of which are virtual ones. How can I find out which processes are using or listening on which network interfaces? Thanks. $ ifconfig docker0: flags=...
0
votes
1answer
920 views

What IP address(es) can't be bound to a listening socket?

What IP address(es) can't be bound to a listening socket? For example, can a server process bind 255.255.255.255 to a listening socket? Thanks.
1
vote
1answer
463 views

Why does postgresql server have a `localhost:57504` to `localhost:57504` UDP “connection”?

$ sudo netstat -ap | grep postg tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres udp 0 0 localhost:57504 localhost:57504 ...
1
vote
1answer
58 views

Why is mysql server accepting nonlocal request, while postgresql server is not?

By default configurations, why is mysql server accepting nonlocal request, while postgresql server is not? $ nmap -p0-65535 192.168.1.97 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-20 14:34 ...
0
votes
0answers
85 views

Why can't `lsof` report some open port's information? [duplicate]

I am running this with the IP address of the same machine: $ nmap -p0-65535 192.168.1.198 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-20 10:13 EDT Nmap scan report for olive.fios-router.home (...
1
vote
1answer
136 views

Is it possible to view the bytes I sent over a network connection?

I'm on Ubuntu 18.04. I'm debugging an application that communicates with a remote server and I'd like to be able to directly view the bytes sent from my machine (rather than relying on debug output). ...
0
votes
2answers
836 views

Is there any way to know how many sockets have been created by a C program?

I have been running a C program which connects to a Redis database every once in a while. After running the program for a few hours it was displaying "Cannot create socket: too many files open". I'm ...
2
votes
2answers
2k views

How many connections can there be between two Unix domain sockets?

From APUE: 17.3 Unique Connections A server can arrange for unique UNIX domain connections to clients using the standard bind, listen, and accept functions. Clients use connect to ...
0
votes
2answers
124 views

Must an application-layer protocol exist for communication between any two programs using sockets?

When any two programs, no matter how simple or complicated, communicate by internet domain sockets (or Unix domain sockets), does it necessarily imply that there is an application-layer protocol ...
1
vote
1answer
48 views

Debian: Cannot access opened port in US from EU

On debian 9 I have opened port 0.0.0.0:18000 using python 3, but I cannot access it from outside (target machine actively refused it). I have no firewalls. I suspected that it might be because I'm ...
7
votes
3answers
462 views

What characterizes a file in Linux/Unix?

What characterizes a file in Linux/Unix? A file can have many types: regular file, directory, symlink, device file, socket, pipe, fifo, and more that I miss. For example, a symlink: $ sudo file /...
0
votes
2answers
546 views

Linux's Internet domain socket, transport protocols (TCP/UDP)'s socket and port

I have been bothered for a long while by some confusions among internet domain socket provided by Linux, transport protocols (TCP/UDP)'s socket and transport protocols (TCP/UDP)'s port. ...
-3
votes
1answer
196 views

Understanding the term “socket” in the Unix/Linux context

I understand that the term "socket" can mean two different things in the Unix/Linux context: A Unix socket; the interface between 2 or more processes. An IP socket; the interface between a process ...
3
votes
1answer
1k views

How do I make systemd sockets close when service is stopped?

I'm currently trying to make a systemd service with two Fifo sockets. These sockets map to stdout and stdin of the application. I'm currently using the following configuration files. foo.service [...
2
votes
1answer
1k views

How is “Forwarding can be also done through Unix sockets” done?

https://zaiste.net/ssh_port_forwarding/#remote-port-forwarding Remote port forwarding is created with -R parameter. ssh -R source_port:forward_to_host:destination_port via_host This command ...
2
votes
2answers
3k views

How can I verify that the port forwarding is established by checking the sockets?

After I run $ ssh -L 9000:google.com:80 testme@localhost how can I verify that the port forwarding is established by checking the sockets (internet and unix domain sockets)? Thanks.
0
votes
1answer
513 views

AIX “rmsock” showing wrong pid listening to a tcp4 port

How to get the real listener PID in AIX 7.1? Shouldn't rmsock work as widely described on the internet? https://www-01.ibm.com/support/docview.wss?uid=isg3T1019570 The case: There is a program that ...
3
votes
2answers
542 views

Does Linux kernel create a file for an Internet domain socket? [duplicate]

The Linux kernel creates a file for a Unix domain socket bound to a pathname. Does the Linux kernel create a file for an Internet domain socket?
1
vote
0answers
164 views

Linux kernel does not handle orphaned sockets, why not?

This was originally posted to serverfault but was voted as off topic by the community. Let me just preface this question by mentioning I understand the why/how/where/when of the Linux kernel socket ...
0
votes
0answers
219 views

How to sniff a socket without using socat?

I would like to do socket sniffing, but I'm wondering what options there to do without using socat? I can't use that command, since it's not already installed (and I cannot install it). I thought ...
2
votes
1answer
114 views

Why doesn't `netstat` show Screen client but only Screen server process?

From https://unix.stackexchange.com/a/485290/674 Further down in the netstat output is UNIX sockets: Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State ...
1
vote
1answer
1k views

Whose `I-Node` does `netstat -ap` for unix domain sockets refer to?

What does I-Node mean in the output of netstat -ap for unix domain sockets? It seems not the same as the inode of the socket file: $ netstat -ap ... Active UNIX domain sockets (servers and ...
0
votes
1answer
539 views

Delay between TCP send and actual write to the NIC

While looking for solution to a problem in socket programming with python described here (In short the problem is: I want my message(~ 25 Bytes) sent by a client over a TCP socket to be dispatched(...
0
votes
1answer
988 views

Problem with find excluding files of type socket when creating tar archive

I am trying to make a tar archive of all files in my /var directory. Naturally, I want to exclude the Unix sockets in there. So I try a command that looks something like: sudo find /var \! -type s ...
1
vote
0answers
541 views

Retrieving the SO_INCOMING_CPU of a UDP Socket?

The socket API provides an SO_INCOMING_CPU option, the details of which are provided in the man page: SO_INCOMING_CPU (gettable since Linux 3.19, settable since Linux 4.4) Sets or gets ...
1
vote
1answer
3k views

When I see a bunch of `write: broken pipe ` errors for a process what does it mean ?

When I see a bunch of write: broken pipe errors for a process what does it mean ? level=error msg="attach: stdout: write unix /var/run/docker.sock->@: write: broken pipe" Does this mean this ...
1
vote
0answers
131 views

Websocket server won't connect if started via PHP

I have a websocket server written in Node. The following instruction, when executed from the command line starts the websocket server successfully: nohup "/root/.nvm/versions/node/v8.11.1/bin/node" "/...
9
votes
1answer
56k views

max no of tcp connections on a linux system

I know that /etc/security/limits.conf provides the persistent soft and hard limits for several values. However, in the relevant list there is no indication about imposed limits on: a) concurrent ...
0
votes
1answer
383 views

How to close one side of a TCP connection leaving other side hanging open? (No FIN or RST sent)

I am trying to recreate a scenario where a Solaris client is connected to a Linux server via TCP socket, but the client side of the connection suddenly goes down without sending sending a FIN or RST ...
0
votes
1answer
723 views

How does bind(2) choose a network device?

Background I'm looking to write kernel-space implementations of a non-IP network protocol and associated network device driver (non-ethernet hardware). I found some resources on developing the ...
12
votes
1answer
16k views

Understanding output of lscpu

You can see the output from lscpu command - jack@042:~$ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 56 On-...
2
votes
1answer
5k views

Cannot access MySQL Database - PID file could not be found

I am using a Linux Server from GoDaddy, and without any known reason, PID file could not be found! These are the errors I got: # mysql ERROR 2002 (HY000): Can't connect to local MySQL server through ...
1
vote
0answers
407 views

Increase buffer size of Unix domain datagram socket in systemd unit file

I use Unix domain datagram socket for unidirectional daemon communication. Process writing to the socket may get blocked on write(), at some peaks of computation, because reading process takes more ...

1
2
3 4 5
7