is a data communications endpoint for exchanging data between processes executing within the same host operating system.

learn more… | top users | synonyms

4
votes
1answer
46 views

How does moving a unix domain socket enable socat to monitor traffic?

socat can be used to monitor traffic across a Unix domain socket: sudo mv /path/to/sock /path/to/sock.original sudo socat -t100 -x -v UNIX-LISTEN:/path/to/sock,mode=777,reuseaddr,fork ...
1
vote
0answers
12 views

Which Privileges Should Assign For Create Raw Sockets

I want to run an ICMP command to ping an IP Adress at Java: InetAddress.getByAddress("XXX.XXX.XXX.XXX".getBytes()).isReachable(1000); However there is a security restriction that: Normal users are ...
1
vote
0answers
25 views

Unix domain Sockets - Size limitation? [closed]

I have the following scenario I created a socket with socat - unix-listen:/tmp/socket.sock then I wrote a very long string (abt 40k) with nc -U /tmp/socket.sock I seted the following parameters ...
0
votes
0answers
26 views

how to fix a port no statically for client request on client side?

I have an assignment to implement: unicast multicast broadcast in Java socket programming. While implementing the multicast part I decided to do it on my own system itself, so for the purpose of ...
18
votes
4answers
1k views

Are Unix Internet sockets files?

I understand that "Everything is a file" is one of the major concepts of Unix, but sockets use different APIs that are provided by the kernel (like socket, sendto, recv, etc.), not like normal file ...
0
votes
0answers
17 views

How to open socket between Linux PCs in different homes? [migrated]

Could you please explain how to write a C/C++ program that opens a socket from a Linux PC at one home to another Linux PC at another home and sends a text string, in case both PCs are connected to the ...
1
vote
0answers
37 views

Nginx leaves old socket

I'm running Nginx 1.6.2 (the nginx-full package from the nginx/stable PPA). I'm using the unmodified configuration /etc/nginx/nginx.conf: user www-data; worker_processes 4; pid /run/nginx.pid; ...
1
vote
1answer
13 views

How to apply a parameter to packet so TC can prioritize\classify it

I want to add a parameter to the packet so that I can later let TC (HTB in specific) prioritize my packet (based on filtering that parameter). I thought about filtering by socket but as I understand ...
2
votes
1answer
63 views

Advantages of using named pipes and sockets rather than temporary files

I have two cooperating programs. One program just writes its output to a file and the other one then reads from the file and spits the data out for the front end to work with. I have been reading ...
0
votes
0answers
45 views

Stopping syslogd also closes /dev/log UNIX domain socket

I am working on a project and from some testing I found out that stopping syslogd daemon also closes /dev/log socket. Is there some other way so that even if syslogd is down, /dev/log socket still ...
2
votes
0answers
34 views

Emulate console by sending data on one UDP port, and receive text from another

Note: I also posted this question on SuperUser, because I'm not sure where it belongs I'm trying to establish a "console-like" connection with a National Instruments cRIO-FRC. It broadcasts its ...
13
votes
3answers
1k views

Why are TCP/IP sockets considered “open files”?

I need some assistance grasping what I'm sure is a fundamental concept in Linux: the limit for open files. Specifically, I'm confused on why open sockets can count towards the total number of "open ...
1
vote
1answer
42 views

ip forwarding to remotely connect to a socket listening to localhost only?

I must transfer data from PC1 to PC2 using a specific port, but the socket opened on PC2 only listens to local host. Is there a way to "trick" the socket into accepting the connection from PC1?
1
vote
3answers
83 views

Server running on guest Linux VM will not accept connections from Windows host

I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. ...
0
votes
0answers
55 views

Archlinux ARM Apache server fails to start

I am currently setting up an Apache web server on my Pi running on Archlinux ARM. After installing and making the first small configurations I have tested it and it works. Then I stop the server and ...
1
vote
0answers
39 views

Why was n't kqueue socket polling mechanism not implemented in Linux?

Linux has epoll for socket polling mechanism. kqueue seems to be better than epoll. Why did linux went with epoll rather than kqueue? I read about libkqueue. But that is implemented in user space and ...
2
votes
0answers
80 views

X11 bad access at first try but working on successive tries

