9 Replies Latest reply on Aug 21, 2013 9:51 AM by c4945dba-8b8b-441b-b2c0-984589f04ddf

    OPatch 13885389 OPatch failed with error code = 41 Win2008R2

    user539131
      I am aware of the bug BUG#13902704 with this patch -

      "WORKAROUND:Rename %ORACLE_HOME%\OPatch\jlib\oracle.opatch.classpath.jar
      to ORACLE_HOME%\OPatch\jlib\oracle.opatch.classpath1.jar"

      I have already taken care of this.

      -------------------------------------
      Now I think I am getting into another bug with the same error code =41 but this time I think it has to do with ".dll"

      Oracle Home : M:\oracle\product\11.2.0\dbhome_3
      Central Inventory : C:\Program Files\Oracle\Inventory
      from : n/a
      OPatch version : 11.2.0.3.0
      OUI version : 11.2.0.3.0
      Log file location : M:\oracle\product\11.2.0\dbhome_3\cfgtoollogs\opatch\1388538
      9_May_27_2012_06_42_44\apply2012-05-27_06-42-44AM_1.log

      Applying interim patch '13885389' to OH 'M:\oracle\product\11.2.0\dbhome_3'
      Verifying environment and performing prerequisite checks...
      Patch 13885389: Optional component(s) missing : [ oracle.precomp.lang, 11.2.0.3.
      0 ] , [ oracle.rdbms.tg4msql, 11.2.0.3.0 ] , [ oracle.rdbms.ic, 11.2.0.3.0 ] , [
      oracle.has.cvu, 11.2.0.3.0 ] , [ oracle.has.crs, 11.2.0.3.0 ] , [ oracle.usm, 1
      1.2.0.3.0 ]
      Prerequisite check "CheckActiveFilesAndExecutables" failed.
      The details are:

      Following files are active :
      M:\oracle\product\11.2.0\dbhome_3\bin\oracommon11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\oraclient11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\orageneric11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\orapls11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\oran11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\oraxml11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\oci.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\orahasgen11.dll
      M:\oracle\product\11.2.0\dbhome_3\bin\orahasgen11.dll
      Log file location: M:\oracle\product\11.2.0\dbhome_3\cfgtoollogs\opatch\13885389
      May27_2012_06_42_44\apply2012-05-27_06-42-44AM_1.log

      Recommended actions: OPatch needs to modify files which are being used by some p
      rocesses.

      OPatch failed with error code = 41


      Please let me know if anyone is aware of this issue with latest CPU patch.

      Thanks!

      Edited by: user539131 on May 27, 2012 4:33 AM
        • 1. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
          Srini Chavali-Oracle
          I assume that all the databases associated with this HOME have been shutdown and all services stopped. If so, pl see if this MOS Doc can help

          Write Errors, or Files In Use, or NoServicesForProcessException During Patch Installation [ID 294350.1]     

          HTH
          Srini
          • 2. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
            user539131
            Hi Srini,
            Yes, all Oracle services are down. I have applied this patch on other servers Win2008 64 bit sucessfully. The only difference is we have GRID agent configure for this server. I did make sure Oracle GRID agent services are down.

            Here is the log -

            [May 27, 2012 7:13:44 AM] OPatch invoked as follows: 'apply '
            [May 27, 2012 7:13:44 AM] OUI-67077:
            Oracle Home : M:\oracle\product\11.2.0\dbhome_3
            Central Inventory : C:\Program Files\Oracle\Inventory
            from : n/a
            OPatch version : 11.2.0.3.0
            OUI version : 11.2.0.3.0
            OUI location : M:\oracle\product\11.2.0\dbhome_3\oui
            Log file location : M:\oracle\product\11.2.0\dbhome_3\cfgtoollogs\opatch\13885389_May_27_2012_07_13_43\apply2012-05-27_07-13-43AM_1.log
            [May 27, 2012 7:13:44 AM] Patch history file: M:\oracle\product\11.2.0\dbhome_3\cfgtoollogs\opatch\opatch_history.txt
            [May 27, 2012 7:13:44 AM] Starting ApplySession at Sun May 27 07:13:44 EDT 2012
            [May 27, 2012 7:13:44 AM] Starting Apply Session at Sun May 27 07:13:44 EDT 2012
            [May 27, 2012 7:13:45 AM] OPatch will do the following:
            [Oracle Home discovery] : Configure and Validate Oracle Home info.
            [Prerequisite for apply] : Invoke prerequisites to see if patch can be applied.
            [Patch conflict detection for apply patch] : Check if any conflict with already installed patches in Oracle Home.
            [May 27, 2012 7:13:45 AM] --------------------- Oracle Home discovery ---------------------
            [May 27, 2012 7:13:45 AM] OUI-67086:ApplySession applying interim patch '13885389' to OH 'M:\oracle\product\11.2.0\dbhome_3'
            [May 27, 2012 7:13:45 AM] Applying interim patch '13885389' to OH 'M:\oracle\product\11.2.0\dbhome_3'
            [May 27, 2012 7:13:45 AM] Starting to apply patch to local system at Sun May 27 07:13:45 EDT 2012
            [May 27, 2012 7:13:45 AM] Verifying environment and performing prerequisite checks...
            [May 27, 2012 7:13:47 AM] Start the Apply initScript at Sun May 27 07:13:47 EDT 2012
            [May 27, 2012 7:13:47 AM] Finish the Apply initScript at Sun May 27 07:13:47 EDT 2012
            [May 27, 2012 7:13:47 AM] --------------------- Prerequisite for apply ---------------------
            [May 27, 2012 7:13:47 AM] Running prerequisite checks...
            [May 27, 2012 7:13:47 AM] Patch "13885389" is ignored as it is not a "Fusion Applications patch".
            [May 27, 2012 7:13:47 AM] Check if patch "13885389" is a no-op patch.
            [May 27, 2012 7:13:47 AM] Opt. comp. not in OH inventory: oracle.precomp.lang, 11.2.0.3.0
            [May 27, 2012 7:13:47 AM] Opt. comp. not in OH inventory: oracle.rdbms.tg4msql, 11.2.0.3.0
            [May 27, 2012 7:13:47 AM] Opt. comp. not in OH inventory: oracle.rdbms.ic, 11.2.0.3.0
            [May 27, 2012 7:13:47 AM] Opt. comp. not in OH inventory: oracle.has.cvu, 11.2.0.3.0
            [May 27, 2012 7:13:47 AM] Opt. comp. not in OH inventory: oracle.has.crs, 11.2.0.3.0
            [May 27, 2012 7:13:47 AM] Opt. comp. not in OH inventory: oracle.usm, 11.2.0.3.0
            [May 27, 2012 7:13:47 AM] [ oracle.precomp.lang, 11.2.0.3.0 ] , [ oracle.rdbms.tg4msql, 11.2.0.3.0 ] , [ oracle.rdbms.ic, 11.2.0.3.0 ] , [ oracle.has.cvu, 11.2.0.3.0 ] , [ oracle.has.crs, 11.2.0.3.0 ] , [ oracle.usm, 11.2.0.3.0 ]
            [May 27, 2012 7:13:47 AM] None of the selected patches are no-op. patches..
            [May 27, 2012 7:13:47 AM] Space Needed : 2422.602MB
            [May 27, 2012 7:13:47 AM] Prereq checkPatchApplicableOnCurrentPlatform Passed for patch : 13885389
            [May 27, 2012 7:13:47 AM] Patch 13885389: Optional component(s) missing : [ oracle.precomp.lang, 11.2.0.3.0 ] , [ oracle.rdbms.tg4msql, 11.2.0.3.0 ] , [ oracle.rdbms.ic, 11.2.0.3.0 ] , [ oracle.has.cvu, 11.2.0.3.0 ] , [ oracle.has.crs, 11.2.0.3.0 ] , [ oracle.usm, 11.2.0.3.0 ]
            [May 27, 2012 7:13:48 AM] Following files are active :
            M:\oracle\product\11.2.0\dbhome_3\bin\oracommon11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oraclient11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orageneric11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orapls11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oran11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oraxml11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oci.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orahasgen11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orahasgen11.dll
            [May 27, 2012 7:13:48 AM] Prerequisite check "CheckActiveFilesAndExecutables" failed.
            The details are:

            Following files are active :
            M:\oracle\product\11.2.0\dbhome_3\bin\oracommon11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oraclient11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orageneric11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orapls11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oran11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oraxml11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\oci.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orahasgen11.dll
            M:\oracle\product\11.2.0\dbhome_3\bin\orahasgen11.dll
            [May 27, 2012 7:13:48 AM] OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
            You will be still able to rollback patches after this cleanup.
            Do you want to proceed? y
            [May 27, 2012 7:13:51 AM] Y (auto-answered by -silent)
            [May 27, 2012 7:13:51 AM] User Responded with: Y
            [May 27, 2012 7:13:51 AM] Size of directory "M:\oracle\product\11.2.0\dbhome_3\.patch_storage" before cleanup is 56 bytes.
            [May 27, 2012 7:13:51 AM] Deleting the directory "M:\oracle\product\11.2.0\dbhome_3\.patch_storage\13885389_Apr_13_2012_00_06_51\backup"
            [May 27, 2012 7:13:51 AM] Deleted the directory "M:\oracle\product\11.2.0\dbhome_3\.patch_storage\13885389_Apr_13_2012_00_06_51\backup"
            [May 27, 2012 7:13:51 AM] Size of directory "M:\oracle\product\11.2.0\dbhome_3\.patch_storage" after cleanup is 56 bytes.
            [May 27, 2012 7:13:51 AM] UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
            deleted, Please refer log file.
            [May 27, 2012 7:13:51 AM] [ Error during Prerequisite for apply phase ] Detail: OUI-67074:ApplySession failed during prerequisite checks: Prerequisite check "CheckActiveFilesAndExecutables" failed.
            [May 27, 2012 7:13:51 AM] OUI-67035:System is intact, OPatch will not restore the system
            [May 27, 2012 7:13:51 AM] Finishing ApplySession at Sun May 27 07:13:51 EDT 2012
            [May 27, 2012 7:13:51 AM] Total time spent waiting for user-input is 0 seconds. Finish at Sun May 27 07:13:51 EDT 2012
            [May 27, 2012 7:13:51 AM] Log file location: M:\oracle\product\11.2.0\dbhome_3\cfgtoollogs\opatch\13885389_May_27_2012_07_13_43\apply2012-05-27_07-13-43AM_1.log
            [May 27, 2012 7:13:51 AM] Stack Description: oracle.opatch.PrereqFailedException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
            [May 27, 2012 7:13:51 AM] StackTrace: oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:6420)
            [May 27, 2012 7:13:51 AM] StackTrace: oracle.opatch.ApplySession.processLocal(ApplySession.java:3856)
            [May 27, 2012 7:13:51 AM] StackTrace: oracle.opatch.ApplySession.process(ApplySession.java:5932)
            [May 27, 2012 7:13:51 AM] StackTrace: oracle.opatch.OPatchSession.main(OPatchSession.java:2063)
            [May 27, 2012 7:13:51 AM] StackTrace: oracle.opatch.OPatch.main(OPatch.java:583)
            • 3. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
              Srini Chavali-Oracle
              Well, Oracle has no reason to lie :-) Something is using these processes. You will need to determine what and shut those services down.

              SEVERE:OUI-67074:ApplySession failed during prerequisite checks: Prerequisite check "CheckActiveFilesAndExecutables" failed. [ID 1348018.1]

              HTH
              Srini
              • 4. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
                user539131
                OPatch 13885389 OPatch for Win2008R2 and OPatch failed with error code = 41

                I have found two issues. Here is the detail for the workaround -

                1) BUG#13902704- WORKAROUND:Rename %ORACLE_HOME%\OPatch\jlib\oracle.opatch.classpath.jar

                2) Kill the processes manually. Here is the workaround which helped -

                NOTE: Oracle does not shutdown all processes by shutting down database and all Oracle services.

                Temporarily remove the reference to the Oracle Home at system startup
                1. Rename the Oracle Home \bin directory to \bin_save
                2. Reboot the system
                3. Rename the bin_save directory back to bin again
                4. rename oci.dll to deleteme_oci.dll
                5. Install the patch or patch set
                • 5. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
                  693860
                  Hi,

                  An easy workaround for this issue is to use Process Explorer (procexp.exe in sysinternals suite) to find and kill processes who are blocking the dlls.
                  This utility can be found here : http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

                  (Look for Find handle or DLL in Find menu).

                  No need to reboot the system with this workaround, only need to restart the killed processes after the patch installation.

                  Eric

                  Edited by: Eric Bedard on 29-May-2012 1:33 PM
                  • 6. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
                    mcrozier
                    The specific process that is holding the files hostage is Windows Management Instumentation. If you are using Sysinternals Process Explorer and running As Administrator, then a search for oracommon11 will show that the executable WMIPRVSE is the culprit.

                    This one is tricky to shutdown as it has automatic failover. Use the Services panel, find Windows Management Instumentation, right click and chose properties, set the start up type to disable, close the window. Now you can stop the process. There are almost always sub process, make a not of them as you will have to restart them when your are finished with OPATCH. In my case, the sup process were SMS Agent Host and IP Helper.

                    Continue shutting down you Oracle process and the Distributed Transaction Coordinator.

                    Run OPATCH APPLY or NAPPLY as appropriate.

                    Back to the Services panel. Set Windows Management Instumentation to Automatic, close the window and start the service, start the other identified processes, now go ahead and start up Oracle.

                    Warning, if you use a third party infrastructure supplier, as our organization does, you need to co-ordinate with them, as they will be getting notice that Windows Management Instumentation is down. You don't want them to restart the services as you are part way thru your patch.
                    • 7. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
                      301784
                      I too had this very problem on several Windows 2008R2 servers. OPatch (with the workaround) worked on some servers, but not on others. I read this thread and my solution was a combination of a couple of answers.

                      In my case I had to stop and disable the Windows Management Instrumentation service through the services window, and separately through task manager I also had to kill an executable, Smc.exe, which was holding a lock on %oracle_home%/bin/oci.dll. I found out about Smc.exe by running MS Process Explorer and looking for oci.dll.
                      • 8. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
                        user715664-Oracle
                        Try login off the system completely and re-log in then retry opatch.
                        • 9. Re: OPatch 13885389 OPatch failed with error code = 41 Win2008R2
                          c4945dba-8b8b-441b-b2c0-984589f04ddf

                          Hi All,

                           

                          After a lot of research, just tried a simple work-around and everything worked like a charm!!

                           

                          The problem is explorer.exe.

                           

                          1> Ensure you have command prompt open.

                          2> Go to task manager and end the process for "explorer.exe". This closes all windows including the tool bar.

                          3> Perform the Opatch activity. ( Which completed successfully for us )

                          4> Type "taskmgr.exe" in command prompt to bring up the task manager.

                          5> Go to File-->New task and type explorer.exe which brings up everything that was initially closed.

                           

                          Next, proceed with other activities etc!!