• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Not able to launch tomcat via eclipse ee

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am facing issue while starting tomcat 7.0 via eclipse. I am using eclipse kepler and using Windows 7 OS.

When i start Tomcat via "Services" option, it starts fine,

and when i try localhost:8080 in browser, the apache default page opens ok.

However when i add Tomcat 7.0 in Eclipse and try to start Tomcat;i get the below error.

Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

As suggested by others, i change my port numbers (random numbers), 8010,9090,8019.

In this scenario Apache server starts up fine and localhost:9090 is working ok too, however i get similar error while trying to start server via eclipse

Several ports (8010, 9090, 8019) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

Please suggest, how do i actually find if any application are using the above port or
kindly suggest some alternative to overcome this issue.

Thanking in anticipation
 
Marshal
Posts: 4541
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the ports already in use by another application (or another instance of Tomcat)? Open a command window with Administrator rights and type netstat -nab. Go through the output and look to see which processes are using the ports.
 
Shirshendu Mukherjee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ron,

However; i double checked task manager to ensure that no other instance of Tomcat is running. There were no instance of tomcat running wile trying to start it from eclipse.

As suggested i checked the ports used by netstat command: below is the output,

C:\Windows\system32>netstat -nab

Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
RpcSs
[svchost.exe]
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:5357 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:6646 0.0.0.0:0 LISTENING
[mcnasvc.exe]
TCP 0.0.0.0:49152 0.0.0.0:0 LISTENING
[wininit.exe]
TCP 0.0.0.0:49153 0.0.0.0:0 LISTENING
eventlog
[svchost.exe]
TCP 0.0.0.0:49154 0.0.0.0:0 LISTENING
Schedule
[svchost.exe]
TCP 0.0.0.0:49155 0.0.0.0:0 LISTENING
[lsass.exe]
TCP 0.0.0.0:49157 0.0.0.0:0 LISTENING
[services.exe]
TCP 127.0.0.1:49266 0.0.0.0:0 LISTENING
[UNS.exe]
TCP 192.168.2.2:139 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 192.168.2.2:49188 74.125.135.125:5222 ESTABLISHED
[chrome.exe]
TCP 192.168.2.2:49386 173.194.38.159:443 ESTABLISHED
[chrome.exe]
TCP 192.168.2.2:49391 74.125.236.133:443 ESTABLISHED
[chrome.exe]
TCP [::]:135 [::]:0 LISTENING
RpcSs
[svchost.exe]
TCP [::]:445 [::]:0 LISTENING
Can not obtain ownership information
TCP [::]:5357 [::]:0 LISTENING
Can not obtain ownership information
TCP [::]:49152 [::]:0 LISTENING
[wininit.exe]
TCP [::]:49153 [::]:0 LISTENING
eventlog
[svchost.exe]
TCP [::]:49154 [::]:0 LISTENING
Schedule
[svchost.exe]
TCP [::]:49155 [::]:0 LISTENING
[lsass.exe]
TCP [::]:49157 [::]:0 LISTENING
[services.exe]
UDP 0.0.0.0:500 *:*
IKEEXT
[svchost.exe]
UDP 0.0.0.0:3702 *:*
EventSystem
[svchost.exe]
UDP 0.0.0.0:3702 *:*
FDResPub
[svchost.exe]
UDP 0.0.0.0:3702 *:*
FDResPub
[svchost.exe]
UDP 0.0.0.0:3702 *:*
EventSystem
[svchost.exe]
UDP 0.0.0.0:4500 *:*
IKEEXT
[svchost.exe]
UDP 0.0.0.0:5355 *:*
Dnscache
[svchost.exe]
UDP 0.0.0.0:57585 *:*
FDResPub
[svchost.exe]
UDP 0.0.0.0:61957 *:*
EventSystem
[svchost.exe]
UDP 127.0.0.1:1900 *:*
SSDPSRV
[svchost.exe]
UDP 127.0.0.1:56536 *:*
SSDPSRV
[svchost.exe]
UDP 192.168.2.2:137 *:*
Can not obtain ownership information
UDP 192.168.2.2:138 *:*
Can not obtain ownership information
UDP 192.168.2.2:1900 *:*
SSDPSRV
[svchost.exe]
UDP 192.168.2.2:6646 *:*
[mcnasvc.exe]
UDP 192.168.2.2:56535 *:*
SSDPSRV
[svchost.exe]
UDP [::]:500 *:*
IKEEXT
[svchost.exe]
UDP [::]:3702 *:*
FDResPub
[svchost.exe]
UDP [::]:3702 *:*
FDResPub
[svchost.exe]
UDP [::]:3702 *:*
EventSystem
[svchost.exe]
UDP [::]:3702 *:*
EventSystem
[svchost.exe]
UDP [::]:4500 *:*
IKEEXT
[svchost.exe]
UDP [::]:5355 *:*
Dnscache
[svchost.exe]
UDP [::]:57586 *:*
FDResPub
[svchost.exe]
UDP [::]:61958 *:*
EventSystem
[svchost.exe]
UDP [::1]:1900 *:*
SSDPSRV
[svchost.exe]
UDP [::1]:56534 *:*
SSDPSRV
[svchost.exe]
UDP [fe80::384e:51f8:81cb:45ca%10]:546 *:*
Dhcp
[svchost.exe]
UDP [fe80::384e:51f8:81cb:45ca%10]:1900 *:*
SSDPSRV
[svchost.exe]
UDP [fe80::384e:51f8:81cb:45ca%10]:56533 *:*
SSDPSRV
[svchost.exe]

