Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39732

Re: what thread or module is listening on a port?

Path csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: what thread or module is listening on a port?
Date Wed, 23 Feb 2022 10:51:06 -0500
Organization A noiseless patient Spider
Lines 25
Message-ID <sv5l5b$utj$1@dont-email.me> (permalink)
References <slrnt1cajr.3vsm.avl@logic.at>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Wed, 23 Feb 2022 15:51:08 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="f342329e37c735a2fe25875023ce23cb"; logging-data="31667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fQ68kO4/WFDvmdTHhkGX9"
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
Cancel-Lock sha1:6Eept0RV33LXjAhagrK7ytYAWjY=
In-Reply-To <slrnt1cajr.3vsm.avl@logic.at>
Content-Language en-US
Xref csiph.com comp.lang.java.programmer:39732

Show key headers only | View raw


On 2/23/2022 7:37 AM, Andreas Leitgeb wrote:
> Given a java process (that uses a couple of 3rd-party libs and stuff from
> maven repo) and a TCP port number that this process is listening on (for all
> interfaces), what options do I have for finding out, which "part" of the
> process is responsible for the listening port?
> 
> Once I see, which of the umpty libraries did it, I can look for options
> to either unconfigure it, bind to localhost, or at least understand it.
> 
> That's on Solaris (Unix).
> $ netstat -aun | grep "54157.*LISTEN"     # gives me e.g:
>        *.52634              *.*            xxx  54157 java 0      0  256000      0 LISTEN
> [...]
     Not a Java answer, but: Could you use dtrace to watch the
port creations as they go by and see which piece of code
instigates each one?  (My Solaris days are a distant memory
and my dtrace skills were never super-keen, but it seems to
me dtrace ought to be able to do the trick.)

     If the process opens ten thousand ports this could get
tedious, but still ...

-- 
esosman@comcast-dot-net.invalid
Look on my code, ye Hackers, and guffaw!

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

what thread or module is listening on a port? Andreas Leitgeb <avl@logic.at> - 2022-02-23 12:37 +0000
  Re: what thread or module is listening on a port? Eric Sosman <esosman@comcast-dot-net.invalid> - 2022-02-23 10:51 -0500
    Re: what thread or module is listening on a port? Martin Gregorie <martin@mydomain.invalid> - 2022-02-23 16:51 +0000
  Re: what thread or module is listening on a port? Arne Vajhøj <arne@vajhoej.dk> - 2022-02-23 12:15 -0500
    Re: what thread or module is listening on a port? Andreas Leitgeb <avl@logic.at> - 2022-02-24 23:04 +0000
    Re: what thread or module is listening on a port? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2022-03-19 12:47 +0100

csiph-web