4

I'm trying to use IntelliJ IDEA to run a Tomcat server but failing to so, I keep getting the following error code:

Application Server was not connected before run configuration stop, reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.net.SocketException: Connection reset]

As seen in the following picture: https://i.stack.imgur.com/yqYav.png

Also, I manage to run a Tomcat server in CMD, but it just doesn't seem to work in IntelliJ. This is a pic of me running Tomcat in CMD succesfully and trying to connect to the same port in the IntelliJ (obviously failing to do so) but it does seem to be trying to connect, as in there is nothing really blocking the connection: https://i.stack.imgur.com/OYIvK.png

I tried every solution I could find:

  • specify the same port for both JMX and RMI conversation (here and here)
  • configure the Tomcat server again (here)
  • make the the path to the Tomcat files is correct (here)
  • made sure no Firewall/antivirus is blocking the network connection.
  • uninstall and install again both IntelliJ and Tomcat
  • specify the IP (here)
  • using different ports

Thanks!

Ido Kolman
  • 41
  • 3
  • Whenever possible, please provide information as text, not images. In particular Tomcat's startup logs are useful. From your picture one can not see what port is JMX running on, but one might notice a failed attempt to connect to the shutdown port (8005 by default). – Piotr P. Karwasz Nov 04 '21 at 19:13
  • Please provide enough code so others can better understand or reproduce the problem. – Community Nov 05 '21 at 09:58

1 Answers1

0

The problem was solved.

Running the Apache Tomcat Installer instead of just downloading the zip solved it.

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
Ido Kolman
  • 41
  • 3