After performing an in-place Oracle linux upgrade I could realize that the oracle service was unusable.
I would like to share with you the reason and how to resolve it.
Problem description
After in-place Oracle linux upgrade from el7 to el8, I could see that the oracle service was not working any more. This service is used to automatically start and stop the databases during server reboot according to the entry in the /etc/oratab.
Here is the initial script:
[root@SRV ~]# cat /usr/lib/systemd/system/oracle.service [Unit] Description=Oracle Database Service After=syslog.target network.target [Service] LimitMEMLOCK=infinity LimitNOFILE=65535 Type=simple RemainAfterExit=yes User=oracle Group=oinstall ExecStart=/rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh start ExecStop=/rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh stop TimeoutStartSec=200s TimeoutStopSec=200s [Install] WantedBy=multi-user.target
As we can see the service goes in error when running start and stop:
[root@SRV ~]# systemctl stop oracle.service [root@SRV ~]# systemctl status oracle.service ● oracle.service - Oracle Database Service Loaded: loaded (/usr/lib/systemd/system/oracle.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2026-06-18 10:52:43 CEST; 2s ago Process: 33420 ExecStop=/rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh stop (code=exited, status=203/EXEC) Main PID: 1949 (code=exited, status=0/SUCCESS) Jun 18 09:43:29 SRV.INT.custname.CH service_start_stop.ksh[8220]: 2026-06-18_09:43:29::database.ksh::SetOraEnv ::INFO ==> Environment: DB6 (/rdbms/u01/app/oracle/product/19.> Jun 18 09:43:29 SRV.INT.custname.CH service_start_stop.ksh[8221]: ls: cannot access '/rdbms/u01/app/oracle/admin/DB6/dmk/pdbs/': No such file or directory Jun 18 09:43:29 SRV.INT.custname.CH service_start_stop.ksh[8229]: 2026-06-18_09:43:29::database.ksh::ProcessAllDB ::INFO ==> START database DB6 Jun 18 09:43:29 SRV.INT.custname.CH service_start_stop.ksh[8237]: 2026-06-18_09:43:29::database.ksh::ProcessAllDB ::INFO ==> Database DB6 not started as the ORATAB flag is "N" Jun 18 09:43:31 SRV.INT.custname.CH service_start_stop.ksh[9889]: 2026-06-18_09:43:31::service_start_stop.ksh::ExecScripts ::INFO ==> Return Code : 0 Jun 18 09:43:31 SRV.INT.custname.CH service_start_stop.ksh[9897]: 2026-06-18_09:43:31::service_start_stop.ksh::CleanExit ::INFO ==> Program exited with ExitCode : 0 Jun 18 10:52:43 SRV.INT.custname.CH systemd[1]: Stopping Oracle Database Service... Jun 18 10:52:43 SRV.INT.custname.CH systemd[1]: oracle.service: Control process exited, code=exited status=203 Jun 18 10:52:43 SRV.INT.custname.CH systemd[1]: oracle.service: Failed with result 'exit-code'. Jun 18 10:52:43 SRV.INT.custname.CH systemd[1]: Stopped Oracle Database Service. [root@SRV ~]# systemctl start oracle.service [root@SRV ~]# systemctl status oracle.service ● oracle.service - Oracle Database Service Loaded: loaded (/usr/lib/systemd/system/oracle.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2026-06-18 10:53:06 CEST; 1s ago Process: 33420 ExecStop=/rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh stop (code=exited, status=203/EXEC) Process: 33428 ExecStart=/rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh start (code=exited, status=203/EXEC) Main PID: 33428 (code=exited, status=203/EXEC) Jun 18 10:53:06 SRV.INT.custname.CH systemd[1]: Started Oracle Database Service. Jun 18 10:53:06 SRV.INT.custname.CH systemd[1]: oracle.service: Main process exited, code=exited, status=203/EXEC Jun 18 10:53:06 SRV.INT.custname.CH systemd[1]: oracle.service: Failed with result 'exit-code'. [root@SRV ~]#
Analyzing the problem
Checking the output of journalctl command I could see following permission issue.
[root@SRV ~]# journalctl -xe Jun 02 15:30:25 SRV.INT.custname.CH su[20823]: (to root) oracle on pts/0 Jun 02 15:30:25 SRV.INT.custname.CH su[20823]: pam_unix(su-l:session): session opened for user root by oracle(uid=54321) Jun 02 15:30:29 SRV.INT.custname.CH systemd[1]: Started Oracle Database Service. -- Subject: Unit oracle.service has finished start-up -- Defined-By: systemd -- Support: https://support.oracle.com -- -- Unit oracle.service has finished starting up. -- -- The start-up result is done. Jun 02 15:30:29 SRV.INT.custname.CH systemd[20852]: oracle.service: Failed to execute command: Permission denied Jun 02 15:30:29 SRV.INT.custname.CH systemd[20852]: oracle.service: Failed at step EXEC spawning /rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh: Permiss> -- Subject: Process /rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh could not be executed
This problem comes from SELinux, where under el8 only binaries are authorized in the service and not shell script any more.
Solution
The solution is to add /bin/bash into both start and stop lines.
[root@SRV ~]# vi /usr/lib/systemd/system/oracle.service [root@SRV ~]# cat /usr/lib/systemd/system/oracle.service [Unit] Description=Oracle Database Service After=syslog.target network.target [Service] LimitMEMLOCK=infinity LimitNOFILE=65535 Type=simple RemainAfterExit=yes User=oracle Group=oinstall ExecStart=/bin/bash /rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh start ExecStop=/bin/bash /rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh stop TimeoutStartSec=200s TimeoutStopSec=200s [Install] WantedBy=multi-user.target [root@SRV ~]#
And then the service could be successfully started and stopped again.
[root@SRV ~]# systemctl start oracle.service
[root@SRV ~]# systemctl status oracle.service
● oracle.service - Oracle Database Service
Loaded: loaded (/usr/lib/systemd/system/oracle.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2026-06-18 10:54:52 CEST; 4s ago
Main PID: 33585 (bash)
Tasks: 52 (limit: 3295056)
Memory: 127.8M
CGroup: /system.slice/oracle.service
├─33585 /bin/bash /rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh start
├─33698 /bin/bash /rdbms/u01/app/oracle/local/dmk/bin/service_start_stop.ksh start
├─33855 /rdbms/u01/app/oracle/product/19.30.260120/bin/tnslsnr LISTENER_DB1 -inherit
├─34041 /rdbms/u01/app/oracle/product/19.30.260120/bin/tnslsnr LISTENER_DB2 -inherit
├─34227 /rdbms/u01/app/oracle/product/19.30.260120/bin/tnslsnr LISTENER_DG -inherit
├─34413 /rdbms/u01/app/oracle/product/19.30.260120/bin/tnslsnr LISTENER_DB3 -inherit
├─34599 /rdbms/u01/app/oracle/product/19.30.260120/bin/tnslsnr LISTENER_DB4 -inherit
├─34825 /rdbms/u01/app/oracle/product/19.30.260120_MX/bin/tnslsnr LISTENER_DB5 -inherit
├─35051 /rdbms/u01/app/oracle/product/19.30.260120_MX/bin/tnslsnr LISTENER_DB6 -inherit
...
...
...
To wrap up…
I took a lot of time to understand what could happen here, moreover it was working without any problem under el7. This is why I think it is good to know and decided to share it. I thank my collegue, Jérôme Witt, who could face this problem earlier and shared this good tips with me.