wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Not able to launch tomcat via eclipse ee Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Not able to launch tomcat via eclipse ee" Watch "Not able to launch tomcat via eclipse ee" New topic
Forums: Tomcat IDEs, Version Control and other tools
Author

Not able to launch tomcat via eclipse ee

Shirshendu Mukherjee
Greenhorn

Joined: Feb 14, 2014
Posts: 6
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
Ron McLeod
Ranch Hand

Joined: Feb 12, 2013
Posts: 292
    
    5

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

Joined: Feb 14, 2014
Posts: 6
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
Ranch Hand

Joined: Feb 12, 2013
Posts: 292
    
    5

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

Joined: Feb 14, 2014
Posts: 6
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
Ranch Hand

Joined: Feb 12, 2013
Posts: 292
    
    5

What do you see on the Servers tab?


[servers-tab.png]

Shirshendu Mukherjee
Greenhorn

Joined: Feb 14, 2014
Posts: 6
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



[Thumbnail for servers.gif]

Shirshendu Mukherjee
Greenhorn

Joined: Feb 14, 2014
Posts: 6
Re-attaching a better quality image


[Thumbnail for ServersTab.png]

Ron McLeod
Ranch Hand

Joined: Feb 12, 2013
Posts: 292
    
    5

Sorry Shirshendu - I've run out of ideas.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15956
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Shirshendu Mukherjee
Greenhorn

Joined: Feb 14, 2014
Posts: 6
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

Joined: Jun 25, 2001
Posts: 15956
    
  19

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.
renyuni suzuki
Greenhorn

Joined: May 03, 2014
Posts: 2
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
sowmya chakilam
Greenhorn

Joined: Jun 27, 2014
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to launch tomcat via eclipse ee
 
Similar Threads
tomcat Server is not starting.
Error in running tomcat
Running Tomcat 7
Error in Apache server (ECLIPSE)
Error in running tomcat