OEM执行emcli任何参数报错Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files

发布时间 2023-05-04 17:31:33作者: PiscesCanon

 

OEM执行emcli任何参数报错Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files

 

今天卸载oem的一个目标服务器上的agent的时候,执行步骤emcli报错如下:

[oracle@oem13c logs]$ $OMS_HOME/bin/emcli get_targets
Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files.
[oracle@oem13c logs]$ $OMS_HOME/bin/emcli delete_target -name="dev-testdb:3872" -type="oracle_emd" -delete_monitored_targets
Internal Error: The EM CLI system has encountered an internal error. Details have been added to the OMS log files.

防爬虫:https://www.cnblogs.com/PiscesCanon/p/17371944.html

看网上搜索没有这方面的报错记录处理方式,这里做个简单记录。

 

看日志:/u01/app/oem13c/gc_inst/em/EMGC_OMS1/sysman/log/emoms.log

截取部分报错:

2023-05-04 15:26:10,776 [EMUI_15_26_10_/console/cli] ERROR emCLI.CLIPageHandler render.672 - ORA-14400: inserted partition key does not map to any partition
ORA-06512: at "SYSMAN.EM_CLI", line 303

java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition
ORA-06512: at "SYSMAN.EM_CLI", line 303

 

这是因为没有任何 DBMS_scheduler 作业在 EM 存储库中运行。
ORA-14400 错误表示用于存储登录相关数据的 EM 13c 存储库中不存在预期的分区。
dbms_scheduler 作业负责创建分区。

 

想起来51放假之前,刚好在做12c(OEM的资料库)升级19c的实验,只做了一点点步骤,其中把job_queue_processes设置为了0,而且51机房断电维修还把资料还给强制关了,估计跟这个有关系。

 

解决如下:

15:38:36 SYS@oemdb(586)> alter system set job_queue_processes = 0;
15:38:41 SYS@oemdb(586)> connect sysman/oracle
15:38:48 SYSMAN@oemdb(468)> exec emd_maintenance.remove_em_dbms_jobs;
15:38:55 SYSMAN@oemdb(468)> exec gc_interval_partition_mgr.partition_maintenance;
15:41:21 SYSMAN@oemdb(468)> @/u01/app/oem13c/middleware/sysman/admin/emdrep/sql/core/latest/admin/admin_recompile_invalid.sql SYSMAN
15:42:34 SYSMAN@oemdb(468)> connect / as sysdba
15:42:44 SYS@oemdb(468)> alter system set job_queue_processes = 1000;
15:42:48 SYS@oemdb(468)> connect sysman/oracle
15:43:04 SYSMAN@oemdb(468)> exec emd_maintenance.submit_em_dbms_jobs;
15:43:14 SYSMAN@oemdb(468)> commit;

 

 

在尝试就没有问题了。

 

参考文档:

"EM CLI System Has Encountered An Internal Error" when executing emclii delete_target (文档 ID 2918664.1)

EM 13c: Executing any emcli Command Results in Error: Internal Error: The EM CLI System Has Encountered An Internal Error. Details have been added to the OMS log files (文档 ID 2197390.1)