“Fatal NI Connect Error 12516″ and ”TNS-12564: TNS:connection refused” In Clusterware Alert.log when ologgerd Connects to GIMR

ISSUES

There are repeating following errors in 19c CRS alert.log by ologgered trying to connect to GIMR.

Fatal NI connect error 12516, connecting to:
(DESCRIPTION=(CONNECT_TIMEOUT=60)(ADDRESS=(PROTOCOL=tcp)(HOST=racnode-cluster-scan.virtuallab)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=GIMR_DSCREP_10)(CID=(PROGRAM=ologgerd)(HOST=racnode1.virtuallab)(USER=root)))(SECURITY=(ENCRYPTION_CLIENT=requested)))
VERSION INFORMATION:
TNS for Linux: Version 19.0.0.0.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 19.0.0.0.0 - Production

Version 19.8.0.0.0
Time: 08-AUG-2020 18:15:01
Tracing not turned on.
Tns error struct:
ns main err code: 12564

TNS-12564: TNS:connection refused
ns secondary err code: 12560
nt main err code: 524

TNS-00524: Current operation is still in progress
nt secondary err code: 115
nt OS err code: 0

INVESTIGATION

Check mgmtlsnr or SCAN listeners, and found -MGMTDB PDB service ” gimr_dscrep_10″ is not registered properly.

[grid@racnode1 trace]$ lsnrctl services listener_scan2
...
..
.
Service "gimr_dscrep_10" has 1 instance(s).
Instance "-MGMTDB", status READY, has 1 handler(s) for this service…
Handler(s):
"DEDICATED" established:0 refused:0 state:blocked
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.100.62)(PORT=1526))

Subscribe to get access

Read more of this content when you subscribe today.

How to Rotate and Purge Listener Logs in 19c

A 19c new feature really makes DBA Life Easy.

Before 19c, there are very limited options to purge listener logs, which could be growing day by day up to a couple of GB size. DBAs have to write their own customised scripts to do this job.

This post demonstrates how to take advantage of 19c a new feature to rotate and purge listerer logs automatically, without a line of script necessary.

Subscribe to get access

Read more of this content when you subscribe today.

TNS-01189: The listener could not authenticate the user

In 19c GI environment, TNS-01189 is still being received hourly from OEM 13cR3 for both local listeners and SCAN listeners, though Oracle said this issue has been fixed since 12.1.0.2.

The OEM alert:

Host=racnode2.virtuallab
Target type=Listener
Target name=LISTENER_SCAN1_racnode-cluster
Message=TNS-1189. Please check log for details.
Severity=Critical
Event reported time=May 1, 2020 9:26:35 PM 
Operating System=Linux
Platform=x86_64
Associated Incident Id=1513
Associated Incident Status=New
Associated Incident Owner=
Associated Incident Acknowledged By Owner=No
Associated Incident Priority=None
Associated Incident Escalation Level=0
Event Type=Metric Alert
Event name=TNS_ERRORS:tnserrmsg
Total Occurrences=115
Occurrences in this event=45
First Occurred in this event=Apr 28, 2020 10:11:23 AM 
Last Occurred in this event=May 1, 2020 8:10:06 PM 
Metric Group=TNS Errors
Metric=TNSMsg
Metric value=TNS-1189(version)
Key Value=TNS-1189
Key Column 1=TNSError
Rule Name=Incident management rule set for all targets,Create 
          incident for critical metric alerts
Rule Owner=System Generated
Update Details:
TNS-1189. Please check log for details.

The local listener and scan listeners error log:

1-MAY-2020 19:10:35 * (CONNECT_DATA=(COMMAND=version)) * version * 1189
TNS-01189: The listener could not authenticate the user

Subscribe to get access

Read more of this content when you subscribe today.

ORA-12547: TNS:lost contact

[oracle@racnode1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 13 16:31:25 2020

Copyright (c) 1982, 2014, Oracle. All rights reserved.

ERROR:
ORA-12547: TNS:lost contact


Enter user-name:
ERROR:
ORA-12547: TNS:lost contact

Subscribe to get access

Read more of this content when you subscribe today.

ORA-29283: invalid file operation ORA-06512: at “SYS.UTL_FILE”, line 536 ORA-29283: invalid file operation

Connected to Oracle database through service name, then get  errors by running the below sample code.  There is no problem to run the sample code while connecting to database through IPC.

$sqlplus testuser/****@DBTEST

SQL>DECLARE
    l_output utl_file.file_type;
BEGIN
    l_output := utl_file.fopen( 'MY_DIR', 'test.txt', 'w' );
    utl_file.fclose( l_output ); 
END;
/

*
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at line 4
$sqlplus  / as sysdba
SQL> DECLARE
     l_output utl_file.file_type;
BEGIN
     l_output := utl_file.fopen( 'MY_DIR', 'test.txt', 'w' );
     utl_file.fclose( l_output );
END;

 /

PL/SQL procedure successfully completed.

CAUSES

New group “apex” is just added into oracle user for being able to read/write MY_DIR directory.

$ id oracle
uid=100(oracle)gid=200(oinstall)groups=200(oinstall),300(dba),400(apex)

RESOLUTION

Bounce the listener to make the changes effective.

$ ls -ltr|grep apex
drwxrwx---. 6 apexuser apex 4096 May 3 16:08 apex

$lsnrctl stop

$lsnrctl start

$sqlplus testuser/****@DBTEST

SQL>DECLARE
       l_output utl_file.file_type;
   BEGIN
       l_output := utl_file.fopen( 'MY_DIR', 'test.txt', 'w' );
       utl_file.fclose( l_output ); 
END;
/

PL/SQL procedure successfully completed.