Orchestrator
2021.10
False
横幅背景图像
Orchestrator 安装指南
上次更新日期 2024年4月19日

身份服务器故障排除

查看日志中的其他信息

在某些情况下,身份服务器会引发包含敏感信息的错误消息。例如,如果用于对身份服务器生成的访问令牌进行签名的证书是 1024 位而不是 2048 位公钥,则在尝试登录到新安装或升级的 Orchestrator 租户时,您将收到以下错误消息:

InternalServerError - IDX10630 The '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'

若要启用证书公钥或隐藏 PII(个人身份信息)等敏感信息记录,请更新现有“应用程序设置”部分中 Identity Server 的 appsettings.Production.json 文件中的以下设置:
"AppSettings": {
    "EnablePII": true
  },"AppSettings": {
    "EnablePII": true
  },
注意: 即使在更新 Identity Server 的 appsettings.Production.json 文件中的 EnablePII 设置之后,某些信息仍可能被隐藏。 要显示 Orchestrator PII,请将 ExternalAuth.ShowPII 设置添加到 Orchestrator 的 UiPath.Orchestrator.dll.config中。

使用此新设置,错误消息将显示更多有用信息:

The 'Microsoft.IdentityModel.Tokens.X509SecurityKey, KeyId: 'F9B1F6C18B728C02C8853470C71C365F000C86B5', InternalId: 'd3dadcac-e5aa-48e6-a20a-9232a3c3d16f'.' for signing cannot be smaller than '2048' bits. KeySize: '1024'. (Parameter 'key.KeySize')

错误的 .NET Core Hosting Bundle 安装

在某些情况下,.NET Core Hosting Bundle 安装不正确。这可能会产生以下影响:

  • 在 IIS 中运行的 .NET Core 应用程序(如身份服务器)无法启动,而是显示 System.IO.IOException: IDX20807: Unable to retrieve document 错误。
  • 在 IIS 中访问身份服务器的处理程序映射时,发生错误。
  • 在浏览器中访问 https://localhost/identity URL 时,将会出现 500.19 Error Code: 0x8007000d 错误。

此问题的有效解决方案是重新安装 .NET Core Hosting Bundle。

升级到 Orchestrator 2020.4 及以上版本后无法访问“外部提供程序”页面

当您将 Orchestrator 更新到 2020.4+ 时, Identity Server 会迁移您以前的设置。 如果您之前在 为 Windows AD 用户设置自动登录时启用了 Windows 身份验证,则执行升级后,如果用户以前登录过 Identity Server,则他们将无法访问“ 外部提供程序 ” 页面。 输入 Windows 凭据后,用户将直接登录到租户。

如果无法访问“登录”页面,主机管理员将无法登录到“主机”租户,也无法访问身份管理门户

如果您遇到这种情况,请以隐身模式打开一个新的浏览器,然后键入 https://<OrchestratorURL>/identity/configuration

首次登录时更改密码的用户的 /api/account/authenticate 调用失败

对于在首次登录 Orchestrator 时更改密码的新创建用户,通过 PowerShell 对 /api/account/authenticate 端点执行的任何调用都会导致 Invalid credentials, failed to login 错误消息。

在这种情况下,用户应从 Orchestrator 的配置文件页面更改其密码。

安装后出现“密钥集不存在”错误

安装 UiPath Orchestrator 2020.4 后,如果用于 Identity Server 的证书没有设置适当的权限,则可能发生 Keyset does not exist 内部服务器错误。

以管理员身份运行以下 PowerShell 脚本以授予证书权限:

