Problem with Tomcat 7 on Ubuntu 14

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

Problem with Tomcat 7 on Ubuntu 14

Postby CRB » Sun Oct 25, 2015 8:33 pm

I have been trying for a while to install OpenEMM 2015 on ubuntu 14 using the Install and Administration Guide.

I have followed the instructions closely, and Tomcat (7) itself seems to be working fine, but nevertheless, when I get to this part:

su – openemm
Do not forget the hyphen in the first line!
To start the OpenEMM environment, change to the home directory of OpenEMM and launch the start
script with
openemm.sh start


Tomcat does not start... The output to the screen looks fine (IMO):

Start /home/openemm/bin/scripts/bav-update.py .. done.
Start /home/openemm/bin/scripts/bav-trigger.py .. done.
Start /home/openemm/bin/scripts/bavd.py .. done.
Start /home/openemm/bin/bav -L INFO .. done.
Start python /home/openemm/bin/scripts/recovery.py .. done.
Start /home/openemm/bin/scripts/update.py account bounce .. done.
Start /home/openemm/bin/scripts/pickdist.py .. done.
Stopping obsolete sendmail processes: -15:14381 -15:14407 -15:14414 -15:14421 -15:14431 -15:14438 -15:14445 done.
Starting sendmails: listener * Starting Mail Transport Agent (MTA) sendmail * MTA is already running.
mail queues ADMIN QUEUE MIDQUEUE SLOWQUEUE done.
Start /home/openemm/bin/scripts/slrtscn.py .. done.
Starting up Tomcat ......
Check Java installation :OK
Check Tomcat installation :OK
Using CATALINA_BASE: /home/openemm
Using CATALINA_HOME: /opt/openemm/tomcat
Using CATALINA_TMPDIR: /home/openemm/temp
Using JRE_HOME: /opt/openemm/java
Using CLASSPATH: /opt/openemm/tomcat/bin/bootstrap.jar:/opt/openemm/tomcat/bin/tomcat-juli.jar
Tomcat started.


but

openemm.sh status

yields

No Tomcat process is running.

The /home/openemm/logs/catalina.out does seem to indicate a problem:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Oct 25, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm-2015/"/home/openemm/lib"], exists: [false], isDirectory: [false], canRead: [false]
Oct 25, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm-2015/"/home/openemm/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]
Oct 25, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm-2015/"/opt/openemm/tomcat/lib"], exists: [false], isDirectory: [false], canRead: [false]
Oct 25, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm-2015/"/opt/openemm/tomcat/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:208)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)


I have JDK8 installed, and apparently working fine, but it looks like there is some problem with java.

Would anyone be able to give me a hint as to how I could fix this?
CRB
 
Posts: 6
Joined: Sun Oct 25, 2015 8:23 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby maschoff » Mon Oct 26, 2015 9:18 pm

From the error messages it looks like your OpenEMM directory is not /home/openemm but /home/openemm-2015. If so, you have to change some directory paths in the configuration files.
OpenEMM Maintainer
maschoff
Site Admin
 
Posts: 2131
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Re: Problem with Tomcat 7 on Ubuntu 14

Postby CRB » Tue Oct 27, 2015 1:51 am

Hi maschoff,

Thanks for your reply. The directory was /home/openemm-2015 with a symbolic link to it from /home/openemm as suggested in Chapter 6 of the installation document. I tried deleting the symbolic link and moving the openemm-2015 to openemm, but I get a similar error message in logs/catalina.out:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Oct 26, 2015 5:23:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm/"/home/openemm/lib"], exists: [false], isDirectory: [false], canRead: [false]
Oct 26, 2015 5:23:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm/"/home/openemm/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]
Oct 26, 2015 5:23:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm/"/opt/openemm/tomcat/lib"], exists: [false], isDirectory: [false], canRead: [false]
Oct 26, 2015 5:23:55 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/home/openemm/"/opt/openemm/tomcat/lib/*.jar"], exists: [false], isDirectory: [false], canRead: [false]
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:208)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)


I'm not sure I understand why it is talking about directories such as

/home/openemm/"/home/openemm/lib"

and

/home/openemm/"/opt/openemm/tomcat/lib"

which appear to be concatenations of directories related to the CATALINA_BASE and CATALINA_HOME directories.

In any case the /opt/openemm/tomcat/lib directory does exist, and it does contain .jar files, but perhaps for some reason it is looking in

