国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 数据库 > 数据库应用 > oracle11g 修改密码后登录的TNS-12535: TNS:operation timed out问题

oracle11g 修改密码后登录的TNS-12535: TNS:operation timed out问题

来源:程序员人生   发布时间:2016-08-24 08:19:04 阅读次数:2951次

 

1,问题描写

由于安全斟酌,所以oracle生产环境修改用户密码后,用新密码登录失败,登录卡死,1直处于登录状态,分析

1,事前已关闭了所有的连接oracle的利用,所以不存在是利用程序连接致使的。

2,利用程序重新启动后已更新了密码,也不多是新启动的利用程序致使。

3,测试人员开发人员都已下班了,应当没有人正在操作使用线上数据库

所以应当不是我利用程序引发的。

 

 

2,去查看后台alert告警日志,在后台的alert_powerdes.log里面有以下报错信息:

*********************************************************************** Fatal NI connect error 12170. VERSION INFORMATION: TNS for Linux: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 -Production TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production Time: 28-JUN⑵016 21:51:06 Tracing not turned on. Tnserror struct: ns main err code: 12535 TNS⑴2535: TNS:operation timed out ns secondary err code: 12606 nt main err code: 0 nt secondary err code: 0 20160628 215106 logon denied from10.251.5.22 39028 with ? nt OS err code: 0 Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.0)(PORT=59729)) WARNING: inbound connection timed out(ORA⑶136) ...... 20160628 215049 logon denied from192.168.121.0 39032 with ? Tue Jun 28 21:50:59 2016 20160628 215059 logon denied from192.168.121.0 39034 with ? Tue Jun 28 21:51:06 2016 20160628 215106 logon denied from192.168.121.0 39030 with ? Tue Jun 28 21:51:06 2016


有密码登录报错信息,再通过过滤看下有多少ip地址的要求报密码毛病:

[oracle@pldb1 ~]$ tail -fn 2000/oracle/app/oracle/diag/rdbms/powerdes/powerdes/trace/alert_powerdes.log |grep"Client address" Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.0)(PORT=60355)) Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.0)(PORT=60351)) Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.0)(PORT=60354)) Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.0)(PORT=60353))

 

看到有192.168.121.0 ip地址在不停的连接数据库,报密码毛病,由于密码已更新了,所以这个连接失败,而且1直在连接中。猜想多是这个缘由致使的。

 

看到这个ip地址是公司内部的ip地址,那末是谁呢?登录dhcp服务器,查看到是信息部总监的电脑,然后打他电话打不通,找到他在办公室的电脑,直接强行关机,再视察1段时间后,再也没用报错信息,然后用我们在本地或利用服务器上用新密码登录正常了。以后给信息部总监发email和短信,告知他强行关了他电脑的缘由。

 

 

3,摹拟测试正常

难道是oracle用户连接用旧密码1直连接,这个连接没有释放,我改了新密码后,旧的连接1直试图访问致使这个用户登录阻塞?我做下测试


1)我在本地oracle测试库做了测试,新建1个帐号,然后使用sqlplus连接上去;

SQL> create user user_test1 identifiedby "query0418"; User created. SQL> SQL> grant create session ,dba touser_test1; Grant succeeded. SQL>

 

然后再使用新用户登录,操作数据库

[oracle@hch_test_pd_121_217 admin]$ rlwrapsqlplus user_test1/query0418@t1; SQL*Plus: Release 11.2.0.1.0 Production onWed Jun 29 12:27:49 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Miningand Real Application Testing options SQL> create table zz_bak (id number); insert into zz_bak values(1); Table created. 1 row created. SQL> commit; Commit complete. SQL> select * from zz_bak; ID ---------- 1 SQL> SQL> update zz_bak set id=2 where id=1; 1 row updated. SQL>


 

2)然后新开1个shell连接窗口,登录上去修改

[oracle@hch_test_pd_121_217 admin]$ rlwrapsqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production onWed Jun 29 12:29:16 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Miningand Real Application Testing options SQL> alter user user_test1 identified by"ys"; User altered. SQL>


 

然后退出,再登录

[oracle@hch_test_pd_121_217 admin]$ rlwrapsqlplus user_test1/ys@t1; SQL*Plus: Release 11.2.0.1.0 Production onWed Jun 29 12:30:34 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise EditionRelease 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Miningand Real Application Testing options SQL> select * from zz_bak; ID ---------- 1 SQL> insert into zz_bak(id) values(3); 1 row created. SQL> commit; Commit complete. SQL> select * from zz_bak; ID ---------- 3 1 SQL>


 

3)再去第1个sqlplus窗口履行操作(在修改密码之前用旧密码登录sqlplus的窗口),看到可以操作

SQL> commit; Commit complete. SQL> update zz_bak set id=2 where id=1; 0 rows updated. SQL> select * from zz_bak; ID ---------- 3 2 SQL>


 

4)再去第2个sqlplus窗口,操作zz_bak表,数据也正常。

SQL> select * from zz_bak; ID ---------- 3 2 SQL>


 


4,场景复现

第2天等信息部总监过来的时候,问他的电脑上开了啥?

(1)他说他开了plsql,然后在plsql上面edit数据,没有commit也没用rollback,然后他下班了后也没有关闭掉;

(2)他开了ecplise,用工程连接生产库,没有关闭。

 

我给他们的建议是:

(1)      下班以后,关闭电脑,关闭所有连接生产库的连接。

(2)      不允许在本地电脑连接生产库做测试debug。

 

不解之谜?

(1)是甚么缘由致使新用户修改密码后,登录不进去呢?现象是由于有eclipse工程和plsql用旧的密码在连接致使,但是我摹拟测试正常,情形没法复现啊!

(2)现在即便我输入毛病密码尝试登录,也不会卡住,而是立即会提示密码毛病,后台alert日志不会有告警信息了。

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生