Solved

Restart Tomcat Manually

Posted on 2009-04-06
4
1,092 Views
Last Modified: 2013-12-27
I'm getting the following error when I try to run a servlet on Eclipse.  Starting Tomcat v6.0 Server at LocalHost has encountered a problem.  

Serveral Ports (8080, 8009) required by tomcat ... are already in use.  The server may already be running in another process...

Basically, I'm pretty sure it didn't shut down properly.  I'd love to try to shut it down manually through the terminal (on a mac) but not sure how.  

Any ideas?

B-rad
0
Comment
Question by:b_rad_wright
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24083022
You can say following command, enter root user passwd when prompted.
To Stop
sudo /Library/StartupItems/Tomcat/Tomcat stop
 
To Start
sudo /Library/StartupItems/Tomcat/Tomcat start

Open in new window

0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24083036
Another method of doing it is discuss here
Starting and Stopping Tomcat
Tomcat expects certain environment variables to be defined before it starts. In order to simplify the startup and shutdown processes, you can create re-usable scripts. I usually store scripts like these in a directory called bin under my home directory. (Thats pretty standard in the Unix world.)

liz@localhost:~> mkdir bin
liz@localhost:~> cd bin
liz@localhost:bin>
Now you can create a file (using your favorite text editor, must be saved with unix line endings) called ~/bin/start_tomcat with the following contents:

#!/bin/sh
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.1
export JAVA_HOME=/usr
$CATALINA_HOME/bin/startup.sh
And a file called ~/bin/stop_tomcat with these contents:

#!/bin/sh
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.1
export JAVA_HOME=/usr
$CATALINA_HOME/bin/shutdown.sh
Finally, you must make these files executable:

liz@localhost:bin> chmod ug+x start_tomcat stop_tomcat

Reference Link:http://developer.apple.com/internet/java/tomcat1.html
0
 

Author Comment

by:b_rad_wright
ID: 24083082
So this obviously displays that I am a novice, but can you give me a little more beginning info on your first solution?  Specifically, what is sudo?  Is this done in the Terminal?  if so, what directory do I need to be in?

The second solution is way over my head.   Sorry for the inconvenience
0
 
LVL 14

Accepted Solution

by:
Deepak Kosaraju earned 125 total points
ID: 24083311
Yes sudo is done in terminal, sudo is used to access r run any command as root privileges as rollbased user. you can be in any directory to issue that sudo command because we are pointing the absolute path to sudo.
but before running the above sudo make sure you have the /Library/StartupItems/Tomcat/ following dir and binaries inside it.
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question