The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
22 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
25 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
14 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 ...
0
votes
1answer
36 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
48 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 ...
0
votes
0answers
19 views

Select returns immediately on the fd returned by the accept function [migrated]

My question is exactly as it says in the header. It is a traditional server program, where in the main thread I am creating, binding and listening on a socket. Once the socket is created I am waiting ...
-1
votes
1answer
37 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
68 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
0answers
20 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 ...
0
votes
0answers
20 views

Can we add more granular filters in Netlink

I've opened a netlink socket to receive port updates. fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); struct sockaddr_nl sa = { .nl_family = AF_NETLINK, .nl_pad = 0, .nl_pid ...
0
votes
0answers
13 views

Networking, netstat -na, RWind Size Dying?

So I have a windows 7 server setup (TCP) for multicasting outputting some data on the IP: 192.168.1.50:15000. It's just ASCII text that is being updated every second, but it could vary between .5 ...
-1
votes
1answer
45 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, ...
0
votes
0answers
21 views

I want to know how we can reduce the value of total in ss -s command

i have tried everything to overcome with this problem, i have tried the reboot and restart of multiple application but still the value is very High. we have applied the monitoring check on sar -n SOCK ...
1
vote
2answers
134 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
0answers
22 views

Different IP TOS per packet with sendmmsg

I want to use sendmmsg to send multiple IP packet at once. http://man7.org/linux/man-pages/man2/sendmmsg.2.html Is it possible to set different TOS (type of service) for each packet when using ...
0
votes
2answers
23 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
26 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
73 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":...
0
votes
0answers
15 views

Errors uploading files using an ftp client written in C using sockets

I wrote an ftp client in C using sockets, and a convenient API made by hubenchang0515 on GitHub called libftpclient. I followed the demo.c file shown in the repository; when I'm using the put command ...
1
vote
0answers
46 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
123 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....
0
votes
0answers
129 views

How to specify unix socket in nginx config? ( unix: or unix:// )

In the nginx documentation unix: notation is used like unix:/tmp/backend3; http://nginx.org/en/docs/http/ngx_http_upstream_module.html But in puma's documentation unix:// notation is used like ...
-1
votes
2answers
82 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. ...
0
votes
0answers
24 views

Process in Android making UDP connection not registered anywhere

Google gms is listening on a port using UDP protocol but /proc/net/udp does not display the socket neither /proc/pid/fd displays any socket with inode(only anonpipes) anyone knows why this happens? If ...
-1
votes
3answers
519 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
60 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
216 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
149 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
46 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
38 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
24 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
0answers
179 views

How Can I Kill Sockets Related to Services on Localhost?

I am trying to close sockets related to my webserver so the client does not have to refresh the browser twice to connect to the new webserver. I have successfully written a bash script which can ...
0
votes
2answers
82 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 ...
0
votes
0answers
20 views

How to access the floating ip in browser rather than a localhost?

I have an instances that was made in OpenStack which have a floating IP for its instance, the IP for this machine is 10.1.1.164. I tried to forward this instances so it will accessible in my firefox ...
2
votes
2answers
348 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
0answers
10 views

Milter for Sendmail not sending data over socket - very little documentation, any ideas?

I have configured Milter for sendmail on a virtual machine. I can send an email in my test environment, it is currently accepted by Sendmail and relayed to my exchange server (including when I enable ...
0
votes
2answers
91 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
45 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 ...
6
votes
3answers
229 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
262 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. ...
-2
votes
1answer
117 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 ...
2
votes
0answers
305 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
363 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 ...
0
votes
2answers
383 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
140 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 ...
0
votes
0answers
110 views

Listen to specific event types via process netlink connector

I'm authoring a user app that would listen to process events via the process netlink connector. While listening on the socket, my process spends a lot of time doing busy work because of lots of ...
3
votes
2answers
394 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
50 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
102 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
83 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 ...