java rmi jmx
Updated Fri, 28 Oct 2022 22:00:23 GMT

RMI disabled, Java still listens on port 1099

When I execute netstat -tupan, one of the entries is the following:

tcp        0      0 :::1099  :::*         LISTEN      8778/java

However, I have removed all settings concerning RMI and JMX from the options passed to Java when it starts. My questions are:

  1. Is RMI actually still enabled? I can connect to the port using telnet.
  2. If not, why does Java still listen on the port?

Edit: I blocked the port using netcat: nc -l 1099. This prompted an error on the application startup, and it turns out that I have an MBean in the application which was automatically picked up by Spring on startup and registered.


Here is the steps to trace the issue:

  1. Stop your application
  2. Run another application which listened on port 1099
  3. Start your application again
  4. Address already in use exception is thrown by the class that tries to listen on port 1099.

You can work on the issue based on the clue.