暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

【译】解决Oracle12c Cloud Control登录验证出错问题

原创 西北第一DBA 2020-07-14
1557

我是真的跟随这篇文章解决了我EM12C不能登录的问题。不是随便乱找一篇文章翻译的。

解决Oracle12c Cloud Control登录验证出错问题

前几天我试图登录我的EM12c R4环境与SSA_ADMINISTRATOR用户,我得到了以下错误 :

Authentication failed. If problem persists, contact your system administrator.

我很确定我的密码是正确的,所以我试了下SYSMAN用户————仍然有同样的错误。为了确认我有正确的密码,我用SYSMAN用户试图登录到存储库数据库,是成功的,所以我知道,奇怪的错误发生了。

SQL> connect sysman/
Enter password:
Connected.

因此,我转到…/em/EMGC_OMS1/sysman/log/emams.log,看到以下错误

2015-05-18 21:22:06,103 [[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR audit.AuditManager auditLog.368 - Could not Log audit data, Error:java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition
ORA-06512: at "SYSMAN.MGMT_AUDIT", line 492
ORA-06512: at "SYSMAN.MGMT_AUDIT", line 406
ORA-06512: at line 1

Which led me to believe that the JOB_QUEUE_PROCESSES was set to 0, but it wasn’t the case, it was set to 50, but it is actually not a correct limit, so I bumped it up to 1000 as per documentation and tried to rerun the EM12c repository DBMS Scheduler jobs as per the documentation in 1498456.1
导致我相信是JOB_QUEUE_PROCESSES的问题的原因是它被设置成了0.但不是这个问题,因为我把它设置成了50.但是50依然不是一个正确的值。所以我又根据文档把它提升到1000,然后根据文档1498456.1尝试重新运行EM12C的调度job

SQL> show parameter JOB_QUEUE_PROCESSES
 
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 50
SQL> alter system set JOB_QUEUE_PROCESSES=1000 scope = both;
 
System altered.
 
SQL> show parameter both
SQL> show parameter job
 
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 1000
SQL> connect / as sysdba
Connected.
SQL> alter system set job_queue_processes = 0;
 
System altered.
 
SQL> connect sysman/
Connected.
SQL> exec emd_maintenance.remove_em_dbms_jobs;
 
PL/SQL procedure successfully completed.
 
SQL> exec gc_interval_partition_mgr.partition_maintenance;
 
PL/SQL procedure successfully completed.
 
SQL> @$OMS_HOME/sysman/admin/emdrep/sql/core/latest/admin/admin_recompile_invalid.sql SYSMAN
old 11: AND owner = upper('&RECOMPILE_REPOS_USER')
new 11: AND owner = upper('SYSMAN')
old 26: dbms_utility.compile_schema(upper('&RECOMPILE_REPOS_USER'),FALSE);
new 26: dbms_utility.compile_schema(upper('SYSMAN'),FALSE);
old 41: WHERE owner = upper('&RECOMPILE_REPOS_USER')
new 41: WHERE owner = upper('SYSMAN')
old 84: AND owner = upper('&RECOMPILE_REPOS_USER')
new 84: AND owner = upper('SYSMAN')
old 104: AND ds.table_owner = upper('&RECOMPILE_REPOS_USER')
new 104: AND ds.table_owner = upper('SYSMAN')
 
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
 
SQL> connect / as sysdba
Connected.
SQL> alter system set job_queue_processes = 1000;
 
System altered.
 
SQL> connect sysman/
Enter password:
Connected.
SQL> exec emd_maintenance.submit_em_dbms_jobs;
 
PL/SQL procedure successfully completed.
 
SQL> commit;
 
Commit complete.

后来,我启动了OMS。但即使我修复了调度工作任务的错误,仍然有相同的报错。当时我在emoms.log中看到了如下的错误:

2015-05-18 22:29:09,573 [[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN auth.EMRepLoginFilter doFilter.450 - InvalidEMUserException caught in EMRepLoginFilter: Failed to login using repository authentication for user: SSA_ADMIN
oracle.sysman.emSDK.sec.auth.InvalidEMUserException: Failed to login using repository authentication for user: SSA_ADMIN

因此我按照文档1493151.1所述,做了对SYSMAN.MGMT_AUDIT_MASTER表的更新,然后跑了MGMT_AUDIT_ADMIN.ADD_AUDIT_PARTITION存储过程

oracle $ sqlplus
 
Enter user-name: sysman
Enter password:
 
SQL> update mgmt_audit_master set prepopulate_days=5 where prepopulate_days is null;
 
1 rows updated. (这里我实践的时候是0)
 
SQL> select count(1) from mgmt_audit_master where prepopulate_days is null;
 
COUNT(1)
----------
0
 
SQL> exec mgmt_audit_admin.add_audit_partition;
 
PL/SQL procedure successfully completed.
 
SQL> commit;
 
Commit complete.

当我做了以上动作之后,我可以用所有的admin权限账户正确登录我的EM12C。

结论就是

即使没有将JOB_QUEUE_PROCESSES设置为0,这也是它失败的原因,因为它是该参数的一个比较低的值,所以小心设置这个参数,得确保遵从最新的安装指南。

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论