The tag has no wiki summary.

learn more… | top users | synonyms

57
votes
7answers
69k 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 ...
11
votes
3answers
8k views

Sockets found by lsof but not by netstat

I have an application which is running out of file descriptors, apparently by opening sockets, but I can't find out exactly what these sockets do. These appear in the lsof output as java 9689 ...
10
votes
4answers
14k 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 ...
8
votes
6answers
12k views

How to force MySQL to connect by TCP instead of a Unix socket?

I would like to analyze mysql traffic. Right now, all mysql requests are sent to the MySQL unix socket: unix 2 [ ACC ] STREAM LISTENING 3734388 15304/mysqld ...
8
votes
4answers
625 views

how to measure MB/sec on specific socket

We have a web tier where once in a while a web node will slam our data nodes(plural) and if we could see the MB/second coming into that machine on all sockets or on individual sockets, we could ...
8
votes
3answers
2k views

Can I make TCP/IP session to run less than 60 seconds?

Our server is overloaded with TCP/IP sessions, we have 1200 - 1500 of them. Most of them are hanging in TIME_OUT state. It turns out that a connection in TIME_OUT state occupies a socket until 60 ...
8
votes
4answers
9k views

Network Error: no buffer space available

After some time of running fine, one of our Windows XP SP3 machines does not open some(!) new TCP/IP connections anymore. Putty says Network Error: no buffer space available, IE won't open any new ...
7
votes
5answers
10k views

What should mysqld.sock contain, why don't I have it?

Does anyone know why my /var/run/mysqld/mysqld.sock socket file would not be on my computer when I install (or reinstall) MySQL 5.1? Right now, when I try to start up a server with mysqld, I get ...
7
votes
3answers
322 views

Should a web server care about IPv6 compatibility?