C:\Windows\system32>

From the looks of it, the ports(8005,8080, 8009) are not used by any other application. But still receiving the same error in eclipse:

Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

The issue persists.
 
Ron McLeod
Marshal
Posts: 4541
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you starting Tomcat from Eclipse - from the Servers tab, using Run on Server for a project?

Does the Console tab show anything interesting (there may be multiple console instances)?

What happens if you navigate to http://127.0.0.1:8080/ (or http://127.0.0.1:9090/ as configured now) when you think you have the server stopped?
 
Shirshendu Mukherjee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried ; RightClick>Run AND Run On Server as well.

There are no log details in the Console Tab. Nothing at all.

When i navigate to http://127.0.0.1:8080/; while the server is started; the Apache home page is starting as usual.

However when the server is stopped, i tried the same and the browser throws the below message


Oops! Google Chrome could not connect to 127.0.0.1:8080

Try reloading: 127.­0.­0.­1:­8080



 
Ron McLeod
Marshal
Posts: 4541
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you see on the Servers tab?
servers-tab.png
[Thumbnail for servers-tab.png]
 
Shirshendu Mukherjee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have similar details available in the servers tab. i have attached a snapshot for the same.

Please let me know if you need any further inputs from my side
servers.gif
[Thumbnail for servers.gif]
serverTab
 
Shirshendu Mukherjee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Re-attaching a better quality image
ServersTab.png
[Thumbnail for ServersTab.png]
 
Ron McLeod
Marshal
Posts: 4541
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Shirshendu - I've run out of ideas.
 
Saloon Keeper
Posts: 27885
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the IDEs forum since this is really about Eclipse, not Tomcat.

For what it's worth, I loathe and despise the pre-installed J2EE server manager plugin for Eclipse JEE. I use the sysdeo Tomcat manager plugin.
 
Shirshendu Mukherjee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you suggest that i too try to use the sysdeo Tomcat manager plugin ?

or shall i wait for some more time for the community members to suggest some work around.
 
Tim Holloway
Saloon Keeper
Posts: 27885
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I definitely recommend the sysdeo plugin. It's fairly easy to install, although I think you have to download it and manually unzip it into the Eclipse plugins folder instead of just being able to grab it straight from the Eclipse Marketplace. If you're not careful, you'll also end up on the French-language pages.

The sysdeo plugin will run in an eclipse J2EE system. It ignores WTP and WTP ignores it. You get 3 toolbar icons (start, stop, restart) and a few settings options that allow you to tell Eclipse where the Tomcat directory is and stuff like that.

Unlike WTP, sysdeo doesn't make a mutilated copy of the Tomcat config files. It uses the original ones in Tomcat in the same way that Tomcat would without Eclipse. In fact, the main differences between stand-alone and sysdeo are that A) the Eclipse debugger hooks into the copy of Tomcat that it launches and B) the catalina.out log is redirected to an Eclipse console window.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please, I wanna know if you have solved your problem?? it happens the same to me. Until now I dont know what to do, also I changed the ports but nothing happens Help me
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simply stop the server which is outside the eclipse folder i.e; go to tomcat folder-->configure tomcat-->run as administrator-->stop the server
Now open eclipse and start the server once again
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found the solution for the problem:

first change the port of tomcat in server.xml (path : apachetomcat /config/server.xml) <Connector connectionTimeout="20000" port="8089" protocol="HTTP/1.1" redirectPort="8443"/> (I'ave kept 8089)

Select Project -> right click -> run as -> run on server - > configure server manually -> provide path for apache installation -> done.
 
Tim Holloway
Saloon Keeper
Posts: 27885
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No need to "shout".

But you do realize that that means that there are 2 separate copies of Tomcat running, eating up system resources?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic