Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 04-09-2020, 04:57 AM   #1
Registered: Sep 2012
Distribution: Slackware, Manjaro, Slackarm, Raspbian, Debian
Posts: 63

Rep: Reputation: Disabled
tomcat rc.local lxc


i'm running different Slackware-installs inside lxc-containers on a Slackware-host. Each container runs tomcat; tomcat should be started from /etc/rc.d/rc.local.
The problem: there's only one container where tomcat really is started. On the other containers, tomcat doesn't come up on startup, if called from rc.local.

It's possible to start it from a shell, i tried different approaches: using /etc/rc.d/rc.tomcat, using $CATALINA_HOME/bin/ or $CATALINA_HOME/bin/, always with the same result: it run's from shell, but not from rc.local. I traced the call from rc.local on startup into the suitable section of, everything seems to be fine, but tomcat doesn't start.
I increased log-level of tomcat and emptied catalina.out before restart: when running from rc.local at startup, catalina.out remains empty. Even running rc.local from a shell works fine. Other commands in rc.local are executed at startup, just starting tomcat fails (no matter if started as a background-process [happens anyway in], or not, or at which position in rc.local it is called).
I copied startup-scripts from the working container to those, which fail, took care on owners/permissions, nothing helped, i compared file-permissions on the host-system, everything looks identical.

Has anyone an idea on how to fix this strange behaviour, or on how to find out, what happens?

thanks in advance
Old 04-09-2020, 05:09 AM   #2
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 6,224

Rep: Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461Reputation: 3461
I had a similar problem on a virtual machine (I'm not using it inside of containers) and I ended up starting it like this in /etc/rc.d/rc.local (it takes a little bit more but it starts)
# Start tomcat:
if [ -x /etc/rc.d/rc.tomcat ]; then
  rm -f /var/spool/tomcat/
  sleep 10
  /etc/rc.d/rc.tomcat start
  sleep 10
  /etc/rc.d/rc.tomcat stop
  sleep 10
  /etc/rc.d/rc.tomcat start

Last edited by ponce; 04-09-2020 at 05:11 AM.
Old 04-09-2020, 06:51 AM   #3
Registered: Sep 2012
Distribution: Slackware, Manjaro, Slackarm, Raspbian, Debian
Posts: 63

Original Poster
Rep: Reputation: Disabled
Thanks for your idea - unfortunately that was not the final solution, but threw a light on what seems to happen and showed a way to start tomcat out of rc.local at startup.

Tomcat now starts as last item in rc.local, followed by a really long, deep sleep...
/etc/rc.d/rc.tomcat start
sleep 10000d
...and i guess the machine won't reach an uptime of 10000 days.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "lxc list" vs "lxc-ls" yknivag Linux - Virtualization and Cloud 1 03-09-2017 05:53 AM
How to use Local ISO for LXC Container? sunveer Linux - Software 0 10-04-2013 04:44 AM
How to make Tomcat 4.0.1 and Tomcat 5.0.28 coexist in one server? g18397 Linux - Software 0 05-16-2006 03:16 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration