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.

Filter by
Sorted by
Tagged with
4 votes
2 answers
8k views

nginx proxying websockets, must be missing something

I have a basic chat app written in node.js using express and socket.io; it works fine when connecting directly to node on port 3000 But doesn't work when I try to use nginx v1.4.2 as a proxy. I ...
CodeMonkey's user avatar
4 votes
1 answer
4k views

Maximum limit of filepointer in php reached and not changeable

I have a server with the current 5.3.x version installed. Since we are running a really simple and small server in php using sockets, that connects to a lot clients using sockets we need to raise the ...
mlaug's user avatar
  • 202
4 votes
1 answer
2k 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 ...
Benjamin Peikes's user avatar
4 votes
0 answers
659 views

How to find out which kernel module opened a socket?

When I try to find the process for an opened socket using e.g. ss I get the following output: ❯ sudo ss -tulpen Failed to open cgroup2 by ID Failed to open cgroup2 by ID Netid State Recv-Q Send-Q ...
sneusse's user avatar
  • 141
4 votes
0 answers
4k views

rails server using nginx + puma on ubuntu - suddenly get socket connect failed errors

I have ran jruby on rails in AWS ubuntu trusty 14.04 configuration. my server was going well during several hours. but suddenly get socket connect failed error. -nginx error.log 2016/03/12 10:12:10 [...
mjkim's user avatar
  • 141
4 votes
1 answer
3k views

SSL - Apache and Node.js on the same Amazon EC2 instance

I hosted my website on an EC2 instance, using Apache. SSL was also set up properly, running on HTTPS, port 443. Currently, I just added a chat application to the website using Node.js + socket.io. ...
Danh Nguyen's user avatar
4 votes
0 answers
2k views

Can nginx set 'Origin' header when proxing websocket?

We know nginx can proxy WebSocket since version 1.3.13, and we also know some times WebSocket server will valid the 'Origin' header, so someone said you can do something like: proxy_set_header Origin ...
pingz's user avatar
  • 213
4 votes
0 answers
10k views

Nginx websocket 502 bad gateway

I'm trying to use nginx as proxy for websocket nodejs server, but I'm always getting 502 bad gateway. my domain config: upstream server { server 127.0.0.1:8090; } server { listen 8085; ...
zajca's user avatar
  • 203
4 votes
0 answers
866 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 ...
carillonator's user avatar
4 votes
1 answer
4k views

Set up websocket server on Amazon Linux AMI using Node.js

I have been having issues for a few days trying to set up a simple websocket server on an Amazon EC2 instance. I am using a micro instance of Linux. After booting up for the first time, I updated all ...
brodney's user avatar
  • 143
4 votes
2 answers
9k 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 ...
Alexander Gladysh's user avatar
3 votes
2 answers
15k 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?
par's user avatar
  • 1,263
3 votes
2 answers
244 views

how does an OS route messages sent to the same port to different sockets?

This is something I've never quite understood: A service offered by a server can be uniquely identified by its IP address and port, for example 1.2.3.4:22, but multiple clients might connect to the ...
Stephen's user avatar
  • 134
3 votes
1 answer
7k views

Speed up mongodump+mongorestore

I have created a script to copy a MongoDB database to my machine. I am creating an SSH tunnel (ssh -L ...) then I connect to the tunnelled port with mongodump then I pipe its output to mongorestore: ...
warvariuc's user avatar
  • 368
3 votes
2 answers
3k views

source address with iptables port forwarding

I set up port forwarding for port 80 with iptables: iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 10080 Additionally, I have ip forwarding enabled to route connections ...
user1247196's user avatar
3 votes
2 answers
22k views

How does server handle multiple clients on the same port? Multiple sockets or multiple ports? [closed]

I have a misundertanding about some networking theory and because I couldn't find a definitive answer online (most resourceas are theory and theory etc without concise examples) I'm asking here. ...
john-13-14's user avatar
3 votes
3 answers
4k views

What is the linux command to find out the number of socket currently open?

I use that : sudo watch lsof -i -4 -a -P and it returns a list. how to get the count? I tried this but doesn't work. sudo watch lsof -i -4 -a -P | wc -l
seatoskyhk's user avatar
3 votes
1 answer
10k 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. ...
K..'s user avatar
  • 133
3 votes
3 answers
8k views

Apache load balancer for mod_proxy_wstunnel?

We are in the process of developing a JavaEE 7 application to be deployed on JBoss/Wildfly that will make extensive use of Web Sockets. We're using mod_proxy_wstunnel for web socket support, and we'...
Shadowman's user avatar
3 votes
1 answer
24k views

Lots of TIME_WAIT connections in netstat (Windows Server 2008)

I'm having some issues on a Windows 2008 server with some network connections not going through. For instance, in a web application on the server, we need to open a socket connection to another server,...
Rhys Causey's user avatar
3 votes
2 answers
186 views

What address should the client connect the socket to [duplicate]

SOLVED SOLUTION: I tried the connection with a little server program and it works perfectly fine. I could connected it to 10.195.5.53. My problem is within the software of my client program it has ...
Pepe Moreno's user avatar
3 votes
1 answer
3k views

Nginx keepalive when using a UNIX socket

Is there any benefit or performance gain when using keepalive on an upstream that is using a UNIX socket as a server, for example: upstream test { server unix:/tmp/test.sock; keepalive 60; } ...
nbari's user avatar
  • 568
3 votes
2 answers
27k views

How to let PHP connect to database by using UNIX socket (Joomla)

I'd like to have my PHP applications such as Joomla make use of the UNIX socket to connect to the local mysql database. I've already configured the php.ini with: mysqli.default_socket = /var/run/...
gijs007's user avatar
  • 117
3 votes
1 answer
8k views

Nginx not proxying websockets properly

Using the development version of nginx (1.3.12). In my relevant file under sites-enabled: upstream twisted { server 127.0.0.1:8088; } server { listen 80; ## listen for ipv4 ...
socksy's user avatar
  • 33
3 votes
2 answers
5k 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 ...
Miky Dinescu's user avatar
3 votes
2 answers
5k views

Postfix & Amavis - Use UNIX Soket for Communication

I currently using a complex mailserver setup using Postfix, Dovecot, Amavis and Spamassassin. Everything works fine but I want to improve the Postfix-Amavis-Communication. At the moment, postfix will ...
user avatar
3 votes
1 answer
670 views

Dealing with upgrade of libevent on Amazon AWS

I am building an application (in Python) on Amazon EC2 that has a following dependency chain: gevent-websocket ---> gevent ---> libevent The last one (libevent) got upgraded on Sunday and my ...
Dreen's user avatar
  • 153
3 votes
1 answer
3k views

Traffic filtering for websockets

We have a websocket server that accepts connections. Unfortunately, for a reason that we have yet to identify some clients go rogue and connect/disconnect/connect... in loop at a very high frequency. ...
Julien Genestoux's user avatar
3 votes
1 answer
741 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 (...
alanc10n's user avatar
  • 303
3 votes
2 answers
24k views

Why am I getting "Connection refused"?

I am running a hello-world http server on an ubuntu EC2 instance, let's say, myurl.com. I am unable to curl it from my client: $ curl myurl.com:4296 curl: (7) Failed to connect to ...
Ruby's user avatar
  • 139
3 votes
2 answers
2k views

Should I worry about hanging sockets when setting keep-alive timeout to Infinity?

Some initial context to this question. Currently I have a application cluster deployed behind a ALB which maintains persistent keep alive connections with the application. This application is under ...
andrsnn's user avatar
  • 165
3 votes
2 answers
4k views

sudo: unable to create sockets: Cannot allocate memory

On a VPS run by OVH (apparently OpenVZ-based, given /proc/user_beancounters exists), with relatively few processes running, trying to sudo gives me the error in the title. Here is a sample transcript:...
Ekleog's user avatar
  • 133
3 votes
1 answer
10k views

NGINX: How to proxy http(s) traffic to one server and ws(s) traffic to another?

I'm new to nginx and how it handles locatoins, and was hoping to get help for a problem I'm having: On the same server I have an Apache web server and a websocket server. Apache works on port 8080 ...
Mita Ka's user avatar
  • 133
3 votes
1 answer
18k views

Access to a network server without port forwarding

I have a network with the following structure. The server in PC2 is simple socket server TCP in 8080 port. I need to access to PC2 from other external network by socket client. This socket client ...
SdevDavid's user avatar
3 votes
2 answers
5k 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 ...
michalstanko's user avatar
3 votes
1 answer
5k views

Does Microsoft TMG 2010 handle websockets, at least through SSL?

I thought in my own insanity that if I published an IIS 8 web server with websockets through HTTPS there shouldn't be a problem even with the TMG. However, regardless of publishing, filtering and ...
Oskar Duveborn's user avatar
3 votes
1 answer
5k views

Disable kernel processing of TCP packets for raw socket

I'm working on a TCP/IP implementation, for an embedded device, that I want to test from a Linux user space process using raw sockets. raw(7) says that Raw sockets may tap all IP protocols in ...
Peter Woo's user avatar
3 votes
2 answers
1k views

Options for real-time web notifications and updates using Comet/XMPP vs WebSocket technologies on a Microsoft stack?

I am scoping out the architectural options for a project that will render live updates (like Facebook) of user activities - logins, photos, etc. Two main UI components of this are an auto-updating ...
ElHaix's user avatar
  • 269
3 votes
1 answer
2k views

Is it worth running Nginx for static files of my Node.js app?

I'm currently writing a web app in Node.js and will soon be setting up my Linux server to make it live. I'm curious, is it worth running Nginx for my Node app's static files? Is it running Nginx to ...
littlejim84's user avatar
3 votes
2 answers
3k 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 ...
Jim G.'s user avatar
  • 358
3 votes
2 answers
7k views

How to find the other point of a Unix domain socket on Mac OS X to write/read it?

I listed open file for a process (a daemon) on my box which runs Mac OS X 10.5 : >lsof -p 89 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ... xxxxx 89 xxxxxxxx 9u unix ...
yves Baumes's user avatar
3 votes
1 answer
8k views

How to share unix domain socket between containers without named volume?

I have two containers A and B which needs to talk via unix domain socket created by A in /var/run/notif.sock. I can't use named volume as sharing /var/run between containers is risky as it contains ...
Ankur Sao's user avatar
3 votes
1 answer
3k views

Error when SSH forwarding TCP to unix socket

I am trying to use ssh to forward a TCP connection on a local port to a Unix socket on a remote server, but I keep getting errors. I started by having nc listen on the remote server: remote$ nc -lU /...
George V. Williams's user avatar
3 votes
1 answer
2k views

Can't touch/connect to a unix socket from the same group

sudo ls -la /var/lib/redis/6379/ produces: drwxrwxr-x 2 redis redis 4096 Nov 28 23:10 . drwx-w---- 3 redis redis 4096 Nov 22 00:10 .. srwxrwx--- 1 redis redis 0 Nov 28 23:10 redis.sock ...
Cenoc's user avatar
  • 217
3 votes
1 answer
24k views

How to solve SocketException: Permission denied: connect

I recently encountered a problem that is giving me a headache and I need help ... The System consists of two subsystems, called A and B, each running on a standalone Tomcat instance and currently ...
luxinxian's user avatar
3 votes
3 answers
3k views

python reports socket in use, netstat and others claim its not

We have a strange socket issue with a RHES3 box: Python 2.4.1 (#1, Jul 5 2005, 19:17:11) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-52)] Type "help", "copyright", "credits" or "license" for more ...
captainmish's user avatar
3 votes
1 answer
903 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 ...
Michal Cichra's user avatar
3 votes
2 answers
2k views

Nginx, HAproxy, Unicorn, Rails and Node settings

Our application is currently only a "regular" web app, with no fancy things like streaming HTTP or websockets. It's mostly a Rails app, served by a few (20 on 2 machines) Unicorn workers, proxied by a ...
Julien Genestoux's user avatar
3 votes
0 answers
226 views

How to tell whether a linux tcp socket had recent activity?

Most of the time, when changing or upgrading a network service, I would do this during maintenance hours but some services are rarely used so it is tempting to just check whether it is currently in ...
Gamification's user avatar
3 votes
1 answer
583 views

Start systemd socket on VPN connection automatically after boot

One of my servers is setup so that it will automatically connect to a VPN after booting up using a systemd service. Now I want to host a systemd socket on this VPN connection. And the socket should ...
rollstuhlfahrer's user avatar

1 2
3
4 5
12