import-module WebAdministration
$siteName = 'UiPath Orchestrator'
$binding = (Get-ChildItem -Path IIS:\SSLBindings | Where Sites -eq $siteName)[0]
$certLoc = "cert:\LocalMachine\MY\$($binding.Thumbprint)"
$cert = Get-Item $certLoc
$keyPath = $env:ProgramData + "\Microsoft\Crypto\RSA\MachineKeys\"
$keyName = $cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName
$keyFullPath = $keyPath + $keyName
$acl = (Get-Item $keyFullPath).GetAccessControl('Access')
$permission="IIS_IUSRS","Full","Allow"
$accessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $permission
$acl.AddAccessRule($accessRule)
Set-Acl -Path $keyFullPath -AclObject $aclimport-module WebAdministration
$siteName = 'UiPath Orchestrator'
$binding = (Get-ChildItem -Path IIS:\SSLBindings | Where Sites -eq $siteName)[0]
$certLoc = "cert:\LocalMachine\MY\$($binding.Thumbprint)"
$cert = Get-Item $certLoc
$keyPath = $env:ProgramData + "\Microsoft\Crypto\RSA\MachineKeys\"
$keyName = $cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName
$keyFullPath = $keyPath + $keyName
$acl = (Get-Item $keyFullPath).GetAccessControl('Access')
$permission="IIS_IUSRS","Full","Allow"
$accessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $permission
$acl.AddAccessRule($accessRule)
Set-Acl -Path $keyFullPath -AclObject $acl
备注:
根据 Orchestrator 安装修改 $siteName 值。

执行任何配置更改后重新启动 IIS 站点。

更新期间机器人密钥迁移失败

在对身份服务器服务执行任何更新/升级之前,应停止 Orchestrator 服务。在身份服务器更新期间对 Orchestrator 中的机器人作出更改会导致更新失败。

如果发生这种情况,请停止 Orchestrator 服务并重新运行迁移。

使用包含非 ASCII 字符的语言进行部署

多个问题已与包含非 ASCII 字符的语言的 本地化问题 相关联。 如需完整的本地化支持,请升级到 20.10+ Insights 版本。

配置 Identity Server UI 中不可用的 SAML 设置

以下变通办法解决了安装 Orchestrator v2020.4 或更高版本并且需要特定设置才能使 SAML 提供程序正常工作的情况。

Identity Server UI 在 SAML 配置方面应该可以满足您的大多数需求,而本节提供了一种方法来控制默认情况下不公开的其他 SAML 设置。有关可用设置的完整列表,请参阅官方的 Sustainsys.Saml2 文档。

Sustainsys.Saml2 是 Identity Server 依靠用来获得 SAML 支持的库,它使用 XML 配置文件。要访问 Identity Server UI 中不可用的字段,您需要覆盖此 XML 文件。以下过程描述了如何进行管理:

  1. 确保在身份管理门户的“ 外部提供程序 ” 页面上启用并正确配置了 SAML 外部身份提供程序。
  2. 编辑 appsettings.jsonappsettings.Production.json 文件以在根级别包含以下部分。这样就能告诉 Identity Server,在与网页应用程序以及 appsettings.jsonappsettings.Production.json 相同的目录中搜索 saml2.xml 文件。
    "Authentication": {
       "Saml2": {
         "ConfigFile": "saml2.xml"
       }
     },"Authentication": {
       "Saml2": {
         "ConfigFile": "saml2.xml"
       }
     },
  3. 创建一个名为 saml2.xml 的 XML 文件并添加 SAML 配置。
  4. 将身份管理门户中外部提供程序页面上的字段映射到 saml2.xml 的相应节点。


    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <section name="sustainsys.saml2" type="Sustainsys.Saml2.Configuration.SustainsysSaml2Section, Sustainsys.Saml2" />
     </configSections>
      <sustainsys.saml2 
          entityId="--1--"
          returnUrl="--5--">
        <identityProviders>
          <add 
              entityId="--2--" 
              signOnUrl="--3--" 
              allowUnsolicitedAuthnResponse="--4--" 
              binding="--6--">
            <signingCertificate 
                storeName="--7--" 
                storeLocation="--8--"
                findValue="--9--" 
                x509FindType="FindByThumbprint"/>
          </add>
        </identityProviders>
        <serviceCertificates>
          <add
              use="Both"
              storeName="--10--" 
              storeLocation="--11--"
              findValue="--12--" 
              x509FindType="FindByThumbprint"/>
        </serviceCertificates>
      </sustainsys.saml2>
    </configuration><?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <section name="sustainsys.saml2" type="Sustainsys.Saml2.Configuration.SustainsysSaml2Section, Sustainsys.Saml2" />
     </configSections>
      <sustainsys.saml2 
          entityId="--1--"
          returnUrl="--5--">
        <identityProviders>
          <add 
              entityId="--2--" 
              signOnUrl="--3--" 
              allowUnsolicitedAuthnResponse="--4--" 
              binding="--6--">
            <signingCertificate 
                storeName="--7--" 
                storeLocation="--8--"
                findValue="--9--" 
                x509FindType="FindByThumbprint"/>
          </add>
        </identityProviders>
        <serviceCertificates>
          <add
              use="Both"
              storeName="--10--" 
              storeLocation="--11--"
              findValue="--12--" 
              x509FindType="FindByThumbprint"/>
        </serviceCertificates>
      </sustainsys.saml2>
    </configuration>
  5. 添加所需的设置。例如,在负载平衡的情况下,请使用 publicOrigin ;如果要更改默认的 SHA256 选项,请使用 minIncomingSigningAlgorithm
  6. 保存文件,然后在 IIS 中重新启动 Identity Server 网页应用程序。如果您在 SAML 配置中遇到任何错误,则您的日志中会显示错误事件。您可以使用 Windows Event Viewer(实现此目的的默认工具)。

