Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ssh接続後にRAC構成インスタンスへのsqlplus接続について

user1838196Aug 14 2012 — edited Aug 16 2012
接続元
Oracle構成 [HA ]
OSバージョン [RHL5.5 ]
OSワードサイズ [64bit ]
Oracleバージョン [11.2.0.1.0 ]
Oracle Edition [EE ]

接続先
Oracle構成 [RAC  ]
OSバージョン [RHL5 ]
OSワードサイズ [64bit ]
Oracleバージョン [11.1.0.7 ]
Oracle Edition [EE ]

上記において、接続元よりssh接続を行い、接続先のインスタンスに対してsqlplusによるログインを行うと、
数回に一回失敗するケースがあります。
再現性はなく、うまくいく場合といかない場合に環境の差はありません。なぜ、環境に差がないのに結果に差がでるのでしょうか。
接続先のOracleの設定に問題があるのではないかと疑っております。

下記に接続元での実行コマンドの結果、sqlnet.log、tnsnames.oraを記載しますので、原因についてご教示願います。
接続先は他システムのため現状では情報開示をしてもらえてません。
参考:接続先のRHL上では下記URLの対策をしてもらいました。でも変化はありません。
http://www.itmedia.co.jp/help/tips/linux/l0202.html

※Oracle社にはssh接続に問題があるのではないかと言われましたが、ssh接続に問題ない(接続は出来ている)
ことはHWベンダによるtcpdumpの解析結果より証明済みです。

<接続元コマンド実行状況>
★実行1回目:接続成功★
[oracle@pdbeg01 ~]$ date
2012年 8月 9日 木曜日 21:45:01 JST
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$ ssh -Nf a.b.c.com -L 127.0.0.1:21521:a.b.c.com:1521 -l hogehoge
[oracle@pdbeg01 ~]$ sqlplus hogehoge/abcd@orcl

SQL*Plus: Release 11.2.0.1.0 Production on 木 8月 9 21:45:11 2012

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



Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
に接続されました。
SQL>
SQL>
SQL> exit
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing optionsとの接続が切断されました。

★実行2回目:接続失敗★
[oracle@pdbeg01 ~]$ date
2012年 8月 9日 木曜日 21:45:18 JST
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$ !ps
ps -ef | grep b.c.com
oracle 30819 1 0 21:45 ? 00:00:00 ssh -Nf a.b.c.com -L 127.0.0.1:21521:a.b.c.com:1521 -l hogehoge
oracle 31709 23832 0 21:46 pts/1 00:00:00 grep b.c.com
[oracle@pdbeg01 ~]$ kill 30819
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$ date
2012年 8月 9日 木曜日 21:46:20 JST
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$ ssh -Nf a.b.c.com -L 127.0.0.1:21521:a.b.c.com:1521 -l hogehoge
[oracle@pdbeg01 ~]$ sqlplus hogehoge/abcd@orcl

SQL*Plus: Release 11.2.0.1.0 Production on 木 8月 9 21:46:29 2012

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

ERROR:
ORA-12170: TNS: 接続タイムアウトが発生しました。


[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$

★3回目:接続失敗★
[oracle@pdbeg01 ~]$ date
2012年 8月 9日 木曜日 21:47:34 JST
[oracle@pdbeg01 ~]$ !ps
ps -ef | grep b.c.com
oracle 1414 23832 0 21:47 pts/1 00:00:00 grep b.c.com
oracle 32105 1 0 21:46 ? 00:00:00 ssh -Nf a.b.c.com -L 127.0.0.1:21521:a.b.c.com:1521 -l hogehoge
[oracle@pdbeg01 ~]$ kill 132105
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$ date
2012年 8月 9日 木曜日 21:48:11 JST
[oracle@pdbeg01 ~]$ ssh -Nf a.b.c.com -L 127.0.0.1:21521:a.b.c.com:1521 -l hogehoge
[oracle@pdbeg01 ~]$ sqlplus hogehoge/abcd@orcl

SQL*Plus: Release 11.2.0.1.0 Production on 木 8月 9 21:48:19 2012

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

ERROR:
ORA-12541: TNS: リスナーがありません


ユーザー名を入力してください:
ERROR:
ORA-01017: ユーザー名/パスワードが無効です。ログオンは拒否されました。


ユーザー名を入力してください:
ERROR:
ORA-01017: ユーザー名/パスワードが無効です。ログオンは拒否されました。


SP2-0157: 3回試行しましたがOracleに接続できませんでした。SQL*Plusを終了します。
[oracle@pdbeg01 ~]$

★4回目以降は2回連続で成功★

<sqlnet.log>
8 -rw-r----- 1 oracle oinstall 4527 6月 18 17:19 /opt/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.log
[oracle@pdbeg01 ~]$ less /home/oraclep/sqlnet.log

<接続元のsqlnet.log>
★実行2回目:接続失敗時★

***********************************************************************
Fatal NI connect error 12170.

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
Time: 09-8月 -2012 21:47:29
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS: 操作はタイム・アウトしました。
ns secondary err code: 12560
nt main err code: 505
TNS-00505: 操作タイムアウトです。
nt secondary err code: 0
nt OS err code: 0
Client address: <unknown>


***********************************************************************

★実行3回目:接続失敗時★

Fatal NI connect error 12541, connecting to:
(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=loca lhost)(PORT=11521))(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=21521)))(CONNECT_DATA=(SERV ICE_NAME=orcl)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=5)(DELAY=1))(CID=(PROGRAM =sqlplus@pdbeg01)(HOST=pdbeg01)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 11.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
Time: 09-8月 -2012 21:49:19
Tracing not turned on.
Tns error struct:
ns main err code: 12541
/home/oraclep/sqlnet.log ESCESCOOBB TNS-12541: TNS: リスナーがありません。
: ESCESCOOBB ns secondary err code: 12560
: ESCESCOOBB nt main err code: 511
: ESCESCOOBB TNS-00511: リスナーがありません。
: ESCESCOOBB nt secondary err code: 111
: ESCESCOOBB nt OS err code: 0
(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) ESCESCOOBB(END) [oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$
[oracle@pdbeg01 ~]$ exit
logout
[sehw01@pdbeg01 ~]$ exit
logout

<接続元DBのtsnname.ora>
[oracle@pdbeg01 admin]$ less tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = ON)
(FAILOVER = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 11521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 21521))
)
(CONNECT_DATA=
(SERVICE_NAME = orcl)
(FAILOVER_MODE =
(TYPE=SELECT)
(METHOD=BASIC)
(RETRIES = 5)
(DELAY=1)
)
)
)

Edited by: user1838196 on 2012/08/14 5:32

Edited by: user1838196 on 2012/08/15 6:33
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2012
Added on Aug 14 2012
5 comments
3,925 views