Are there any IPv6 clients in the real world? If not, is there any other reason to support IPv6? (My understanding is that with the advent of WANs and such IPv6 is not necessary, hence extremely low ...
6
votes
5answers
1k views

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 ...
6
votes
5answers
3k views

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

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 ...
5
votes
5answers
3k views

Forward local port or socket file to remote socket file

Quick question - I run two linux boxes, one my own desktop and the other my VPS. For security reasons on the VPS end I opted for socket connections to MySQL (/var/run/mysqld/mysql.sock). I know I can ...
5
votes
1answer
3k views

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 ...
4
votes
4answers
6k views

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 ...
4
votes
2answers
5k 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 ...
4
votes
1answer
316 views

How to check if a process is non-blocking in linux without using a stack tracer?

A multi-cpu server is running several processes. One process has a thread that should always be in a spinning state, using 100% of the CPU it's been assigned. My current method (besides asking the ...
4
votes
4answers
2k views

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 ...
4
votes
2answers
468 views

Are serial-to-ethernet adapters interchangeable?

I need to get data from a serial device (a weather station) over our network where it'll be processed by a Unix host (using custom software). I was able to compile remserial which makes the remote ...
4
votes
1answer
311 views

Is there a way to show list of all open sockets on a Windows server and the socket properties?

We are using a third party library in one of our applications. We would like to find a tool which will list all of the open sockets on the machine AND give us the ability to see the various TCP ...
4
votes
1answer
2k views

TCP Windows Size vs Socket Buffer Size on Windows

I am new to Windows networking. When people talk about TCP tuning on Windows platform, they always mention about TCP Window Size. I am wondering whether Windows uses the concept of "Socket Buffer ...
3
votes
2answers
2k views

Nginx to apache reverse proxy, instruct use of unix sockets

My Nginx reverse proxy works on the same machine as the webserver(apache) as follows server { server_name site.net; location / { proxy_pass http://localhost:82; ...
3
votes
2answers
5k views

Exhausting Linux machine TCP socket limit (~70k)?

I am the founder of torservers.net, a non-profit that runs Tor exit nodes. We have a number of machines on Gbit connectivity and multiple IPs, and we seem to be hitting a limit of open TCP sockets ...
3
votes
2answers
1k views

linux : netstat listeting 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 ...
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 ...
3
votes
1answer
5k views

Killing CLOSE_WAIT sockets without killing parent process on Linux

Tomcat is leaving me with CLOSE_WAIT sockets which ultimately saturate the maximum number of connections. I've tried many methods in my client and server code to get rid of these to no avail, ...
3
votes
1answer
925 views

Sharing unix socket via docker volume - permission denied

I try to share my php5-fpm socket via a volume with my nginxwebserver. Fpm and nginx are running if different containers and I want to get them working via a shared volume where I place the socket ...
3
votes
2answers
3k views

Apache will not start in Ubuntu 12.10: no listening sockets available

I'm not able to start the fresh apache2 installation on my development machine running Ubuntu 12.10. michal@ubuntudesktop:~$ sudo service apache2 start * Starting web server apache2 no listening ...
3
votes
1answer
320 views

Forward socket to multiple ports

I have two network servers I'd like to test in parallel using live data. I'd like to have something listen on port A and forward the traffic to both port B and port C. The data stream in inbound only ...
3
votes
1answer
249 views

Use Nginx callback after x-accel-redirect response (or use logging to socket)

my workflow is following: accept request with ruby script do some stuff send x-accel-redirect header and return ... client receives data ... client disconnected <- here I would like to run some ...
3
votes
0answers
116 views

timing issue after route add/delete (route not used)

I have an application that is running a raw IP socket, destination of this socket is governed by routes installed via the 'ip route add' command. These routes can change during the lifetime of a ...
3
votes
0answers
308 views

mysql client slow login strace

I am experiencing an issue with slow connections/logins to a loaded mysql server, even when connecting via the unix socket file (CentOS 6.3). Queries are completing very quickly -- (0.00 sec) in this ...
3
votes
1answer
626 views

Where are my TIME_WAITs on Mac OS X?

No TIME_WAITs on Mac OS X Normally, when a TCP connection is closed, the socket on the side where close() is called first is left in the TIME_WAIT state. When one of the peers is a Mac OS X (Lion) ...
3
votes
1answer
512 views

Socket.io Flashsockets over HTTPS

We’re trying to get Socket.io flashsockets to work in Internet Explorer 9 over HTTPS/WSS. The flashsockets work over HTTP, but HTTPS is giving us problems. We’re using socket.io version 0.8.7 and ...
2
votes
2answers
7k 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?
2
votes
1answer
2k views

Which permission is needed to open a TCP server socket on Linux?

I want to start a websocket server, but can't connect to it from other machines. Only when I start the websocket server with root permissions it works. So this seems to be an permission Problem. ...
2
votes
1answer
70 views

hosting people asking for my account username and password to enable curl and socket function only for me

I have hosted my site in a shared environment. My hosting people disabled socket function all together. and they said that we can enable only for you if i given a written statement. I did but they ...
2
votes
1answer
411 views

Folder disappearing from /var/run upon reboot with Ubuntu 12.04

I'm running php5-fpm on Ubuntu using a UNIX socket at /var/run/php5-fpm/www.conf.sock. During the installation I have created manually the php5-fpm folder inside /var/run/ so that php5-fpm could ...
2
votes
1answer
87 views

Host information with TCP port

Forgive this question, I'm a designer trying to get my head around a possible network architecture. I have a wildcard domain on example.com. The client connects via TCP to foo.example.com:1234. Is it ...
2
votes
2answers
259 views

WebSocket Connection vs. Repeated GETs

I am prototyping an application using nodejs. But this question refers to hypothetical large scale roll out. What is more demanding on a server and/or bandwidth: WebSocket stay alive connections or ...
2
votes
2answers
1k views

I can't run uwsgi as normal 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 ...
2
votes
1answer
125 views

UDP Socket bound to one IP?

Say I have two hosts - Using fictitious IPs for this example, say host A has IP 1.1.1.1. host B has two IPs - 2.2.2.2 and 2.2.2.3. If host B is listening on port 8888, and sees a packet come in from ...
2
votes
1answer
880 views

TIME_WAIT consumes file descriptors?

In many TCPIP and Web tunning guide, recommends increasing max number of file descriptors when getting the error "Too many open files" but, i can't see TIME_WAIT in outputs of "lsof -i" Does anyone ...
2
votes
2answers
269 views

.NET 2.0: An established connection was aborted by the software in your host machine

Scenario: I try to post a video to YouTube with the following code: YouTubeEntry createdEntry = service.Upload(newEntry); This works fine on my developer machine (running Windows XP). It fails on a ...
2
votes
1answer
623 views

Linux: Determining memory used by all connected socket send buffers

Is there a way, on Redhat Linux, to determine the total amount of "real" memory that is being allocated to the send buffers for all currently connected sockets? I am troubleshooting a potential ...
2
votes
2answers
55 views

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 ...
2
votes
1answer
312 views

SElinux label for php-fpm sockets

I'm attempting to set up multiple instances of php-fpm to run multiple versions of php through apache 2.2 running on centos 6.5. At some point in the future this will end up in a shared hosting ...
2
votes
1answer
900 views

Tuning tcp_keepalive_time for Node.js leak

I'm currently having a socket leak with my Node.js application. This bug is also posted here. I hope to fix this soon. CLOSE_WAIT and FIN_WAIT2 seem to be the major problem. Connections: 1662 ...
2
votes
1answer
653 views

nginx does not close socket

ngnix is not closing the socket after the connection finishes. I've googled and can't come up with anything to will tell nginx to close this connection, other than what I have below: ...
2
votes
2answers
709 views

ssl offloader for websockets

im looking for a proxy which supports a massive load (like nginx or haproxy) and can handle websockets and ssl. i know only nginx which does not support websockets and haproxy which doesnt support ssl ...