Solved

Restart Tomcat Manually

Posted on 2009-04-06
4
1,095 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
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.

707 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