I use the following setup to forward X11 output from my local machine to the server. I will outline the setup: X11 server and the client are on the same local machine. The X11 server runs on my ...
0
votes
1answer
53 views

What are the differences between socket polling mechanisms of kqueue and epolling?

kqueue socket polling mechanism is used in FreeBSD and epolling in Linux. I would like to know what are the differences between the two mechanisms?
1
vote
3answers
119 views

nc not waiting for server disconnect on OS X

How to make nc client on OS X Mavericks keep socket open and read data until server disconnects the socket? I want to send data to a server through nc and then use the response. Problem is that nc ...
2
votes
1answer
52 views

Is there a system call to bind a file descriptor directly into another?

A read() & write() loop would probably be as good as what I'm looking for, but nevertheless is anything like that around or is it impossible because of an obstacle I didn't envisage ? I'm curious
0
votes
0answers
53 views

closing socket after forcing terminal close

I'm running Bluetooth socket server, this server is listening to incoming connection. but I forced the terminal close ctrl + Z . after that the server is not listeing any more and show me the output ...
3
votes
1answer
36 views

Can close() block?

For example, if you close a pipe or socket that still has data in its write buffer that hasn't been read by the process on the other end, does close() block until the data is read or the other process ...
0
votes
0answers
31 views

A script to identify whether a file descriptor has gone bad

Problem : I have a server program running which connects to a remote program using TCP sockets. There many of them (say 20). My problem is one of the socket descriptor has gone bad and has recieved ...
2
votes
0answers
38 views

Last data traffic time for a TCP socket

Is it possible, to find out when was the last time there was any traffic on an opened TCP socket? Keepalive and timeout timers are based on this statistic, so I guess it has to be stored somewhere. ...
6
votes
2answers
2k views

How to make a TCP socket time out

For network catastrophe simulations of our server environment, we are looking for a way to intentionally timeout a TCP socket. Are there any simple ways for existing sockets? Also, little C test-case ...
1
vote
1answer
169 views

How can I allow applications to bind to any address in a subnet assigned to an interface?

I recently got a static IPv6 /56 prefix of my own from Freenet6, and am trying to allow applications to bind arbitrary addresses in the prefix. I modified the tunnel creation script that gogoc uses in ...
3
votes
1answer
695 views

How to send data from serial port over wifi?

I have microcontroller device which reads data from sensors and sends it via Serial to USB converter (ftdi232 cable). This Serial to USB converter is connected to ARMv7 mini-computer - CuBox with ...
1
vote
1answer
6k views

ssh: Read from socket failed: Connection reset by peer

When I try to ssh to a remote host, I get the following error messages: root@cloudstack-server-1:~/.ssh# ssh ubuntu@172.17.4.17 -v OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012 ...
2
votes
1answer
390 views

Memcache 'stats' reports non-zero 'curr_connections' - but lsof shows no socket connections

Our memcache daemon reports non-zero 'curr_connections'... $ telnet memcache-server 11211 Escape character is '^]'. stats ... STAT curr_connections 12 ... ...and yet, lsof shows no socket ...
8
votes
3answers
686 views

Is there a file for each socket?

"Everything is a file" in the UNIX World. Above sentence is famous. When I run echo "hello programmer" >> /dev/tty1 , I can watch the given string on TeleType 1 , .... What and where is file ...
2
votes
2answers
95 views

Detect open sockets manually (not using nc or similar)?

I'm trying to debug a network problem on a embedded system which has a very limited set of userspace applications. Meaning I can't use any of the following sudo lsof -i sudo netstat -lptu sudo ...
1
vote
1answer
115 views

How to see the amount of pending data on a unix domain socket?

When I'm logged to a tmux session from two different computers, I'd like to be able to trace the amount of pending data on the sockets of both tmux session. To test this I logged to computer A and to ...
3
votes
2answers
691 views

Socket connect to a ports bound to IP vs localhost

It is my understanding that sockets bound to ports using localhost will not be visible to the subnet because the binding is not with the nic IP address. Local processes connecting to such port will ...
2
votes
1answer
338 views

Using a Unix Domain Socket to Control VLC

