Couldn't connect the database remotely. We were getting below error
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>sqlplus dbsnmp/*****@test01
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 10 04:26:32 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
Enter user-name: ^C
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>sqlplus dbsnmp/*****@test01
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 10 04:26:39 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
In Listener log, it was throwing below error.
10-FEB-2016 04:59:06 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test01)(CID=(PROGRAM=sqlplus)(HOST=test01.sangam.com)(USER=oracle))(INSTANCE_NAME=test011)) *
(ADDRESS=(PROTOCOL=tcp)(HOST=10.120.128.33)(PORT=20822)) * establish * test01 * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
10-FEB-2016 04:59:06 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test01)(CID=(PROGRAM=sqlplus)(HOST=test01.sangam.com)(USER=oracle))(INSTANCE_NAME=test011)) *
(ADDRESS=(PROTOCOL=tcp)(HOST=3.239.128.33)(PORT=20824)) * establish * test01 * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
10-FEB-2016 04:59:06 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test01)(CID=(PROGRAM=sqlplus)(HOST=test01.sangam.com)(USER=oracle))(INSTANCE_NAME=test011)) *
(ADDRESS=(PROTOCOL=tcp)(HOST=3.239.128.33)(PORT=20826)) * establish * test01 * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
Reason:
This was caused by permission issue.
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>ls -lrt $ORACLE_HOME/bin/oracle
-rwxr-s--x 1 oracle asmadmin 323762228 Nov 16 09:51 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>exit
When the permissions as stated in the document should be
-rwsr-s--x 1 oracle asmadmin Nov 16 09:51 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
so a quick su to root and a chmod
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>exit
logout
root:test01.sangam.com ~ # chmod 6751 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test01.sangam.com ~ # ls -lrt /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
-rwsr-s--x 1 oracle asmadmin 323762228 Nov 16 09:51 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test01.sangam.com ~ # exit
Repeat same thing on other nodes of cluster.
root:test02.sangam.com ~ # ls -lrt /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
-rwxr-s--x 1 oracle asmadmin 323762228 Nov 16 09:52 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test02.sangam.com ~ # chmod 6751 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test02.sangam.com ~ # ls -lrt /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
-rwsr-s--x 1 oracle asmadmin 323762228 Nov 16 09:52 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test02.sangam.com ~ #
Try connecting remotely
grid@test02.sangam.com_+ASM1:/export/home/grid>sqlplus dbsnmp/*****@test01-scan:1521/test01
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 10 05:35:35 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> exit
grid@test02.sangam.com_+ASM1:/export/home/grid> sqlplus dbsnmp/*****@'(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test01.sangam.com)(PORT = 1521))
(CONNECT_DATA = (SID = test01)))' <
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 10 05:36:12 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL>
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>sqlplus dbsnmp/*****@test01
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 10 04:26:32 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
Enter user-name: ^C
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>sqlplus dbsnmp/*****@test01
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 10 04:26:39 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
In Listener log, it was throwing below error.
10-FEB-2016 04:59:06 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test01)(CID=(PROGRAM=sqlplus)(HOST=test01.sangam.com)(USER=oracle))(INSTANCE_NAME=test011)) *
(ADDRESS=(PROTOCOL=tcp)(HOST=10.120.128.33)(PORT=20822)) * establish * test01 * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
10-FEB-2016 04:59:06 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test01)(CID=(PROGRAM=sqlplus)(HOST=test01.sangam.com)(USER=oracle))(INSTANCE_NAME=test011)) *
(ADDRESS=(PROTOCOL=tcp)(HOST=3.239.128.33)(PORT=20824)) * establish * test01 * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
10-FEB-2016 04:59:06 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=test01)(CID=(PROGRAM=sqlplus)(HOST=test01.sangam.com)(USER=oracle))(INSTANCE_NAME=test011)) *
(ADDRESS=(PROTOCOL=tcp)(HOST=3.239.128.33)(PORT=20826)) * establish * test01 * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
Reason:
This was caused by permission issue.
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>ls -lrt $ORACLE_HOME/bin/oracle
-rwxr-s--x 1 oracle asmadmin 323762228 Nov 16 09:51 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>exit
When the permissions as stated in the document should be
-rwsr-s--x 1 oracle asmadmin Nov 16 09:51 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
so a quick su to root and a chmod
oracle@test01.sangam.com_test011:/opt/oracle/product/rdbms/12.1.0.2/network/admin>exit
logout
root:test01.sangam.com ~ # chmod 6751 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test01.sangam.com ~ # ls -lrt /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
-rwsr-s--x 1 oracle asmadmin 323762228 Nov 16 09:51 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test01.sangam.com ~ # exit
Repeat same thing on other nodes of cluster.
root:test02.sangam.com ~ # ls -lrt /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
-rwxr-s--x 1 oracle asmadmin 323762228 Nov 16 09:52 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test02.sangam.com ~ # chmod 6751 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test02.sangam.com ~ # ls -lrt /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
-rwsr-s--x 1 oracle asmadmin 323762228 Nov 16 09:52 /opt/oracle/product/rdbms/12.1.0.2/bin/oracle
root:test02.sangam.com ~ #
Try connecting remotely
grid@test02.sangam.com_+ASM1:/export/home/grid>sqlplus dbsnmp/*****@test01-scan:1521/test01
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 10 05:35:35 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> exit
grid@test02.sangam.com_+ASM1:/export/home/grid> sqlplus dbsnmp/*****@'(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test01.sangam.com)(PORT = 1521))
(CONNECT_DATA = (SID = test01)))' <
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 10 05:36:12 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL>