How to solve "Error running Tomcat server(Ubuntu): Port out of Range problem." problem?

8,723

Inside your Tomcat installation folder, go to
"server.xml" (probably under /usr/share/tomcat{x}/conf/) file and change:

<Server port="-1" shutdown="SHUTDOWN">

to

<Server port="8005" shutdown="SHUTDOWN">

As mentioned by of in this Jetbrains issue tacker page.

Another important thing is: In the Deployment section, make sure to add Artifact like this: Screenshot of Tomcat Config page

And again if u miss something, follow this page. And if u are in deeper other problem then follow this link where I discussed to solve Tomcat9 & IntelliJ 2019.1.3 integration in Ubuntu 19.04. It took me 5 days to resolve this issue.

Share:
8,723
Pranav
Author by

Pranav

A BCA student until 2019. A wanna-be developer for now. "Jack of everything, a master at none" for now.

Updated on September 18, 2022

Comments

  • Pranav
    Pranav over 1 year

    I am trying practice Java servlet where I need Tomcat server. I choose IntelliJ as my IDE which is throwing me popup message:

    Screensot of the pop error message by Intellji.

    I used this configuration: Screenshot image of IntelliJ Tomcat Local server configuration.

    And this is what's inside Tomcat's server.xml file, where u can see the port number also matches with the one within IntelliJ. But the port numbers of JMX, HTTPS & AJP is not mentioned in this server file by default.

    Now the main question is why IntelliJ is responding like this when everything 'looks' fine? Help me if u delt with this issue.

    • Tomáš Pospíšek
      Tomáš Pospíšek almost 5 years
      In the Tomcat Server Settings in your screenshot there are two ports that are not assigned any value. What happens if you give them a port number?
    • Pranav
      Pranav over 4 years
      @TomášPospíšek no changing port number in Intellij won't do anything.
  • Pranav
    Pranav over 4 years
    @user889789 I don't what u did, but you will be missed. :-D