Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty sockets

Hi Simon,

thank you for your response and the advice for debugging. Actually it appears, that the first ports are opened without an application deployed and all ext libs removed. This is why I am asking here about the 'default' behavior. While i understand that the jetty opens its configured port to serve the content (e.g. 8080), which is expected, i was more wondering about the non configured ports in the dynnamic range and just on windows. Linux opens only files...

Process analysis linux / windows: https://ibb.co/x88wMGL

Regards

Michael



Am 10. Juli 2020 11:02:53 MESZ schrieb Simone Bordet <sbordet@xxxxxxxxxxx>:
Hi,

On Fri, Jul 10, 2020 at 10:44 AM <mk-klenk@xxxxxx> wrote:

Hi community,

first if all, I'm new to this list. Hello to all.

Welcome!

I am using jetty (9.4.20) as a container server hosting multiple web applications in one process. It works pretty good. The process itself runs forked on windows and linux.

Checking the opened ports/sockets of the process I got surprised, because the process itself on windows binds like 5-6 ports in the upper, dynamic port range above 49000. It keeps opening about 20 new sockets for a deployed web application. While the sockets on linux are bound to open pipes, it opens and establishes ports on windows. I was wondering what it does with these ports... maybe you can help me ith this question, so i might find modules i do not need... a brief look into the code revealed only few sections opening sockets: shutdown, rmi, jmx and unixsocket-server. But i do not see how this multiplies with each application deployed...


I don't think it's Jetty opening these additional ports, typically
applications (or libraries used by applications) do.

I would double check what your application/libraries are doing first.
Enabling DEBUG logging for your application/libraries may tell you
what's going on.

Jetty does open a few extra sockets (besides those necessary to handle
the incoming traffic), but whether they are opened or not depends on
how you configured Jetty (for example, you are using ProxyServlet so
there will be a HttpClient opening sockets).

Alternatively, you can attach with a debugger to the JVM and set a
breakpoint to the Socket constructor, and then see what code calls it.

Back to the top