I always appreciate your depth of knowledge, Chris.

"hand-wavy device supporting NIO for Java"

Could you write us a quick paragraph expanding on this idea?

I'm happy to follow a pointer to a well written article (something up
to your standards).

On 3/31/20, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Frank,
>
> On 3/31/20 09:30, Frank Tornack wrote:
>> Yes, these too are for communication between processes. Only you
>> don't use the network stack. This is a special feature of Unix-like
>> operating systems.
>>
>> DGRAM, unlike STREAM, does not know connection states. Therefore
>> STREAM is comparable to a local TCP connection. Unix domain sockets
>> exist in the file tree as special files. Access is controlled by
>> file permissions, as is usual for files.
>
> Yup. It's helpful to see the column headers for your netstat output,
> André:
>
>> Proto RefCnt Flags       Type       State         I-Node
>> PID/Program name     Path unix  2      [ ]         STREAM
>> CONNECTED     167427210 27514/java unix  2      [ ]         STREAM
>> CONNECTED     167423436 27514/java
>
> Each "unix" protocol-connection (UNIX domain socket) has an associated
> inode on the root filesystem, but no path. Basically, it's magic. :)
>
> The nice thing on *NIX is that even though there is a hand-wavy device
> supporting NIO for Java, it doesn't consume pairs of ports (which are
> a limited resource; see our recent discussion on the limits of TCP
> port numbers).
>
> - -chris
>
>> Am Dienstag, den 31.03.2020, 14:29 +0200 schrieb André Warnier
>> (tomcat/perl):
>>> On 31.03.2020 14:20, Mark Thomas wrote:
>>>> On 31/03/2020 11:20, Aditya Kumar wrote:
>>>>> Tomcat 9.0.30 on Windows Server 2012 / Java 1.8
>>>>>
>>>>> I've noticed on a freshly installed version of tomcat 9,
>>>>> upon startup there are several connections to and from
>>>>> localhost on different ports
>>>>>
>>>>> For example on my tomcat server there are 4 connections to
>>>>> and from localhost (output from netstat)
>>>>>
>>>>>
>>>>> TCP    0.0.0.0:8080           0.0.0.0:0
>>>>> LISTENING 3972
>>>>>
>>>>> TCP    127.0.0.1:55618        127.0.0.1:55619
>>>>> ESTABLISHED 3972
>>>>>
>>>>> TCP    127.0.0.1:55619        127.0.0.1:55618
>>>>> ESTABLISHED 3972
>>>>>
>>>>> TCP    127.0.0.1:55620        127.0.0.1:55621
>>>>> ESTABLISHED 3972
>>>>>
>>>>> TCP    127.0.0.1:55621        127.0.0.1:55620
>>>>> ESTABLISHED 3972
>>>>>
>>>>> TCP    [::]:8080              [::]:0
>>>>> LISTENING 3972
>>>>>
>>>>> These can grow to a large number (several thousand) on a
>>>>> busy system. What are these connections used for? What caused
>>>>> them? What thread are they attributed to?
>>>>
>>>> The Java NIO implementation on Windows uses TCP for
>>>> intra-process signalling. It opens a pair of self-connected
>>>> sockets for every Selector.
>>>>
>>>> Mark
>>>>
>>>
>>> While we're at it, under Linux, are the following for a similar
>>> reason ?
>>>
>>> output of :  netstat -pan | grep 27514   (tomcat's JVM PID =
>>> 27514) [...] unix  2      [ ]         STREAM     CONNECTED
>>> 167427210 27514/java unix  2      [ ]         STREAM
>>> CONNECTED     167423436 27514/java
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>>
>>>
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>>
>>
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6DUP8ACgkQHPApP6U8
> pFgxiBAAkmLWWhwvrLW+RJ5j3ZKEu5cXQ0x3/zsMpFuP2GPok1lemXixa8T91lSO
> eGg6W80DhVb76tDJl4Akt3L8ejN2XNgSxnHgGfEiCvTughYryAmHNXxze3ZMj4BQ
> pvIO8hCc1nSlti71h6C2vEGYLnwkHyMulIolYaHP+SxKX7PSxXcfo4zD6vvpTvnO
> U5Hrk7H8JjXCANrd8LsChN8w8AkWMUJpu/TUXFYy8bWEN9Ui7SdGqfa1t+pwnl8+
> JZqO1moBP9WcMA/XR1msWIbkA8B1r+ICWqlqcdGlvkXrHzkiALdqpxy0WiKAs1Tn
> J+uPp0mAGpXRU3NGibr5NMtHLQ3Kl+X821yHYjF0XjqFwjLgvQNrmdYwblqFCUPB
> 9sIVr6CuWAxPM61QZ9Bi9fT4MrIA6f8iSEa7BDJmUWhARPQMKn6fjIOMd8Cok882
> cGU1WT8O2SrtQV+y7wJbbq4aP4e6vRi/nSqI2hlSFdTBfD1Grj+t5JPHg35AafR4
> +6qum9rVF3AKf47UoJFrXG9smWLkUVVsJuZbdHLofmQEV0ovOMzAPx2GR9oSR2/M
> sCxdUdqrhEW08wwYwIOV59vNa9pn/X/SOEre09yLH/GMV3H03CiQni616luWPrQt
> 0BzFi4+8TPVzKCaq88ThyjJnEMuDU9RNeS7IHScHTXQa6rflB7E=
> =q/Fd
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to