Adarsh Nanu
Adarsh Nanu

Reputation: 2211

Tomcat user instance not working - Ubuntu 12.04

**I installed tomcat7-user and it is not working. Please find below what I did. I did a system wide installation first not knowing there is a much user specific instance.

apt-get install tomcat7

It installed successfully, but since I wanted user instance I removed it**

apt-get remove tomcat7

Then installed tomcat7 user instance

apt-get tomcat7-user

It shows installed.

I created an instance

tomcat6-instance-create mydev-web

Now I can see the folder mydev-web created inside my home

~/mydev-web$ ls
bin  conf  logs  temp  webapps  work

~/mydev-web/webapps$ ls
index.html

I startup tomcat. I could see unable to bind port as already used error. So I made the port 8082

<Connector port="8082" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />

I start tomcat

~/mydev-web/bin$ ./startup.sh 
Using CATALINA_BASE:   /home/adarsh/mydev-web
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /home/adarsh/mydev-web/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk
Using CLASSPATH:       /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Tomcat started

~/mydev-web/bin$ ps -a
  PID TTY          TIME CMD
 5075 pts/0    00:00:02 java
 5104 pts/0    00:00:00 ps

At browser i give url

http://localhost:8082/index.html.

Can I expect this page to showup ?

When I try to shutdown I see what looks like error messages.

:~/mydev-web/bin$ ./shutdown.sh 
Using CATALINA_BASE:   /home/adarsh/mydev-web
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /home/adarsh/mydev-web/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk
Using CLASSPATH:       /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Tomcat stopped

Please guide me.. my final target is to try some jsp

Thanks

Upvotes: 2

Views: 3466

Answers (1)

user2467519
user2467519

Reputation: 21

Remove the directories listed in server.loader and shared.loader. The deb package does not create the directories /var/lib/tomcat7/*.

Upvotes: 2

Related Questions