Skip to main content

Questions tagged [sockets]

A communication end-point for networking, for CPUs please use [processor-socket]

Filter by
Sorted by
Tagged with
232 votes
7 answers
316k views

Allow non-root process to bind to port 80 and 443?

Is it possible to tune a kernel parameter to allow a userland program to bind to port 80 and 443? The reason I ask is I think its foolish to allow a privileged process to open a socket and listen. ...
jww's user avatar
  • 12.2k
148 votes
15 answers
678k views

Manually closing a port from commandline

I want to close an open port which is in listening mode between my client and server application. Is there any manual command line option in Linux to close a port? NOTE: I came to know that "only ...
user avatar
124 votes
2 answers
127k views

Can cURL send requests to sockets?

I have a HTTP server running at /var/run/my-server.sock, and I want to test it by sending a simple request using cURL. Can this be done using cURL? Can it be done at all, or must there be a reverse ...
Hubro's user avatar
  • 5,826
93 votes
6 answers
93k views

Can I monitor a local unix domain socket like tcpdump?

I'd like to monitor responses on a unix socket without disturbing the original connections and pipe them to a script for processing. I know how to do this with tcpdump for tcp connections but I ...
ck_'s user avatar
  • 1,905
68 votes
2 answers
25k views

Why was port 80 chosen as the default HTTP port and 443 as the default HTTPS port?

Why was port 80 chosen as the default HTTP port and 443 as the default HTTPS port? Is there a reason or was it is just defined that way?
Samuel Alexander's user avatar
43 votes
3 answers
66k views

Linux named sockets howto

I know that there are named sockets & named pipes (fifo) in Linux. In ls -l, they would look as below: (I have changed the filenames, for demonstration.) prw-r--r-- 1 root root 0 Nov 8 16:31 /...
anishsane's user avatar
  • 905
36 votes
6 answers
57k views

How to determine the socket connection up time on Linux

I can verify that the connection is up: $ netstat -tn | grep "192.168.2.110" tcp 0 0 192.168.2.100:10444 192.168.2.110:52639 ESTABLISHED is there a way to check how long this tcp port connection ...
hidralisk's user avatar
  • 463
22 votes
1 answer
64k views

What is the simplest way to test a plain socket server

