About

Martin Klier

usn-it.de

Oracle gridSetup.sh Fails with Error Code 255

Bash Error 255

Sometimes you have to apply a RU when launching Oracle 19c gridSetup.sh to install Oracle Grid Infrastructure or Oracle restart. For example when you install it in its vanilla 19.3 version on Oracle Linux 8. OL8 did not exist when they made 19.3, so some of its specials (like verifying group/user existence) worked differently. Then you usually do:

./gridSetup.sh -applyRU /path/to/unzipped/RU/<patchID>

And sometimes is just comes back with doing nothing:

$ ./gridSetup.sh -applyRU /path/to/unzipped/RU/<patchID>
$ echo $?
255

Bash error code 255, without any hint… no entries in cfgtoollogs or elsewhere…

Security hurts sometimes

Why? In some environments, it’s required to mount your /tmp directory with the NOEXEC flag – and this is exactly what breaks your neck here. There are scripts placed in /tmp which the installer tries to execute, and if it can’t, it breaks without logging: The gridSetup.sh -applyRU needs /tmp mounted EXEC. Later, during regular GI operations, /tmp in NOEXEC is not an issue any more.

Solution

So change the /tmp mount just temporarily to EXEC, until next reboot:

$ mount -o remount,exec /tmp

The reward is:

$ ./gridSetup.sh -applyRU /path/to/unzipped/RU/<patchID>
Preparing the home to patch ...
Applying the patch /path/to/unzipped/RU/<patchID> ...

Enjoy the joy of your Oracle Grid Infrastructure or Oracle Restart 19c … 🙂
Martin

When are Oracle RUs released? (Update)
Database 19c Certified for Oracle Linux 9 – Preinstall Package Available

3 thoughts on “Oracle gridSetup.sh Fails with Error Code 255

  1. By the way: not only Grid Infrastructure’s gridSetup fails because of NOEXEC flag on /mnt.
    Same with ./runInstaller when installing database software…

  2. Good to know – thank you!
    Another question: Why I have to recreate the new Oracle- or GRID Home if applying of RU fails on setup – regardless in which state the patch procedure was? Which flag I have to reset then? Especially on upgrades I always need to have great attention to rm the right Oracle Home.
    Because of need of recreation the Oracle Home I prefer to to patch after the setup.

    1. AFAIK there is no “flag”, since there is no safe way to “continue” an interrupted patch for the runInstaller/gridSetup. IMHO the only way is – as you say – a new deployment of the Oracle Home.

      Thus, in general, I suggest to patch out of place, with -applyRU. So customers can deploy the new, patched $OH in a relaxed fashion, maybe recreate it a few times if something goes wrong, and if all is finally well, restart the instance(s) from the new home. Reduces downtime and risk, and in case of automation, they only need to maintain ONE piece of (Ansible) code for setup and patching.

      Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.