I am interested in using a UNIX-Domain Socket to control VLC playback. This functionality is outlined in the VideoLan documentation for using oldrc. So what I need to is startup vlc with a command ...
1
vote
0answers
225 views

Which socket is gnome-shell reading from continuously?

strace shows that the GNOME shell is continuously trying to read from a socket, which is often not available (or doesn't contain any data to read from): strace -p gnome-shell-pid -e trace=recvfrom ...
3
votes
1answer
53 views

= sign at the end of .sock files in the ls output

I'm running the zsh shell in emacs. When I run ls I get a = at the end of .sock files. What does the = mean? Is it unique to unix sockets?
1
vote
2answers
530 views

How to “listen” to nginx writes to a file socket

I'm trying to get uwsgi and nginx to play nice. After moving to "file sockets" (hopefully I'm using the right terminology here) from TCP sockets, the only thing I get from uwsgi is a 400 with no ...
4
votes
1answer
111 views

Does traffic addressed to one of a Linux system's own interfaces ever leave the system?

I have two separate servers running on the same port on a Linux system, one binded to the loopback interface, and the other to the public Ethernet interface. If I connect a client on that system to ...
1
vote
0answers
117 views

Solaris 10 on x86: local sockets (unix domain sockets) very very slow? [closed]

I'm writing an application both on Linux and Solaris 10. It uses local sockets for some internal communications. On Linux an open, exchange one short message & close cycle takes about 10us elapsed ...
2
votes
1answer
718 views

Linux nuisance: /dev/stdin doesn't work with sockets

Linux has this blitheringly annoying peculiarity that /dev/stdin won't work with sockets - it is hardcoded to return ENXIO. Try this: socat TCP-OPEN:localhost:1234 EXEC:cat\ /dev/stdin,nofork ...
4
votes
5answers
10k views

How can I tell if a TCP port is open or not? [closed]

I am trying to implement socket programming in C. When I try to connect from a client to a server (Ubuntu), it shows an error like "connection failed". So I think the problem is with the port. I am ...
8
votes
1answer
203 views

Can someone explain the different types of unix domain sockets?

If I run netstat --all | grep ^unix some of the socket paths that are outputted are preceded with a '@' and some aren't. I've noticed that those preceded with a '@' don't show up when browsing the ...
8
votes
2answers
6k views

Performance of unix sockets vs TCP ports

For example on php-fpm: #listen = 127.0.0.1:9000 listen = /var/run/php-fpm/php-fpm.sock Is there any major performance differences between using unix socket-based listeners over TCP ports? (Not ...
3
votes
1answer
1k views

How to 'free' a TCP port?

I have some code that listens to a specific TCP port. However, when I stop this code and restart it quickly afterwards, I see the error ERROR: could not bind to socket on 0.0.0.0:7700 If I wait a ...
3
votes
1answer
453 views

Idiomatic location for file based sockets on Debian systems

I am writing a daemon process for a Debian system in C that uses a Unix Domain Socket. If the deamon process's working directory is the root directory, is there an idiomatic directory to place the ...
2
votes
2answers
319 views

Which systems do not honor socket read/write permissions?

man 7 unix on Linux states: In the Linux implementation, sockets which are visible in the file system honor the permissions of the directory they are in. Their owner, group and their ...
3
votes
2answers
3k views

How to 'strace' a unix domain socket?

Kind of hard to explain but I noticed when straceing the PID that has the socket open I cannot see any of the communication. How can I sit in the middle of a socket file to watch communication?
0
votes
1answer
4k views

Could not bind socket: Permission denied when trying to start NDOUtils using UNIX socket

I followed these directions to a tee: http://shah-oss.blogspot.com/2010/12/ndoutils-installation-on-centos-for.html Everything was going well until I actually tried to run this command (there is a ...
2
votes
1answer
795 views

Espeak showing some warnings and Input output error

I am running espeak on Linux Mint 14. Whenever I try to run it, it shows following warnings ( Not errors as it works correctly ). ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM ...
9
votes
4answers
5k views

Are FIFO, pipe & Unix domain socket the same thing in Linux kernel?

I heard that FIFOs are named pipes. And they have exactly the same semantics. On the other hand, I think Unix domain socket is quite similar to pipe (although I've never made use of it). So I wonder ...