更新持有者令牌过期时间

Orchestrator 的 UiPath.Orchestrator.dll.config 文件未提供更新持有者令牌过期时间的方法。
只能通过在 Identity Server 的 Clients 数据库中调整 Orchestrator.Ropc 客户端的 AccessTokenLifetime 属性来进行更改。

在以下示例中,持有者令牌过期时间设置为 86400 秒(24 小时)。

UPDATE [identity].[Clients]
SET AccessTokenLifetime = 86400
WHERE ClientName = 'Orchestrator.Ropc'UPDATE [identity].[Clients]
SET AccessTokenLifetime = 86400
WHERE ClientName = 'Orchestrator.Ropc'

注销时出现间歇性 404 错误

注销请求的 URL 查询字符串有时可能会超过 IIS 允许的默认最大查询字符串长度。以下是两种修改此设置的方法:

注意:自 2021.10 发行版起,升级时不会保留对 web.config 的更改。

使用 IIS 管理器工具

  1. 在“连接”树中,导航至“站点”->“UiPath Orchestrator”->“身份”
  2. 双击“请求筛选”图标。
  3. 在右侧窗格中,单击“编辑功能设置”
  4. 增加“最大查询字符串(字节)”的值。


注意:您可能还想增加“最大 URL 长度(字节)”,因为查询字符串是整个 URL 长度的一部分。

修改身份 Web.config

  1. 查找 Identity 的 web.config 文件。
    • 默认情况下,对于 MSI 安装,这是 C:\Program Files (x86)\UiPath\Orchestrator\Identity\web.config
    • 对于 Azure 应用程序服务安装,打开“开发工具”下的“应用程序服务编辑器”并导航至 wwwroot/Web/web.config。确保您正在修改身份,而不是 Orchestrator。
  2. 使用文本编辑器打开并找到 requestFiltering 节点,该节点位于安全节点下。在 requestFiltering 下,添加一个 requestLimits 节点,如下所示:

    <configuration>
      <location path="." inheritInChildApplications="false">
        <system.webServer>
          <security>
            <requestFiltering>
              <requestLimits maxQueryString="4096" />
            </requestFiltering>
          </security>
        </system.webServer>
      </location>
    </configuration><configuration>
      <location path="." inheritInChildApplications="false">
        <system.webServer>
          <security>
            <requestFiltering>
              <requestLimits maxQueryString="4096" />
            </requestFiltering>
          </security>
        </system.webServer>
      </location>
    </configuration>

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.