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
6
votes
3 answers

MySQL Daemon Lock issue

Last night, my MySQL server went down unexpectedly. On attempting to restart (with service mysql restart - I'm root) it merely hangs. With the mysql -u root -p command, I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket…
SamboyCoding
  • 171
  • 1
  • 1
  • 5
6
votes
2 answers

Directory for PHP 5 FPM socket files is deleted after reboot on Ubuntu Server

I've created a directory to store socket files for PHP 5 FPM: sudo mkdir /var/run/php-fpm. It is owned by root:root as well as core PHP FPM process. When PHP FPM is starting, it creates socket files for each pool inside of this directory and nginx…
Slava Fomin II
  • 1,701
  • 4
  • 17
  • 23
6
votes
0 answers

How to deploy a WebSocket application without downtime?

Deploying HTTP applications without downtime isn't that hard: HTTP is stateless, so with a load balancer in front of 2 HTTP applications solves the problem. If both applications use a common backend to handle the sessions, everything turns out…
6
votes
2 answers

Why would a client send a RST packet as reply to a SYN,ACK?

I have a HTTP webservice where sometimes the connection setup fails in a strange way: client sends a SYN packet server sends a SYN,ACK reply client responds with RST In which situations could a client system decide to reply with RST packet? I…
oliver
  • 405
  • 1
  • 7
  • 18
6
votes
2 answers

I can't run uwsgi as regular user

I want to run uwsgi server as www user, but if I write: uwsgi --socket $SOCKET --chmod-socket 666 --pidfile $PIDFILE --daemonize $LOGFILE --chdir $CHDIR --pp $PYTHONPATH --module main --post-buffering 8192 --workers 1 --threads 10 --uid www --gid…
atomAltera
  • 189
  • 1
  • 2
  • 7
6
votes
3 answers

Can haproxy be used to balance unix sockets?

In nginx it is fairly simple to configure it to proxy unix .sock files Eg: upstream bla { server unix:///home/sam/Source/bla/tmp/sockets/thin1.sock; server unix:///home/sam/Source/bla/tmp/sockets/thin2.sock; } Is there a similar…
Sam Saffron
  • 1,979
  • 3
  • 18
  • 27
6
votes
2 answers

Linux web servers that support websockets?

I'm currently having a lots of difficulties trying to play with socket.io which needs websockets support from the server (reverse-proxying). I was wondering, is there any other web servers out there that supports websockets? The errors I'm having…
Tommy B.
  • 1,413
  • 2
  • 14
  • 14
6
votes
5 answers

Is there still a reason why binding to port < 1024 is only authorized for root on Unix systems?

On Unix systems, binding to tcp port < 1024 from a process without root privileged is denied. What was the initial reason and is it still valid ? For example http server don't need root privileged to serve html page. What process/protocol a Unix's…
Franck
  • 163
  • 1
  • 4
6
votes
3 answers

Does having a load balancer allow you to re-use socket connections?

I have a service where servers upload 20kb xml files to my server. There is no session, it is a single POST request and that's it. Each individual request is authenticated based on the contents of the xml file. There are socket related tweaks that…
user1361315
  • 211
  • 2
  • 6
6
votes
1 answer

Apache2 No Listening Sockets, unable to open logs while trying to configure virtual hosts

I'm trying to set up multiple domains with virtual hosts in Apache2. I'm currently getting a "Could not connect" error when I try to browse to my site, and whenever I try to restart Apache2, I get an error about "no listening sockets available,…
Ana
  • 63
  • 1
  • 1
  • 3
6
votes
3 answers

nginx not able to connect to php-fpm socket

I setup a system similar to the tutorial here. I'm having issues with nginx connecting to the php5-fpm socket, but from what I can tell the permissions on the socket are correct... can you give me a hand? 2011/04/14 15:31:24 [crit] 13147#0: *1…
zeroasterisk
  • 275
  • 1
  • 4
  • 10
6
votes
1 answer

Is it possible to close a socket with a shell command?

Is it possible to close a socket by using some sort of shell command/program? I've seen plenty of examples of manipulating sockets using C and other languages but have been unable to find a program dedicated to it. This is mostly out of curiosity…
Jason Axelson
  • 334
  • 1
  • 5
  • 17
5
votes
1 answer

What are sockets with bound state on 0.0.0.0

I know a listening socket on 0.0.0.0 is listening on all IPv4 interfaces. But we also see a lot of 'bound' stockets on 0.0.0.0, if we check with Get-NetTCPConnection in powershell. All on high port numbers (63000+) with a both local and…
5
votes
0 answers

What SELinux type should I apply on my Unix socket?

I have a Gunicorn socket file: /opt/rtd/gunicorn/run.sock. I need nginx to be able to open this socket and write to it. When I run sesearch --allow -s httpd_t | grep unix_stream_socket I noticed that httpd_t is allowed to connect to sockets of type…
Christoffer Reijer
  • 417
  • 1
  • 4
  • 16
5
votes
3 answers

dnsmasq: failed to create listening socket for port 53: Address already in use

I got this error when i done the setup dnsmasq. ashokkrishna@krishna:~$ sudo dnsmasq dnsmasq: failed to create listening socket for port 53: Address already in use ashokkrishna@krishna:~$ netstat -lpn | grep :53 (Not all processes could be…
ashok
  • 229
  • 2
  • 4
  • 10