I have a server which listens on a socket for incoming connections and outputs a welcome text ("Hello world"). What is the simplest way to test this with plain tools from the operating system (here OS ...
Mike L.'s user avatar
  • 5,797
22 votes
1 answer
53k views

how to view haproxy status on the command line using a socket

In the examples, I have seen on the net https://www.datadoghq.com/blog/how-to-collect-haproxy-metrics/#show-me-the-metrics You can use the command line echo "show stat" | nc -U /var/lib/haproxy/...
nelaaro's user avatar
  • 13.7k
19 votes
3 answers
32k views

Difference between localhost and the ip address

If bind a socket in Python to localhost,8200 this is accessible via http://localhost:8200/. but not http://x.x.x.x:8200/ If bind a socket in Python to x.x.x.x,8200, machinename,8200 this is ...
David's user avatar
  • 400
16 votes
1 answer
15k views

How to expose Linux socket file from Docker container (MySQL, MariaDB, etc.) to host

Disclaimer: I am not looking for a way to configure MySQL/MariaDB to use TCP connections. I am aware of that option and the question is not about that aspect. I am having trouble binding a socket ...
Torque's user avatar
  • 379
14 votes
3 answers
7k views

Does Windows take care of closing sockets when processes exit?

I've read up this question about Linux, Can a port be bound when the process has terminated? Linux appears to clean up after processes exiting, and leaving open sockets. I was wondering if there's any ...
Simone's user avatar
  • 242
14 votes
3 answers
9k views

Determining what process has bound a port (without listening) on Windows

If I want to find out what process is listening on what socket, I can use netstat/TCPview and will immediately see it. However, it is possible to bind to an address without listening. If this is done, ...
Jan Schejbal's user avatar
  • 1,132
14 votes
2 answers
52k views

Connect a M.2 (B & M) key SSD into a B socket

I have bought a SSD with M.2 socket (B & M) key, but my computer just have a B key socket. My question is if I can connect the SSD in this B socket, and would it work correctly?
kimo pryvt's user avatar
13 votes
1 answer
4k views

How does the OS tell whether an "Address is already in use"?

If my C program uses sockets, binds to localhost:9025, exchanges some data, gets manually killed and restarted, it sometimes crashes with the error being: Address already in use. All SE-...
Captain Trojan's user avatar
12 votes
1 answer
7k views

Is sharing a tmux sockets between hosts possible?

I'm wondering if it's possible to share a tmux server socket between different hosts. For example, I have a virtual machine (guest) running inside my host, and I'm running a tmux session in the guest, ...
EnToutCas's user avatar
  • 243
12 votes
4 answers
13k views

sshfs mounting linux directory from mac stopped working

Until this morning, I'd been using sshfs quite nicely to mount a directory from a linux machine in my office. Today, it stopped. Here's my sshfs command: sshfs -osshfs_sync,volname=linux-builder3 ...
Carl Norum's user avatar
  • 2,373
10 votes
2 answers
2k views

What is non-networked Unix domain socket?

I am reading Unsecured docker daemons revealed It says Docker daemon creates a non-networked Unix domain socket at /var/run/docker.sock What does non-networked Unix domain socket denote?
MikiBelavista's user avatar
10 votes
1 answer
5k views

Tell GNU screen where to save the sessions?

My GNU screen stores its sessions in the /tmp directory. That means that after a reboot, all sessions are lost: $ screen -list No Sockets found in /tmp/uscreens/S-dehmann. How can I tell it to ...
dehmann's user avatar
  • 2,323
9 votes
1 answer
5k views

Does Mac OS X throttle the RATE of socket creation?

This may seem programming related, but this is an OS question. I'm writing a small high performance daemon that takes thousands of connections per second. It's working fine on Linux (specifically ...
pbhogan's user avatar
  • 193
8 votes
1 answer
7k views

Given that tar ignored my 2 sockets, how do I backup and then restore my login folder?

I did a network backup of my login area in preparation for reformatting the volume in which it resides to make it bootable on my old Power Mac G5 running the very latest release of Leopard. Though ...
Billy McCloskey's user avatar
7 votes
2 answers
1k views

Is it possible to interchange these two sockets since the cables in the wall look the same?

My Ethernet socket isn't working and I'm convinced it has to do with either the socket itself or the cable behind the wall. This picture of my wall sockets (the left the Ethernet socket, the right a ...
J. Schmidt's user avatar
7 votes
1 answer
21k views

Force socket close

Is it possible to close an established socket connection in Windows "manually" (e.g. using a command prompt tool)? I have several open sockets connected to a listening server, I can see them using ...
vgru's user avatar
  • 1,146
7 votes
3 answers
11k views

Is it bad practice to listen on 0.0.0.0? Why?

Say I want to deploy a software that acts as a server and I want to avoid scenarios where interfaces are replaced, IP addresses are changed, etc. The nature of the environment in which this software ...
johnildergleidisson's user avatar
7 votes
2 answers
4k views

Remote listening of UNIX sockets

I'd like to be able to remotely listen to UNIX sockets in order to make programs such as dtach, which only support listening to UNIX sockets, work remotely. I've read about socat and how it's able to ...
moo's user avatar
  • 1,117
7 votes
1 answer
3k views

What is this socket/port/connector on my laptop? [duplicate]

I've have this socket on my laptop (Lenovo Z570). What is this port and what is it used for? And what does that symbol mean (I expected a LOCK symbol)?
Ragav Ssr's user avatar
6 votes
1 answer
41k views

socket.error: [Errno 10013] Port forbidden access permissions

When trying to use a Python script I get this error: socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions I put the post on ...
user1494941's user avatar
5 votes
5 answers
16k views

What is the difference and relationship between a process id and a port number?

Process is a program in execution. E.g. Firefox. I don't understand the relationship and the differences between the terms "process" and "ports". When I run netstat -no -p -TCP on cmd I can see ...
user570593's user avatar
5 votes
1 answer
1k views

Does TCP/UDP send file sequentially or randomnly?

Does TCP/UDP protocol always send or receive file packets sequentially? Would it possible to make a choice which data packets will be sent first using sockets API?
user9441231's user avatar
5 votes
2 answers
2k views

Linux localhost sockets painfully slower than on Mac

This question is based on this thread over at OpenOffice. I'm using Python and the Office UNO bridge to analyze documents. For the most part I run on my Mac and spin up an office instance to listen ...
Jens's user avatar
  • 103
5 votes
2 answers
9k views

Where to put Unix sockets?

I am new to this, so sorry if its obvious. I am running a Debian server and installing the likes of UWSGI, Nginx etc on there. The configurations keep talking about pointing to "sockets". In ...
J.Zil's user avatar
  • 267
5 votes
1 answer
619 views

No-socket alternative to tmux or screen

My university gives each student a directory on their AFS which is accessible via SSH. There is a (light) CLI-driven piece of software that I would like to run continuously from the university. I ...
Christian Chapman's user avatar
5 votes
1 answer
4k views

How do I run mysqld as a regular non-daemon program?

I'd like to run a local copy of mysql, to keep software development environments isolated. However, I can't seem to get the mysqld server to start up. I've created a database directory with ...
Justin Love's user avatar
  • 1,006
5 votes
1 answer
3k views

How to list socket options of running processes?

Is there a convenient way (e.g. a readily-available command or a program that I can write using standard system calls) to list socket options (e.g. TCP_NODELAY) of an open TCP socket of some running ...
Syncopated's user avatar
5 votes
2 answers
6k views

Data retransmission and WSAECONNABORTED (10053) socket error

Say I have two sockets that are connected to each other (Socket A and Socket B). If the computer that have Socket B is unplugged from power, then if Socket A tries to send some data to Socket B, the ...
user455236's user avatar
5 votes
1 answer
2k views

How does SSH tunneling work at low level?

I am interested in the exact mechanism that occurs when an SSH tunnel is stablished. Supposing we have 3 computers: LOCAL host, INTERMEDIATE host, and REMOTE host, with this topology: Localhost --- ...
Mr.Eddart's user avatar
  • 153
5 votes
1 answer
3k views

Bridging two sockets

I wondered if it is possible to bridge two incoming tcp sockets. For example: Client A -----> Server <----- Client B The the server sends it's magic to both clients and then they connect to ...
Itay Grudev's user avatar
5 votes
1 answer
3k views

How to free a port on OS X when lsof(1) reports that it is not in use

I am a developer working in OS X on Eclipse. A bug I have been working to fix in a web application results in some very strange behavior when resetting an instance of Tomcat, resulting in the ...
javanix's user avatar
  • 1,239
4 votes
1 answer
2k views

Where is "unix:abstract=/tmp/dbus-KtyPDgWNin" socket file saved?

I try the following: roroco@roroco ~/Dropbox/rbs/ro_cmds $ echo $DBUS_SESSION_BUS_ADDRESS unix:abstract=/tmp/dbus-KtyPDgWNin,guid=ca3ea893cf45d42ef60e74d0545d84f6 But when I want to list this socket ...
zizhuo64062kw's user avatar
4 votes
5 answers
27k views

How to determine why port 443 is already in use?

I'm running Apache 2.4.10 on a Windows 7 machine and am trying to add SSL connections. Port 80 connections work fine, and I'm trying to add port 443. When the httpd.conf gets Listen 443 added it ...
WilliamKF's user avatar
  • 7,978
4 votes
2 answers
18k views

TCP: Maximum number of connections (client and server)

In the description of TCP in the Wikipedia, it is stated that The number of sessions in the server side is limited only by memory and can grow as new connections arrive, but the client must ...
lxgr's user avatar
  • 1,311
4 votes
1 answer
5k views

How can I know what is preventing my socket to bind to localhost:50060-50959

I am using this Python code to listen to a port on my Windows 10 system: import socket for port in (50059, 50060, 50959, 50960): try: print(socket.socket(socket.AF_INET, socket.SOCK_STREAM)....
bers's user avatar
  • 1,718
4 votes
1 answer
11k views

What do Intel's socket package specifications mean in detail?

What is the difference between FCPGA988 PGA988 rPGA rPGA988B BGA1224 FCBGA1224 Do some mean that the BGA is soldered to the board and cannot be removed? BGA is soldered versions only, right? What ...
De coder's user avatar
4 votes
1 answer
4k views

What is the default range of Ephemeral Ports in Windows 7?

I used the following command to get the Ephemeral Ports range in Windows 7: netsh int ipv4 show dynamicport tcp And the result was the following: Protocol tcp Dynamic Port Range --------------------...
user607038's user avatar
4 votes
1 answer
925 views

What happens when I terminate a process and the socket send buffer is not empty?

In Windows (and probably in other operating systems), if a process has a TCP connection with another process on another machine, and then I terminate the process, an RST packet will be sent to the ...
user424014's user avatar
4 votes
1 answer
2k views

SocketSniff equivalent for 64-bit applications

SocketSniff allows you to watch the Windows Sockets (WinSock) activity of the selected process. On x64 version of Windows, SocketSniff can only work with 32-bit programs. Is there any SocketSniff ...
Ohad Schneider's user avatar
4 votes
0 answers
8k views

Can't connect to socket listening on 127.0.0.1 but works for 'localhost' in Windows 10

I have a clean install of Windows 10 Pro x64 and I’m trying to run PostgreSQL server on it. It used to work perfectly on Windows 7, but Windows 10 is behaving really weird: If I configure PostgreSQL ...
extesy's user avatar
  • 41
4 votes
1 answer
2k views

How do I troubleshoot if I see the incoming packet in tcpdump, but not at the socket?

For example, I see that the incoming packet in tcpdump, but not in strace for the program that is listening the appopriate socket. How do I trace the "fate" of this incoming packet on Linux? I ...
Vi.'s user avatar
  • 17.3k
3 votes
3 answers
1k views

How does HTTP Keepalive handle multiple requests along with EOF from same origin?

says a client has multiple files to post to a server via HTTP Post method, there will be two api calls. since I don't want to create two TCP connections and I want to reuse TCP connection, so I use ...
user22155685's user avatar
3 votes
2 answers
32k views

How to communicate between two VirtualBox VMs running on same host

I am running two VM instances of RHEL/CentOS on my VirtualBox instance running on host Windows 7. The problem is when I am executing VBoxManage list vms -l | more and then sunsequently VBoxManage ...
somnathchakrabarti's user avatar

1
2 3 4 5 6