策略页面加载慢
策略页面加载慢
问题现象
重要
该问题仅存在于 FortiOS 7.0.X 版本,FortiOS 7.2 和 7.4 版本不存在此问题。
访问 FortiGate 的防火墙策略(Firewall Policy)、中央 SNAT(Central SNAT)、IPv4 访问控制列表(IPv4 Access Control List)、零信任网络(ZTNA)、组播策略(Multicast Policy)、代理策略(Proxy Policy)、流量整形策略(Traffic Shaping Policies)、应用签名(Application Signatures)等策略相关页面时加载较慢,需要 3~5 秒才可以加载出来。
使用浏览器的开发者工具可以看到导致页面加载缓慢的资源是/api/v2/monitor/fortiguard/app-categories?vdom=root,并返回 HTTP 500 错误。

问题原因
这个问题是由于通过 Web 方式访问这些页面时,需要从 FortiGuard 加载app-categories资源,如果 FortiGate 此时无法访问 FortiGuard,则会花费 3~5 秒等待回应,直至返回 HTTP 500(Internal Server Error)错误后才能显示页面。
解决方法
确认 FortiGate 可以正常访问 Internet,解决 FortiGate 与 FortiGuard 之间的连通性。
如果 FortiGate 无法访问 Internet 或与 FortiGuard 通讯存在问题,可以在 CLI 下配置如下功能,关闭
gui-fortiguard-resource-fetch后,访问这些页面时 FortiGate 不再会向 FortiGuard 请求app-categories资源,直接显示相关页面。config system global set gui-fortiguard-resource-fetch disable end再次访问 FortiGate 的防火墙策略页面,
app-categories资源可以迅速加载(直接返回 HTTP 404)。