Skip to content

ORA-00202 & ORA-15081 #956

@blaurence

Description

@blaurence

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

When linux oracle user exists but is not the oracle software owner, this user also is not configured to use sqlplus (Not in linux "dba" group). The error is in the oracle alert log is raised :

WARNING: failed to read mirror side 1 of virtual extent 0 logical extent 0 of file 265 in group [1.1841911338] from disk SDE1  allocation unit 1    
4705 reason error; if possible, will try another mirror side
Errors in file /u01/app/oracle/admin/xxxxx/diag/rdbms/xxxx/xxxx/trace/xxxx_ora_30218.trc:
ORA-00202: fichier de controle : '+DATA/xxxxx/controlfile/current.265.1013152639'
ORA-15081: ▒chec de la soumission d'une opération d'entrée-sortie sur un disque

To avoid this "error", it should be better to get the "owner" of file $ORACLE_HOME/bin/oracle.

In file "Oracle.pm" (inside sub _runSql) , comment/add :

            #if ($ENV{ORACLE_SID}) {
            #    # Get instance asm_pmon process
            #    my ($asm_pmon) = getProcesses(
            #        namespace   => "same",
            #        filter      => qr/^asm_pmon_$ENV{ORACLE_SID}/,
            #        logger      => $params{logger}
            #    );
            #    $user = $asm_pmon->{USER} if $asm_pmon;
            #    $env = "ORACLE_SID=$ENV{ORACLE_SID}";
            #}
 
 
            # Determine the owner of the $ORACLE_HOME/bin/oracle executable
            if ($ENV{ORACLE_HOME} && -f "$ENV{ORACLE_HOME}/bin/oracle") {
                my $uid = (stat("$ENV{ORACLE_HOME}/bin/oracle"))[4];
                if (defined $uid) {
                    $user = getpwuid($uid);
                }
            }
 
            # Fallback to 'oracle' if owner couldn't be determined
            $user //= "oracle";

To reproduce

  1. Install oracle software using for exemple "ora19c" as linux owner and oracle grid infrastructure software as "grid19c".
  2. Create user "oracle"
  3. Run the agent

Expected behavior

Use linux oracle software owner

Operating system

Linux

GLPI Agent version

v1.15

GLPI version

10.0.18

GLPIInventory plugin or other plugin version

GLPI Inventory v1.5.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions