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.

learn more… | top users | synonyms

10
votes
4answers
18k views

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 ...
63
votes
7answers
86k views

How to forcibly close a socket in TIME_WAIT?

I run a particular program on linux which sometimes crashes. If you open it quickly after that, it listens on socket 49201 instead of 49200 as it did the first time. netstat reveals that 49200 is in ...
6
votes
3answers
9k views

How to automatically restart a service on failure in Linux

On Windows, you can set what should happen if/when a service fails. Is there a standard way of achieving the same thing on Linux (CentOS in particular)? A bigger part of my question is: how do you ...
15
votes
3answers
10k views

What's the difference between Unix socket and TCP/IP socket?

It's from this answer: http://stackoverflow.com/questions/2482411/is-this-pdo-bug-fixed-now/2482424#2482424
17
votes
2answers
8k views

Unix socket vs TCP/IP host:port

Could someone please describe to me the pros and cons of using a Unix socket file vs a tcp/ip localhost:port when setting up services on a server (Ubuntu, FWIW)? In this particular instance it's for ...
4
votes
2answers
6k views

What are the ramifications of setting tcp_tw_recycle/reuse to 1?

I set both tcp_tw_recycle/reuse to 1 in my configuration file. What are the ramifications of doing this? If a tcp socket is re-used, does that pose a security risk? i.e. 2 different connections both ...
7
votes
2answers
5k views

Create Unix Named Socket from the Command Line

Is there a command similar to mkfifo but for domain sockets?
5
votes
3answers
5k views

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 ...
0
votes
3answers
331 views

MySQL Not Turning On

I have an amazon ec2 instance running on the Amazon Linux AMI and its a micro instance. I wanted to install Django onto my server so I entered these commands wget ...
0
votes
1answer
197 views

Subdomains. How do you do development with subdomains?

I am currently building an web app which also utilizes websockets. (Rails for webserver and Nodejs for socket.io) I have structured my application to use subdomains to separate between connection to ...
-2
votes
3answers
124 views

understanding resolv.conf nameserver through system calls [closed]

I am trying to understand how /etc/resolv.conf /etc/nsswitch.conf exactly works and what is significance of nameserver entry 127.0.1.1 I did strace ping google.com to get to know about the system ...
18
votes
5answers
16k views

How to find other end of unix socket connection?

I have a process (dbus-daemon) which has many open connection over UNIX sockets. One of these connections is fd #36: =$ ps uw -p 23284 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME ...
8
votes
1answer
4k views

Apache in linux-vserver won't start, can't create socket

During extensive research and testing to write a proper question worthy of stackexchange I found a solution: rebuild the libapr1 package inside the guest.I thought I'd nevertheless post this ...
2
votes
2answers
8k views

What is the maximum number of socket connections on Linux?

How do I know the maximum number of connections allowed to my Ubuntu server?
1
vote
1answer
5k views

Keep-alive options not working on Linux for an outgoing connection

Does anyone know if Linux supports keep-alive socket options on an outgoing connection? I made an outgoing connection with keep-alive options but netstat --timers shows off (I'm assuming timers are ...
1
vote
1answer
3k views

How to debug troubles with unix domain sockets?

Ubuntu Server 10.04.2 $ uname -a Linux my.local 2.6.32-30-generic-pae #59-Ubuntu SMP Tue Mar 1 23:01:33 UTC 2011 i686 GNU/Linux It seems that my domain socket queue is overflowing, but I can't ...
0
votes
2answers
521 views

Bandwidth Monitor

I am creating a bandwidth quota program in PHP, however I am finding that to create it with PHP is a bit hard. As an example of what I am trying to do, the user can download 10GB per day, and after ...
3
votes
2answers
2k views

How to get a service to listen on port 80 on Windows Server 2003

I've coded a custom windows service that listens on TCP port 80 but when I try to install it on a Windows Server 2003 machine it fails to start because some other service is already listening on that ...
2
votes
1answer
395 views

Why is there a socket interface on the host and a character device interface on the guest for virtio-serial?

I am trying to establish a communication channel between the host and one of its guest virtual machine using kvm as a hypervisor. For this, I am using virtio-serial. To create the virtual machine, I ...
2
votes
2answers
674 views

SELinux prevents Apache from writing to pgbouncer's Unix domain socket

I'm using freshly installed CentOS 5.7 Linux 64 bit with PGDG packages: # rpm -qa|grep -i PG postgresql-libs-8.4.8-2PGDG.rhel5 pgdg-centos-8.4-2 postgresql-8.4.8-2PGDG.rhel5 pgbouncer-1.3.4-1.rhel5 ...
1
vote
1answer
392 views

Access denied to mysql cause by invalid server hostname bind address

I cannot login to mysql using the terminal. [root@fst mysql]# mysql -h localhost -u admin -p Enter password: ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES) I ...
1
vote
0answers
264 views

Suphp connection reset by peer in error logs

In my Linux server's logs I have this record nearly every 5 minutes. I couldn't find the reason for two weeks and I would be very happy if you can recommend me a way to diagnose the problem. It is ...
0
votes
2answers
616 views

mysql error 2002 “cannot connect to socket”

I am having trouble with the server I'm running my trac on. I accidentally had the nightly back up going to the internal hard drive instead of the external. So it filled up, I erased the new files, ...