В Fri, 12 Apr 2013 20:26:40 +0200 John Connor <jaconnor44@gmail.com> пишет:
Background: I run a small school server in Kolin in the Czech Republic. The server is running OpenSUSE 12.2, 32 bits. I was asked to install a webapp (OLAT, Online Learning and Teaching, by the University of Zurich). This was our first webapp, so I installed Tomcat 7 and the JDK, then OLAT. Tomcat worked without problems, and all the webapps bundled with Tomcat also work. OLAT, however, refused to deploy.
To cut a long story short, I discovered that OLAT would deploy and functioned correctly only when Tomcat was NOT launched using systemd. If I launched Tomcat via the command line, using batch files not registered with systemd, everything was OK. But using Yast runlevel editor to launch Tomcat somehow invokes systemd, and then OLAT will not deploy.
Show your unit file for a start.
This presented me with the problem of how to start Tomcat after a reboot, since I couldn't use the run-level editor and if I understand correctly inittab is also not available under systemd. In the end I used a fairly horrible hack - I used an @reboot tag in the root crontab. This restarts Tomcat on reboot without involving systemd directly, and everything works. My users are happy, but I'm not.
Several questions: 1) does anybody have any explanation for this bizarre behaviour? 2) Why is the execution of some batch files (in this case /etc/init.d/tomcat) intercepted by systemd, while the execution of others is not? How can I break this link? (renaming the tomcat.service file didn't make any difference) 3) If I want to start something at or shortly after boot without using systemd, is there an "official" way to do it?
I thought the problem might lie in some difference in the environment between a command-line launch and a systemd launch, so I duplicated the commandline environment using printenv > file, then used <file> in an EnvironmentFile directive in the tomcat.service file. It made no difference.
I don't want to get into the systemd is better/worse than systemV debate, but I will observe that the way systemd "takes over" some batch files made debugging much more difficult. That may be just my ignorance talking.
Thanks for any help
John Connor
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org