• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Trouble installing Tomcat

M

mirage

Guest
Hi,

I have Plesk 3.0 and just tried to install Java. Seemed to have gone well per the report except that httpd wasn't restarting:


Trying to find JAVA_HOME variable in the /usr/share/tomcat5/conf/tomcat5.conf...
JAVA_HOME variable is already in the /usr/share/tomcat5/conf/tomcat5.conf and has correct value (/usr/lib/jvm/java)
Trying to replace TOMCAT_USER variable in the /usr/share/tomcat5/conf/tomcat5.conf... done
Making chown and chmod under JDK stuff
Trying to set up Tomcat permissions... chmod: cannot access `/usr/share/tomcat5/conf/*': No such file or directory
done
websrvmng: Service /etc/init.d/httpd failed to restart
websrvmng: Service /etc/init.d/httpd failed to restart
Unable to restart web server, please do it manually

After loggin in to do that Apache tells me this:

httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/jk.conf: API module structure 'jk_module' in file /usr/lib/httpd/modules/mod_jk.so is garbled - expected signature 41503232 but saw 41503230 - perhaps this is not an Apache module DSO, or was compiled for a different Apache version?

I commented this out for now and then was able to start Tomcat. I'm really new to this whole Tomact thing so I don't know what not having the jakarta module running means.

Can anyone tell me how to fix this manually?

Thanks
Juergen
 
Now I just install fcgid and I'm getting the same error for that config file. I think I may have upgraded my apache server from a different distro recently.... (utterramblings) perhaps thats the problem....

I could use some advice as to how to straighten this out...

Thanks much!
 
Hi juesch,

I'm getting the same error (and used the utterramblings-repo too). How did you solve this problem?

Thanks in advance!
 
Hi -

I haven't resolved it, I guess. Like I mentioned I just commented out that line in the include. Haven't worked on it since.
 
Hi,

On an other VPS I upgraded to Plesk 8.3.0 and PHP5 using the (great!) atomic-repo. However, if I try to start Tomcat on this VPS, the server returns

# /etc/init.d/tomcat5 start
Starting tomcat5: /usr/bin/rebuild-jar-repository: error: Could not find jdbc-stdext Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Could not find jndi Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm
/usr/bin/rebuild-jar-repository: error: Could not find jaas Java extension for this JVM
/usr/bin/rebuild-jar-repository: error: Some detected jars were not found for this jvm
# /etc/init.d/tomcat5 status
lock file found but no process running for pid 5151

Apache itself is working fine. There is an old file "/etc/httpd/conf.d/jk.conf" containing 1 line:

LoadModule jk_module /usr/lib/httpd/modules/mod_jk.so

The file /usr/lib/httpd/modules/mod_jk.so exists. Tomcat5 is installed:

0# rpm -q tomcat5
tomcat5-5.0.30-11jpp

Does anyone know what to do to get Tomcat started?

Thanks for your help!
 
Anyone? It seems to going even worse...

Since yesterday, Tomcat is restarting every 5 minutes (however, I didn't changed any config's yesterday). With every restart, 2 files are added to the /tmp-dir (javaXXXXXX files). Even if I stop Tomcat (/etc/init.d/tomcat stop), it is (malicious) restarted after 5 minutes:

# /etc/init.d/tomcat5 status
lock file found but no process running for pid 29942

/var/log/messages shows:

Apr 1 11:48:28 servername runuser: Using CATALINA_BASE: /usr/share/tomcat5
Apr 1 11:48:28 servername runuser: Using CATALINA_HOME: /usr/share/tomcat5
Apr 1 11:48:28 servername runuser: Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Apr 1 11:48:28 servername runuser: Using JAVA_HOME: /usr/lib/jvm/java
Apr 1 11:48:28 servername runuser: /usr/lib/jvm/java/bin/java: line 67: /tmp/javast3455: Permission denied
Apr 1 11:48:28 servername runuser: /usr/lib/jvm/java/bin/java: line 67: /tmp/javast3455: Success
Apr 1 11:48:28 servername tomcat5: dtomcat5 startup succeeded
Apr 1 11:48:32 servername runuser: Using CATALINA_BASE: /usr/share/tomcat5
Apr 1 11:48:32 servername runuser: Using CATALINA_HOME: /usr/share/tomcat5
Apr 1 11:48:32 servername runuser: Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Apr 1 11:48:32 servername runuser: Using JAVA_HOME: /usr/lib/jvm/java
Apr 1 11:48:32 servername tomcat5: dtomcat5 startup succeeded
Apr 1 11:53:34 servername runuser: Using CATALINA_BASE: /usr/share/tomcat5
Apr 1 11:53:34 servername runuser: Using CATALINA_HOME: /usr/share/tomcat5
Apr 1 11:53:34 servername runuser: Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Apr 1 11:53:34 servername runuser: Using JAVA_HOME: /usr/lib/jvm/java
Apr 1 11:53:34 servername runuser: /usr/lib/jvm/java/bin/java: line 67: /tmp/javab14084: Permission denied
Apr 1 11:53:34 servername runuser: /usr/lib/jvm/java/bin/java: line 67: /tmp/javab14084: Success
Apr 1 11:53:34 servername tomcat5: dtomcat5 startup succeeded
Apr 1 11:53:37 servername runuser: Using CATALINA_BASE: /usr/share/tomcat5
Apr 1 11:53:37 servername runuser: Using CATALINA_HOME: /usr/share/tomcat5
Apr 1 11:53:37 servername runuser: Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Apr 1 11:53:37 servername runuser: Using JAVA_HOME: /usr/lib/jvm/java
Apr 1 11:53:37 servername tomcat5: dtomcat5 startup succeeded
Apr 1 11:58:37 servername runuser: Using CATALINA_BASE: /usr/share/tomcat5
Apr 1 11:58:37 servername runuser: Using CATALINA_HOME: /usr/share/tomcat5
Apr 1 11:58:37 servername runuser: Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Apr 1 11:58:37 servername runuser: Using JAVA_HOME: /usr/lib/jvm/java
Apr 1 11:58:37 servername runuser: /usr/lib/jvm/java/bin/java: line 67: /tmp/javae28146: Permission denied
Apr 1 11:58:37 servername runuser: /usr/lib/jvm/java/bin/java: line 67: /tmp/javae28146: Success
Apr 1 11:58:37 servername tomcat5: dtomcat5 startup succeeded
Apr 1 11:58:40 servername runuser: Using CATALINA_BASE: /usr/share/tomcat5
Apr 1 11:58:40 servername runuser: Using CATALINA_HOME: /usr/share/tomcat5
Apr 1 11:58:40 servername runuser: Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Apr 1 11:58:40 servername runuser: Using JAVA_HOME: /usr/lib/jvm/java
Apr 1 11:58:40 servername tomcat5: dtomcat5 startup succeeded

Sometimes, this causes problems with the memory of this server which result in a crash of Apache:

Apr 1 12:28:11 servername xinetd[7216]: warning: cannot open /etc/hosts.allow: Too many open files in system
Apr 1 12:28:51 servername wdcollect[32538]: Connection to server has been established.
Apr 1 12:28:53 servername tomcat5: dtomcat5 startup failed
Apr 1 12:28:55 servername runuser: execvp: Cannot allocate memory
Apr 1 12:28:55 servername tomcat5: dtomcat5 startup failed
Apr 1 12:29:26 servername httpd: httpd shutdown succeeded
Apr 1 12:29:29 servername httpd: httpd startup succeeded

The /var/log/tomcat5/catalina.out-log is only showing:

[...]
/usr/lib/jvm/java/bin/java: line 67: /tmp/javaQ17411: Permission denied
/usr/lib/jvm/java/bin/java: line 67: /tmp/javaQ17411: Success
/usr/lib/jvm/java/bin/java: line 67: /tmp/javap32753: Permission denied
/usr/lib/jvm/java/bin/java: line 67: /tmp/javap32753: Success
/usr/lib/jvm/java/bin/java: line 67: /tmp/javaS18204: Permission denied
/usr/lib/jvm/java/bin/java: line 67: /tmp/javaS18204: Success
/usr/lib/jvm/java/bin/java: line 67: /tmp/javaz28176: Permission denied
/usr/lib/jvm/java/bin/java: line 67: /tmp/javaz28176: Success
[...]

Can anyone help me please? As Tomcat is causing my server very unstable, I prefer to stop this service (but it seems Tomcat is restarting every time). So: how to stop Tomcat permanently - or, how to get it working without getting memory-problems?

Tnx!
 
It is possible that you may not have enough available memory on your Server
for JAVA (Tomcat). JAVA requires a generous amount of real physical RAM.

You may disable the Tomcat Service in the Services section of the Plesk control Panel.
 
It is possible that you may not have enough available memory on your Server
for JAVA (Tomcat). JAVA requires a generous amount of real physical RAM.
I can't find the real system requirements. Any idea how much RAM is needed? (our servers are virtualized using Virtuozzo)

You may disable the Tomcat Service in the Services section of the Plesk control Panel.
The Plesk control panel tells me Tomcat is not running (cfr. attachment). However, it is (every 5 minutes, a java*-file is added to my /tmp-dir). Shell shows:

-bash-3.00# /etc/init.d/tomcat5 status
lock file found but no process running for pid 9239
-bash-3.00# /etc/init.d/tomcat5 stop
Stopping tomcat5: [ OK ]
-bash-3.00# /etc/init.d/tomcat5 status
tomcat5 is stopped.
but after 5 minutes:

-bash-3.00# /etc/init.d/tomcat5 status
lock file found but no process running for pid 30506
How can I *really* disable this (can't find anything in cronjobs) get Tomcat started a clean way?

To
 

Attachments

  • tomcat_status_plesk.gif
    tomcat_status_plesk.gif
    6.5 KB · Views: 45
ToRum,

For an OS based VPS, such as Virtuozzo, 512MB RAM would be a good starting point
for JAVA.

With regards to the rogue Tomcat process, check the /etc/init.d/ to see if there is a startup
script?
 
For an OS based VPS, such as Virtuozzo, 512MB RAM would be a good starting point
for JAVA.
The hardware node has 4GB DDR2 RAM for 7 VPS's (only one uses Tomcat).

With regards to the rogue Tomcat process, check the /etc/init.d/ to see if there is a startup
script?
As I told, I tried serveral times to stop Tomcat using /etc/init.d/tomcat5. However, it seems to restart after 5 minutes:

-bash-3.00# /etc/init.d/tomcat5 status
lock file found but no process running for pid 13867
-bash-3.00# /etc/init.d/tomcat5 stop
[ OK ]
-bash-3.00# /etc/init.d/tomcat5 status
tomcat5 is stopped.
but 5 minutes later:
-bash-3.00# /etc/init.d/tomcat5 status
lock file found but no process running for pid 9817

So, my question is: where is Tomcat automaticly restarted? (can't find anything in the cronjobs)
 
Back
Top