ioplex
July 14, 2025, 2:33pm
1
I created a systemd service on Rocky 9.5 but it had a typo in it:
# systemctl status keycloak
○ keycloak.service - keycloak-26.3.1
Loaded: loaded (/etc/systemd/system/keycloak.service; disabled; preset: disabled)
Active: inactive (dead)
systemd[1]: /etc/systemd/system/keycloak.service:14: Unknown key name 'ExexStop' in sec>
So I corrected the typo (ExexStop → ExecStop):
# cat /etc/systemd/system/keycloak.service
[Unit]
Description=keycloak-26.3.1
After=network.target
[Service]
SuccessExitStatus=143
User=kcloak
Group=kcloak
Type=forking
WorkingDirectory=/opt/kcloak/keycloak-26.3.1
StandardOutput=append:/opt/kcloak/keycloak-stdout.txt
StandardError=append:/opt/kcloak/keycloak-stderr.txt
ExecStart=/opt/kcloak/keycloak-26.3.1/run.sh
ExecStop=/bin/kill -15 $MAINPID
[Install]
WantedBy=multi-user.target
and did a daemon-reload:
# systemctl daemon-reload
but to no effect. The typo persists:
# systemctl status keycloak
○ keycloak.service - keycloak-26.3.1
Loaded: loaded (/etc/systemd/system/keycloak.service; disabled; preset: disabled)
Active: inactive (dead)
systemd[1]: /etc/systemd/system/keycloak.service:14: Unknown key name 'ExexStop' in sec>
I even removed the file entirely, did a daemon-reload
# systemctl daemon-reload
# systemctl status keycloak
Unit keycloak.service could not be found.
and then re-installed the file but again, it’s still using the old file content and generating the same error.
How do I get systemd to see the updated .service control file?
Hi,
Have you tried:-
systemctl restart keycloak
Regards Tom.
Changing the file and a daemon-reload should be enough. If the file isn’t updating correctly, perhaps there is another keycloak.service file on the server?
find / -iname keycloak.service
or perhaps there is a /etc/systemd/system/keycloak.service.d/override.conf if someone has used something like systemctl edit keycloak.service.
ioplex
July 14, 2025, 6:32pm
4
This particular system is very stock, virtually unused and when it is, only by me.
# find . -path ./mnt -prune -o -print | grep keycloak.service
./root/keycloak.service
./opt/kcloak/keycloak-26.3.1/lib/lib/main/org.keycloak.keycloak-services-26.3.1.jar
# rpm -qa | grep keycloak
<no results>
# ps fax | grep systemd
1 ? Ss 0:05 /usr/lib/systemd/systemd rhgb --switched-root --system --deserialize 31
641 ? Ss 0:02 /usr/lib/systemd/systemd-journald
655 ? Ss 0:00 /usr/lib/systemd/systemd-udevd
807 ? Ss 0:00 /usr/lib/systemd/systemd-logind
322406 pts/1 S+ 0:00 \_ grep --color=auto systemd
2433 ? Ssl 0:11 /usr/sbin/automount --systemd-service --dont-check-daemon
83421 ? Ss 0:00 /usr/lib/systemd/systemd --user
312508 ? Ss 0:00 /usr/lib/systemd/systemd --user
314186 ? Ss 0:00 /usr/lib/systemd/systemd --user
322379 ? Ss 0:00 /usr/lib/systemd/systemd-hostnamed
# systemctl daemon-reload
# ps fax | grep systemd
1 ? Ss 0:05 /usr/lib/systemd/systemd rhgb --switched-root --system --deserialize 31
641 ? Ss 0:02 /usr/lib/systemd/systemd-journald
655 ? Ss 0:00 /usr/lib/systemd/systemd-udevd
807 ? Ss 0:00 /usr/lib/systemd/systemd-logind
322464 pts/1 S+ 0:00 \_ grep --color=auto systemd
2433 ? Ssl 0:11 /usr/sbin/automount --systemd-service --dont-check-daemon
83421 ? Ss 0:00 /usr/lib/systemd/systemd --user
312508 ? Ss 0:00 /usr/lib/systemd/systemd --user
314186 ? Ss 0:00 /usr/lib/systemd/systemd --user
# systemctl status keycloak
× keycloak.service - keycloak-26.3.1
Loaded: loaded (/etc/systemd/system/keycloak.service; disabled; preset: disabled)
Active: failed [because of incorrect Type=forking]
# shutdown -r now
…
# systemctl status keycloak
○ keycloak.service - keycloak-26.3.1
Loaded: loaded (/etc/systemd/system/keycloak.service; disabled; preset: disabled)
Active: inactive (dead)
Now fixed unrelated issue Type=forking to Type=simple and:
# systemctl daemon-reload
# systemctl stop keycloak
# systemctl start keycloak
# systemctl status keycloak
● keycloak.service - keycloak-26.3.1
Loaded: loaded (/etc/systemd/system/keycloak.service; disabled; preset: disabled)
Active: active (running) since Mon 2025-07-14 14:12:16 EDT; 3s ago
Main PID: 2411 (run.sh)
Tasks: 33 (limit: 22779)
Memory: 263.6M
CPU: 9.055s
CGroup: /system.slice/keycloak.service
├─2411 /bin/sh /opt/kcloak/keycloak-26.3.1/run.sh
└─2412 java -Dkc.config.built=true -Djava.util.concurrent.ForkJoinPool.common.threadFactory=io.qua>
systemd[1]: Started keycloak-26.3.1.
So rebooting seems to have fixed it.
But maybe there’s a sporatic bug lurking in the systemd services caching.
system
Closed
September 12, 2025, 6:33pm
5
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.