已知问题|业务规则不生效/服务业务规则无法打开/生命周期点开报错/无法编辑RLC规则/自定义触发器无法打开

已知问题|业务规则不生效/服务业务规则无法打开/生命周期点开报错/无法编辑RLC规则/自定义触发器无法打开

问题现象

业务规则不生效/服务业务规则无法打开/生命周期点开报错/无法编辑RLC规则/自定义触发器无法打开





问题排查

打开网页抓包,如果发现调用了此api/v3/requests/_metainfo并报错"Internal error"。则可以确认是已知问题。


临时解决方法

1、复现问题,查看/logs/serverout0.txt日志。
2、可以找到如下报错,Service ID可能不同。
[15:02:10:491]|[08-08-2024]|[com.manageengine.sdpod.v3api.handlerimpl.WorkOrderHandler]|[SEVERE]|[61]: No Service table found for the service 1801| 
java.lang.Exception: No Service table found for the service 1801
at com.manageengine.servicedesk.utils.ServiceCatalogUtil.getServiceTable(ServiceCatalogUtil.java:1663)
at com.manageengine.servicedesk.utils.ServiceCatalogUtil.getServiceTable(ServiceCatalogUtil.java:1628)
at com.manageengine.servicedesk.utils.ServiceCatalogUtil.getAllServiceTablesUsingMDHSettings(ServiceCatalogUtil.java:5814)
at com.manageengine.servicedesk.utils.ServiceCatalogUtil.getAllServiceTablesUsingMDHSettings(ServiceCatalogUtil.java:5797)
3、到数据库中执行下列sql
select * from servicedefinition where serviceid=1801;

通过此SQL语句可以看到对应的服务目录的名称。
4、到服务目录的编辑页面,任意修改一个字段再重新保存。然后再使用无痕模式,观察此问题是否解决。

注:
可能存在多个服务目录报错的问题。如果执行后问题未解决。可再观察日志,是否有其它的服务目录报错。

国内目前遇到四次此问题都参考上述步骤解决,研发还提到会有其它情况,如参考上述步骤未解决可参考:
Reason - Issue occurs if service category and service additional fields related tables like servicemetatable, dynamic tables contains orphan entries for that particular service category

Queries to be executed directly from db:
1. select * from servicemetatable where serviceid =4801;
2. select * from dynamictables where tablename in ('ServiceReq_4801','SServiceReq_4801','ARC_ServiceReq_4801'); 
3. select * from tabledetails where table_name in ('ServiceReq_4801','SServiceReq_4801','ARC_ServiceReq_4801');
4. select * from columndetails where table_id not in (select table_id from tabledetails);
5. select * from servicereq_4801;
6. select * from sservicereq_4801;
7. select * from arc_servicereq_4801;
8. select * from servicedefinition where serviceid=4801;

Replace '4801' with service category id which is found in error trace

To resolve the issue:
Scenario 1 : 
If query 5 to 7, throws error like no table is present and if query 1 to 4 contains data, then it is safe to delete those orphan entries using below queries 
1. delete from servicemetatable where serviceid =4801;
2. delete from dynamictables where tablename in ('ServiceReq_4801','SServiceReq_4801','ARC_ServiceReq_4801'); 
3. delete from tabledetails where table_name in ('ServiceReq_4801','SServiceReq_4801','ARC_ServiceReq_4801');
4. delete from columndetails where table_id not in (select table_id from tabledetails);

From query 8, we'll get the service category name for which issue occurs. After executing the above delete query, we can just dummy update this service category to resolve the issue

Scenario 2 :
If query 5 to 7, throws error like no table is present and if query 1 to 4 also contains no data, then we can just simply dummy update the service category and check if issue is resolved 

彻底解决

14820版本仍存在此问题。留意此需求ID SDF-110479 此需求功能会修改数据表结构,从而彻底避免此问题发生。