GeeCON Prague 2014*
The moose likes Linux / UNIX and the fly likes how to find location of installed tomcat directory in ubuntu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to find location of installed tomcat directory in ubuntu" Watch "how to find location of installed tomcat directory in ubuntu" New topic
Author

how to find location of installed tomcat directory in ubuntu

Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
Hi,
Iam going to start a dynamic web project. But i dont know whether in my system is there any installed tomcat . I nstalled tomcat7.0 when i try to run tomcat7 getting error like

priya@pp:~$ sudo /usr/share/tomcat7/bin/catalina.sh run
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Jun 26, 2013 11:36:35 AM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /usr/share/tomcat7/temp
Jun 26, 2013 11:36:35 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/share/tomcat7/conf/server.xml]
Jun 26, 2013 11:36:35 AM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /usr/share/tomcat7/temp
Jun 26, 2013 11:36:35 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/share/tomcat7/conf/server.xml]
Jun 26, 2013 11:36:35 AM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.
priya@pp:~$ usr/share/tomcat7/bin/catalina.sh
bash: usr/share/tomcat7/bin/catalina.sh: No such file or directory
priya@pp:~$ usr/share/tomcat7/bin/catalina.sh
bash: usr/share/tomcat7/bin/catalina.sh: No such file or directory



How to find location of installed tomcat directory in ubunto12.04??
Appreciating your help.







Thanks
PriyaChek
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14194
    
  20

Note: /usr/share/tomcat7/bin/catalina.sh is not the same as usr/share/tomcat7/bin/catalina.sh (you are missing the / at the beginning in the second example). You have to be careful to use the exact right commands, otherwise it will not work.

It looks like you have Tomcat 7 partially installed in /usr/share/tomcat7, but parts of it are missing.

Try to re-install Tomcat.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
Thanks dude..but i would like to know command to find the path of the directory of already installed tomcat6.0 in ubunto 12.04....Help me Plzzzz
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14194
    
  20

Tomcat 6 or Tomcat 7?

How did you install it? Through Ubuntu's standard package management system? Which package exactly did you install? You could try removing and reinstalling it:

sudo apt-get remove tomcat7
sudo apt-get install tomcat7
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
No. I installed manualy..ok now iam installing new one.
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
I can't untar the file through terminal..

:~$ tar xvzf apache-tomcat-7.0.41.tar.gz
tar (child): apache-tomcat-7.0.41.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

The correct command is tar -xvf <your-tar-file-name.tar.gz>

Also it says that no such file or directory. Make sure that you are standing in the correct directory path and your tar file is actually present.


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
hi,
iam getting same error after re-installing tomcat7.0

priya@spiral12:/$ sudo /usr/share/tomcat7/bin/catalina.sh run
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Jun 26, 2013 3:00:54 PM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /usr/share/tomcat7/temp
Jun 26, 2013 3:00:54 PM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/share/tomcat7/conf/server.xml]
Jun 26, 2013 3:00:54 PM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /usr/share/tomcat7/temp
Jun 26, 2013 3:00:54 PM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/share/tomcat7/conf/server.xml]
Jun 26, 2013 3:00:54 PM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.

appreciating any help..
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
Now iam getting error like:

priya@spiral12:/usr/share/tomcat7/apache-tomcat-7.0.41$ $CATALINA_HOME/bin/startup.sh run
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/default-java
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
/usr/share/tomcat7/bin/catalina.sh: 389: /usr/share/tomcat7/bin/catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent

plzz help to fix this.
is there any way that juno provides us to download and install tomcat 7 during when we set directory for tomcat during we start to create a dynamic web project.. w/o doing these stuffs....???


Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Priya chek wrote:
is there any way that juno provides us to download and install tomcat 7 during when we set directory for tomcat during we start to create a dynamic web project.. w/o doing these stuffs....???


Yes Eclipse does come with an option to download the server and install it to be used.

However its best that you know how to setup a tomcat instance yourself. I see that you are installing in the /usr/share directory , is it possible that you are having rights issue on this directory ? Its just a hunch . So try installing tomcat in your home directory and see if it runs fine or not.
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
ok...Anyway Thanks for your help yaar...hey now i got path of previously installed tomcat ..ie tomcat6.0..now getting error when running server like

Several ports (8005, 8080) required by Tomcat v6.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).

Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Saif Asif wrote:The correct command is tar -xvf <your-tar-file-name.tar.gz>



Well the .gz ending of the file name suggests its being compressed. The "z" option letter would take this into account.

-z, --gzip, --gunzip, --ungzip filter the archive through gzip
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Priya chek wrote:ok...Anyway Thanks for your help yaar...hey now i got path of previously installed tomcat ..ie tomcat6.0..now getting error when running server like

Several ports (8005, 8080) required by Tomcat v6.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).



It seems that the ports required by tomcat 8080, 8009 are already in use by some other application or process. You will have to either change the ports in the $TOMCAT_DIR$/conf/server.xml if you cannot stop the process using up those ports, or you can simply close the other process and free up the ports for tomcat to use .
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Ivan Jozsef Balazs wrote:
Saif Asif wrote:The correct command is tar -xvf <your-tar-file-name.tar.gz>



Well the .gz ending of the file name suggests its being compressed. The "z" option letter would take this into account.

-z, --gzip, --gunzip, --ungzip filter the archive through gzip


Oh yeah you are right . Thanks for pointing that out Ivan
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
/usr/share/tomcat7/bin/catalina.sh: 389: /usr/share/tomcat7/bin/catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent


Directory nonexistent

Can you check if this path exists and you can write to it? /usr/share/tomcat7/logs/
Priya chek
Ranch Hand

Joined: Feb 12, 2013
Posts: 44
actuall path is usr/share/tomcat7/apache-tomcat-7.0.41$ $CATALINA_HOME/bin/.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Priya chek wrote:actuall path is usr/share/tomcat7/apache-tomcat-7.0.41$ $CATALINA_HOME/bin/.


I want you to do one thing for us, just share the complete directory listing of the following folders here.

1. $CATALINA_HOME$/bin
2. $CATALINA_HOME$/logs
3. $CATALINA_HOME$/conf

I want to see the contents of these folders.
 
GeeCON Prague 2014
 
subject: how to find location of installed tomcat directory in ubuntu