7 Replies Latest reply on Jan 13, 2020 1:47 PM by 792311

    Listener Log is too big in RAC

    792311

      OS: RHEL 6.10

      Oracle RAC: 11.2.0.3.0

      Nodes: 2

       

      Problem: Listener trace Log is over a 1 GB, I am getting following error when I try to purge:

      ======================================================================

      adrci> purge -age 2880 -type trace

      DIA-48110: error encountered while attempting to get a file lock [ADR_CONTROL] [/opt/oracle/diag/tnslsnr/Node2/listener/lck/AM_3216668543_3129272988.lck]

      DIA-48180: OS open system call failure

      Linux-x86_64 Error: 13: Permission denied

      Additional information: 1

       

      adrci> purge

      DIA-48110: error encountered while attempting to get a file lock [INCIDENT] [/opt/oracle/diag/tnslsnr/Node2/listener/lck/AM_1762783_4031814035.lck]

      DIA-48180: OS open system call failure

      Linux-x86_64 Error: 13: Permission denied

      Additional information: 1

       

      ==================================

       

      Any help or advice would be appreciated.

       

      Thanks.

        • 1. Re: Listener Log is too big in RAC
          Kfekete-Oracle

          Hi,

           

          Who owns that lock file? Same user that runs adrci?

           

          Br,

          krisz

           

          ps.

           

          You could also use purgelog to do the housekeeping: Note 2081655.1 - purgeLogs: Cleanup traces, logs in one command

          Please take a look on the note. It is a pretty handy tool :-)

          1 person found this helpful
          • 2. Re: Listener Log is too big in RAC
            BPeaslandDBA

            Someone is holding a lock on that file it seems. Use the lsof command to see who is using that file.

             

            Cheers,

            Brian

            1 person found this helpful
            • 3. Re: Listener Log is too big in RAC
              792311

              All,

               

              Thanks for your kind reply.  I am getting the following when I try lsof:

               

              # lsof -t /opt/oracle/diag/tnslsnr/Node2/listener/lck/AM_1762783_4031814035.lck

              lsof: status error on /opt/oracle/diag/tnslsnr/Node2/listener/lck/AM_1762783_4031814035.lck: No such file or directory

              lsof 4.82

               

               

              I also tried adrci using as root, the purge command ran without an error, but the trace file did not shrink. Its size remained the same 1.4G

               

              Thanks.

              • 4. Re: Listener Log is too big in RAC
                792311

                Found the following:

                 

                :  /opt/oracle/diag/tnslsnr/Node2/listener/lck]$ ls -ltr

                total 0

                -rw-r----- 1 grid oinstall 0 Apr 30  2015 AM_3216668543_3129272988.lck

                -rw-r----- 1 grid oinstall 0 Apr 30  2015 AM_1744845641_3861997533.lck

                -rw-r----- 1 grid oinstall 0 Apr 30  2015 AM_1096102193_3488045378.lck

                -rw-r----- 1 grid oinstall 0 Apr 30  2015 AM_1096102262_3454819329.lck

                 

                Can these be deleted or they are needed by the system?

                • 5. Re: Listener Log is too big in RAC
                  Gaz in Oz

                  If you haven't already, login (or sudo - ) to either oracle or grid, then login to adrci and re-issue the purge command.

                  It is very good practice to use the linux logrotate tool to manage log and trace file, size and quantity.

                  1 person found this helpful
                  • 6. Re: Listener Log is too big in RAC
                    Marco Mischke

                    Hi,

                     

                    looks like you have a Grid Infrastructure instaled. So you should run the purge command as grid user, with the propper environment variables defined of cause.

                     

                    Once your purge command runs successfully, you might notice that the listener.log is still big. This is because the purge command relies on the age of a trace file. The listener.log will never get older, just bigger. For that you might consider logrotate or just empty your listener.log with something like this:

                     

                    echo "" > listener.log

                     

                    Cheers,

                    Marco

                    • 7. Re: Listener Log is too big in RAC
                      792311

                      All,

                       

                      Thanks for your help. Marco's suggestion fixed my problem. 

                       

                      Thank you.