0

When I do a netstat -tpnl | grep java :

> tcp6       0      0 :::1099                 :::*                   
> LISTEN      1307/java tcp6       0      0 :::9999                 :::*
> LISTEN      1307/java tcp6       0      0 :::8080                 :::*
> LISTEN      1307/java tcp6       0      0 127.0.0.1:8005          :::*
> LISTEN      1307/java tcp6       0      0 :::33445                :::*
> LISTEN      1307/java tcp6       0      0 :::8009                 :::*
> LISTEN      1307/java

a ps -eaf | grep java give this :

tomcat    1307     1  7 08:39 ?        00:01:24 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat/tomcat-instances/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms512m -Xmx4096m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -server -XX:+UseParallelGC -Xms512m -Xmx4096m -XX:MetaspaceSize=256m -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.rmi.port=1099 -XX:+PrintGCDateStamps -XX:+PrintGCCause -verbose:gc -XX:+PrintGCDetails -Xloggc:/opt/tomcat/logs/gc.log.201710310839 -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=20 -XX:GCLogFileSize=200M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/tomcat/logs/HeadDump_20171031083922.hdump -Djava.endorsed.dirs=/opt/tomcat/tomcat-engine/endorsed -classpath /opt/tomcat/tomcat-engine/bin/bootstrap.jar:/opt/tomcat/tomcat-engine/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat/tomcat-instances/ -Dcatalina.home=/opt/tomcat/tomcat-engine -Djava.io.tmpdir=/opt/tomcat/tomcat-instances/temp org.apache.catalina.startup.Bootstrap start

Here the port i know :

  • Port 1099 : RMI
  • Port 9999 : JMX
  • Port 8009 : AJP
  • Port 8005 : Shutdown
  • Port 8080 : Tomcat

But what do the port 33445 ????

Thanks a lot,

Djé Djé
  • 77
  • 1
  • 8
  • not programming related, thus a bad fit for stackoverflow. But have you searched the internet for "port 33445"? Brings up quite some results for me. Most likely it's one of the applications that you've deployed. – Olaf Kock Oct 31 '17 at 10:51
  • I don't think so, because the port is a "random port" so search on Google won't help (already try). – Djé Djé Oct 31 '17 at 12:58
  • You give no indication that it's random (unless you mean random as in https://xkcd.com/221/). 33445 gives google results for me. However, as your question is not programming related, it's still not a good fit for stackoverflow. If it was programming-related, you should post a [MCVE](https://stackoverflow.com/help/mcve) – Olaf Kock Oct 31 '17 at 13:01
  • Sorry... not read the MCVE :/ – Djé Djé Oct 31 '17 at 13:06

1 Answers1

1

If that port definitely hasn't been opened by your application, then it could be the diagnostic attach port, used by JConsole, etc.

Try adding

-XX:+DisableAttachMechanism

to your JVM command line, and see if the port disappears.

Kevin Boone
  • 4,092
  • 1
  • 11
  • 15
  • Thank you Kevin With JConsole, i am not able to connect the port 33445 (the port is "random" ; when I restart Tomcat, i have an other port). With your DisableAttachMechanism, the "random" port always present. – Djé Djé Oct 31 '17 at 12:55
  • In my webapps directory, i drop all applications ! After restarting Tomcat, the "random port' is always present... :/ – Djé Djé Oct 31 '17 at 13:02
  • I'm sorry -- if this isn't the diagnostic attach port, I don't know what it is :/ – Kevin Boone Oct 31 '17 at 14:13
  • Found (in part) : it is port use for JMX ! I fixed 2 ports (JMX and RMI) but there is a third port... – Djé Djé Oct 31 '17 at 14:44
  • https://stackoverflow.com/questions/20884353/why-java-opens-3-ports-when-jmx-is-configured – Djé Djé Oct 31 '17 at 14:52