Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1523112
Summary: | tomcat systemd does not cope with - in service names. | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Joe Madden <joe.madden> | |
Component: | tomcat | Assignee: | Coty Sutherland <csutherl> | |
Status: | CLOSED ERRATA | QA Contact: | tomcat-qe | |
Severity: | low | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.7 | CC: | cww, mmadzin, systemd-maint-list | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1523248 (view as bug list) | Environment: | ||
Last Closed: | 2020-09-29 20:31:09 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1810269, 1523248 |
Description
Joe Madden
2017-12-07 09:26:28 UTC
If I am not mistaken, we don't support variable expansion in environment files, so this: JAVA_OPTS="${JAVA_OPTS} -Dspring.profiles.active=live,default -Duser.timezone=Europe/London -Dlog4j.configuration=file:${CATALINA_BASE}/conf/ntis-adapter/log4j.xml" and CATALINA_TMPDIR="${CATALINA_BASE}/temp" can't work. Yep - your correct. I've just fixed this in my config. Please note this is not about my service not working, currently in the process of fixing it but it wouldn't load any of the virables while i had a dash in the service name. Removed that and it is now loading CATALINA_BASE Thanks Hmm, looks like there is a bug. Minimal reproducer: [root@qeos-13 system]# cat /etc/systemd/system/test@.service [Service] EnvironmentFile=/etc/sysconfig/test%I Type=oneshot ExecStart=/usr/bin/env [root@qeos-13 system]# touch /etc/sysconfig/testa-a [root@qeos-13 system]# systemctl start test Job for test failed because a configured resource limit was exceeded. See "systemctl status test" and "journalctl -xe" for details. The same problem seems to be also in upstream version of systemd (systemd-235-4.fc28.x86_64) Ok, so the problem is not in systemd, it behaves correctly, although the error message is terrible and I had to look into the code to see what is actually wrong. But anyway. https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers "%i" - For instantiated units: this is the string between the "@" character and the suffix of the unit name. "%I" - Same as "%i", but with escaping undone. THis means that systemd will do unescaping which in this case means that instead of /etc/sysconfig/tomcat@ntis-adapter systemd is looking at /etc/sysconfig/tomcat@ntis/adapter So in short: Tomcat needs to replace %I with %i in their unit file. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: tomcat security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4004 |