1

Everyday when I start my computer, and then attempt to start my tomcat server in eclipse , it gives me following error.

starting tomcat v7.0 server at localhost has encountered a problemPorts busy error

I have googled for this issue but whatever I got was temporary solution/i.e killing apache sudo kill $(ps -aef | grep apache| awk '{print $2}') this solves the problem but not permanantly. after entering above command on terminal , I start tomcat from eclipse and then my tomcat server starts.

but I have to enter this command daily before starting my work and also whenever I restart my PC,is there any other permanant solution which can directly allow me to start my tomcat from eclipse.

I have tried adding and removing tomcat server also deleting the server and adding it back,but this doesnt solve the problem.

FYI : I am using ubuntu 14.04,eclipse mars,tomcat version 7.

Cœur
  • 37,241
  • 25
  • 195
  • 267
NikhilP
  • 1,508
  • 14
  • 23
  • 2
    change the ports by double clicking the server – KVK Feb 03 '16 at 06:55
  • Possible duplicate of ["starting Tomcat server 7 at localhost has encountered a prob"](http://stackoverflow.com/questions/13185498/starting-tomcat-server-7-at-localhost-has-encountered-a-prob) – Aleksandr M Feb 03 '16 at 09:45

3 Answers3

1

change the port numbers in server configuration.you should change all the three port number is show in bellow image.

enter image description here

KVK
  • 1,257
  • 2
  • 17
  • 48
  • Or alternatively, change the port numbers of the Tomcat that is running at the OS level by changing its conf/server.xml . – Erwin Smout Feb 03 '16 at 07:24
1

also you can try to disable the autostart on boot, and launch tomcat from eclipse.

sudo systemctl disable tomcat7.service

André Carvalho
  • 511
  • 4
  • 9
0

Looks like you have already installed tomcat (or other application) that used 8005 or 8080 port.

You can find that application by command:

sudo netstat -lntp | grep 8080

sudo netstat -lntp | grep 8005

If you not use that application, just remove it :

sudo apt-get remove APP

P. S. Also you can just run tomcat from eclipse on other (not 8005 and 8080) ports.

Xupypr MV
  • 935
  • 10
  • 18
  • Wouldn't it be better to determine the service running on these ports and just disable autostarttup at boottime instead of removing the whole app? – Frank Feb 03 '16 at 07:05