Questions tagged [socket]

A socket is an abstract network construct with a sending and receiving side. In most modern operating systems (OS) there are device representations, and programming tools to address sockets.

564 questions
19
votes
4 answers

How do I configure Nginx proxy_pass Node.js HTTP server via UNIX socket?

I am trying to configure a Nginx server to connect to a Node.js HTTP server via a UNIX domain socket. The Nginx configuration file: server { listen 80; location / { proxy_pass http://unix:/tmp/app.socket:/; } } (according to…
pvorb
  • 1,050
  • 3
  • 11
  • 16
18
votes
1 answer

How to expose a UNIX domain socket directly over TCP

I'd like to have a UNIX domain socket, say /var/program/program.cmd for example, exposed via TCP, lets say on port 12345. I'd also like this to be running full time in the background. What's the best way to do this? If its relevant the system is…
SimonJGreen
  • 3,205
  • 5
  • 33
  • 55
17
votes
1 answer

Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0

I'm trying to configure Apache 2.4 for proxying the websocket connection for socket.io to a node.js websocket server, using mod_proxy_wstunnel. We had this working fine with socket.io 0.9, but with the 1.0 release they changed the socket endpoint…
Twipped
  • 643
  • 2
  • 7
  • 10
17
votes
4 answers

Max number of socket on Linux

It seems that the server is limited at ~32720 sockets... I have tried every known variable change to raise up this limit. But the server stay limited at 32720 opened socket, even if there is still 4Go of free memory and 80% of idle cpu... Here's the…
TheSquad
  • 415
  • 1
  • 4
  • 10
16
votes
5 answers

How to set up memcached to use unix socket?

While I could use memcached on Debian to use the default 11211 port, but I've had great difficulty setting up Unix socket. From what I've read, I know that I need to create a memcache.socket and add: -s /path/to/memcache.socket -a 0766 To…
alfish
  • 3,127
  • 15
  • 47
  • 71
16
votes
7 answers

Linux command to wait for a SSH server to be up

I have a script which creates a virtual machine and gives me back an IP address. Then I would like to do something like this: waitforssh 192.168.2.38 && ssh 192.168.2.38 And it will wait for the machine to be up and ssh to be responding, then ssh…
Weboide
  • 3,345
  • 1
  • 25
  • 33
14
votes
7 answers

Nginx + php5-fpm = "File not found"

I've hit a wall whilst setting up a site using nginx / fpm. The page displays "File not found", and this appears in the nginx error.log: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream I'm new to both…
Mathew
  • 287
  • 1
  • 3
  • 9
13
votes
7 answers

Can't connect to MySQL using 'localhost' but using '127.0.0.1' it's ok?

My /etc/hosts file looks like this: 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters I found…
Peter White
  • 586
  • 1
  • 7
  • 17
13
votes
5 answers

linux : netstat listening queue length

Is there a way to view queue length on listening socket under Linux, the same way as netstat -L outputs for FreeBSD? I.e. you can see X/Y/Z in netstat -L output, but netstat under Linux doesn't support -L flag.
Artem G
  • 351
  • 1
  • 2
  • 6
13
votes
5 answers

Does the TCP source port have to be unique per host?

I've learned that a TCP connection is identified by the tuple (source IP, source port, destination ip, destination port). Theoretically, it should thus be possible to have a client from host1:port1 connect to server1:port1 and at the same time…
lxgr
  • 562
  • 2
  • 6
  • 20
13
votes
4 answers

Is it dangerous to change the value of /proc/sys/net/ipv4/tcp_tw_reuse?

We have a couple of production systems that were recently converted into virtual machines. There is an application of ours that frequently accesses a MySQL database, and for each query it creates a connection, queries, and disconnects that…
Sagar
  • 534
  • 3
  • 7
  • 21
12
votes
0 answers

How much does FreeBSD accept_filter actually improve performance in a modern world?

I recently learned about FreeBSD's accept_filter socket option which can allow a worker process to avoid context switching by, for example, waiting until a full HTTP request is received with accf_http: This is a filter to be placed on a socket…
Josh
  • 9,190
  • 28
  • 80
  • 128
12
votes
1 answer

Expose a Unix socket to the host system from inside from a Docker container

I would like to run aweb server inside a Docker container that listens to a Unix socket, instead of to a port. I'm finding a lot of results on sharing the Docker socket, but I don't think that's what I want. I want the host system to be able to…
Drazisil
  • 260
  • 1
  • 2
  • 8
12
votes
5 answers

Sniff UNIX domain socket

I know that some process is writing to a certain unix domain socket (/var/run/asterisk/asterisk.ctl), but I do not known the pid of the sender. How can I find out who is writing to the socket? I have tried with: sudo lsof…
blueFast
  • 4,200
  • 13
  • 37
  • 54
11
votes
4 answers

Siege: descriptor table full sock.c:119: Too many open files

I am trying to make a stress test in my own server using siege with the following command: $ siege -c 500 myweb.com/somefile.php But I get this error: [error] descriptor table full sock.c:119: Too many open files And I get too this…
shakaran
  • 356
  • 1
  • 7
  • 19
1
2
3
37 38