/home/openemm/opt/openemm/tomcat/lib

which is obviously gobbledigook...

If I make a directory /home/openemm/CRB, cd to that (and create an empty logs file in it), and run /opt/openemm/tomcat/bin/startup.sh with:

CATALINA_HOME=/opt/openemm/tomcat
CATALINA_BASE=/home/openemm/CRB
(and JAVA_HOME=/opt/openemm/java )

then tomcat starts up just fine, so tomcat can run without problems with my setup, and it must be something specific to the files in the /home/openemm directory which are messing things up.

Perhaps something in one of the conf files in the /home/openemm directory is somehow causing the CATALINA BASE and HOME values to be concatenated, so that tomcat cannot find the lib directory which is in CATALINA_HOME, i.e. /opt/openemm/tomcat.


...Apologies for the long post, and thanks again for your help, but I would really like to get this working and would definitely appreciate any ideas you may have as to what could be causing the issue, or any workaraounds you may be able to think of.
CRB
 
Posts: 6
Joined: Sun Oct 25, 2015 8:23 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby chillson22 » Tue Oct 27, 2015 1:38 pm

Hi!

Ive got pretty much the same problem.

Startup of openemm2015 looks fine, but after successful confirmation

./openemm.sh status

yields: No Tomcat process running.

Tomcat, started alone works fine now, after I managed to apply the JAVA_HOME folder via a new setenv.sh file. I could reach the webinterface on my loopback without any problems.
But with openemm there is nothing running. The webinterface is not reachable (perhaps cos theres no tomcat process running).

So if anyone can help out with a great idea. Pls let us know =)

thanks!
chillson22
 
Posts: 2
Joined: Tue Oct 27, 2015 1:34 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby CRB » Wed Oct 28, 2015 1:34 pm

I seem to have fixed the problem I was having by replacing the following line in conf/catalina.properties with the one after it:

common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"

was replaced by:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

The latter is the definition given for common.loader in a fresh install of Tomcat 7. The version of the definition which includes the double-quotes (which is the one in the conf/catalina.properties file which comes with OpenEMM) messes something up in my setup. Hope this helps someone else!
CRB
 
Posts: 6
Joined: Sun Oct 25, 2015 8:23 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby maschoff » Wed Oct 28, 2015 4:18 pm

File catalina.properties provided with the binary tarball of OpenEMM is the original (i.e. unmodified) file of the Tomcat package. It is included with OpenEMM just for convenience.
OpenEMM Maintainer
maschoff
Site Admin
 
Posts: 2131
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Re: Problem with Tomcat 7 on Ubuntu 14

Postby CRB » Thu Oct 29, 2015 1:45 am

I downloaded:

apache-tomcat-7.0.65.tar.gz

from

http://tomcat.apache.org/download-70.cgi

and it came with this line in catalina.properties:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

Perhaps this was altered with respect to an earlier version.
CRB
 
Posts: 6
Joined: Sun Oct 25, 2015 8:23 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby maschoff » Thu Oct 29, 2015 8:22 am

Your example is from Tomcat 7, the file within OpenEMM is from Tomcat 8.
OpenEMM Maintainer
maschoff
Site Admin
 
Posts: 2131
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Re: Problem with Tomcat 7 on Ubuntu 14

Postby CRB » Thu Oct 29, 2015 1:45 pm

That is true.

Perhaps it will be helpful to others that are using Tomcat v7 to know that they may need to alter that definition.
CRB
 
Posts: 6
Joined: Sun Oct 25, 2015 8:23 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby chillson22 » Fri Oct 30, 2015 11:12 am

thx mate. runs smooth as ice cream in the sun =)
chillson22
 
Posts: 2
Joined: Tue Oct 27, 2015 1:34 pm

Re: Problem with Tomcat 7 on Ubuntu 14

Postby friedbrain » Tue Oct 11, 2016 12:20 pm

Strangely I get the same message after updating from OpenEMM2015 R1 to R2. I didn't change anything in the Tomcat directory and am also using Tomcat 7.

It seems like the catalina.properties has been changed in R2 without any documentation. :?
friedbrain
 
Posts: 62
Joined: Tue Aug 25, 2009 8:17 am


Return to Installation & Upgrades

Who is online

Users browsing this forum: No registered users and 5 guests