简体   繁体   中英

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. java.net.BindException: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM