Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [socket]

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

0
votes
0answers
8 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
121 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
46 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
49 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
29 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
43 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
34 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
20 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
35 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
55 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
13 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 ...
1
vote
2answers
110 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
7 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
70 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
42 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
179 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
168 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
96 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
80 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
75 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
51 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
46 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
37 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 ...
4
votes
2answers
278 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
33 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
53 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 ...
3
votes
1answer
67 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 ...
0
votes
0answers
117 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
38 views

What is the IP address of my local interface that is required by IP_ADD_MEMBERSHIP?

In this man page http://man7.org/linux/man-pages/man7/ip.7.html, it is written that IP_ADD_MEMBERSHIP can be used to join a multicast group. We need to provide, as input, in particular, the IP ...
0
votes
1answer
195 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
85 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 ...
0
votes
0answers
102 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
548 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
64 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" "/...
4
votes
1answer
6k 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
94 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 ...
-1
votes
1answer
47 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 ...
5
votes
1answer
2k 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-...
1
vote
1answer
1k 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
111 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 ...
2
votes
1answer
234 views

IPv4 and IPv6 sockets with same port

Is it possible to have a single process that would have two sockets, one using the AF_INET and one using the AF_INET6 families, while both being bound to the same port number, e.g. 20000? If the IPv6 ...
2
votes
0answers
36 views

How to run adb in initramfs?

Seem my hook is work(sometime first run is failed but again run is seem no any library problem), Seem lack socket support in initramfs?my system is debian 9.Seem normal debian system provide socket ...
0
votes
0answers
312 views

Socket Buffer Size and Performance

We want to set our application's socket buffer size from 1500 bytes to 65536 bytes to be generically handle message packet which has larger than 1500 bytes. In this case, will it affect the ...
1
vote
1answer
38 views

WebSocket Protocol stumper [closed]

I am writing an embedded WebSocket server and working directly from the relevant RFC. My server responds properly to the upgrade request from the browser and the browser, in its example javascript, ...
1
vote
0answers
19 views

Regulating user-daemons from listening on unprivileged ports (preventing server spoofing)?

If I have a port >1024 but that I want to reserve to one executable how can I ensure that no other executable can open and listen to a socket on that port? /usr/bin/foo_srv -p 8080 /usr/bin/bar_srv -...
0
votes
1answer
652 views

Socket already in use, but is not listed (mpd)?

Running $ mpd I am prompted with socket: Failed to bind to '127.0.0.1:6600': Address already in use But if I run: $ sudo service mpd start and check its status, I get systemd[1]: Started ...
0
votes
1answer
245 views

How does an OpenVPN tune in all the traffic going into tun0?

First of all, I understand that the kernel routing table makes all the outbound traffic forwarded to tun0. However, they're NOT going to the IP address that the local tun0 interface has (e.g., 10.13....
0
votes
1answer
529 views

Get IP address of socket used by process

given a process Id (that use sockets), I would like to get the IP on socket endpoints. e.g When new SSH session is created, the sshd demon fork process per session. I want to get the IP endpoints ...
0
votes
2answers
264 views

IPTables vs AF_PACKET sockes

I just discovered a security issue, I was reviewing my IP tables rules, and discovered that there was no rule for DHCP traffic (I have DROP-policy for all chains), but I still get IP-address, subnet-...
0
votes
1answer
169 views

systemd service - udp broadcast can't reach other machine

I have a service located under /usr/lib/systemd/system. This service runs the app that i've been developing (.net core 2.0). Same app runs on different machines (centos7 both). They use udp sockets to ...