Solved

Restart Tomcat Manually

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multiple SSL sites on one IP? 3 38
Sync (copy?) iPhone iOS 10 camera(s) photos to macOS Sierra Photos App 5 108
PHP_POST() error message 9 78
Nimble Storage 3 135
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
#Citrix #POC #XenDesktop #vCenter #VMware #ESX
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.

749 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