技术文章 - CS262115
从 ptc-windchill-demo-thing 执行 ListSavedSearches 服务失败并出现错误 401 Thingworx Navigate 中需要授权
已修改: 25-Dec-2022
适用于
- Windchill Navigate (formerly ThingWorx Navigate) 1.4.0 to 9.1
- Windchill PDMLink 10.2 to 12.0
说明
- 从 ptc-windchill-demo-thing 执行 ListSavedSearches 服务失败并出现错误 401 需要授权。
- 使用自签名客户端证书的 PTC Navigate 和 Windchill PDMLink 集成问题。
- ListSavedSearches 服务在浏览器中报告以下错误:

- Windchill PDMLink 服务器配置有第三方证书,Thingworx 服务器配置有自签名证书。
- Thingworx Application.log 报告以下错误:
[L:错误] [O:ctwBaseService] [I:] [U:管理员] [S:] [T:http-nio-8443-exec-4] [上下文: com.thingworx.webservices.context.HttpExecutionContext@7753d44a ][消息:事物 [ptc-windchill-demo-thing] 未运行]
[L:错误] [O:ctwBaseService] [I:] [U:管理员] [S:] [T:http-nio-8443-exec-3] [上下文: com.thingworx.webservices.context.HttpExecutionContext@67013dfc ][消息:服务脚本 [ptc-windchill-demo-thing ListSavedSearches] 中的执行错误:包装的 com.ptc.connected.plm.thingworx.JSONServerException:JSON 服务器错误 HTTP 401 <!DOCTYPE HTML PUBLIC "-//IETF// DTD HTML 2.0//EN">
<html><标题>
<title>401需要授权</title>
</头><正文>
<h1>需要授权</h1>
<p>此服务器无法验证您
有权访问文档
要求。要么你提供了错误的
凭据(例如,错误的密码),或您的
浏览器不理解如何提供
所需的凭证。</p>
<p>此外,需要 401 授权
尝试使用 ErrorDocument 处理请求时遇到错误。</p>
</body></html>
原因:JSON 服务器错误 HTTP 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><标题>
<title>401需要授权</title>
</头><正文>
<h1>需要授权</h1>
<p>此服务器无法验证您
有权访问文档
要求。要么你提供了错误的
凭据(例如,错误的密码),或您的
浏览器不理解如何提供
所需的凭证。</p>
<p>此外,需要 401 授权
尝试使用 ErrorDocument 处理请求时遇到错误。</p>
</body></html>
]
2018-03-16 13:05:22.678+0100 [L: 错误] [O: ctwBaseService] [I: ] [U: 管理员] [S: ] [T: http-nio-8443-exec-8] [上下文: com.thingworx.webservices.context.HttpExecutionContext@615b718f][消息:服务脚本 [ptc-windchill-demo-thing ListSavedSearches] 中的执行错误:包装的 com.ptc.connected.plm.thingworx.JSONServerException:JSON 服务器错误 HTTP 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><标题>
<title>401需要授权</title>
</头><正文>
[L:错误] [O:ctwBaseService] [I:] [U:管理员] [S:] [T:http-nio-8443-exec-3] [上下文: com.thingworx.webservices.context.HttpExecutionContext@67013dfc ][消息:服务脚本 [ptc-windchill-demo-thing ListSavedSearches] 中的执行错误:包装的 com.ptc.connected.plm.thingworx.JSONServerException:JSON 服务器错误 HTTP 401 <!DOCTYPE HTML PUBLIC "-//IETF// DTD HTML 2.0//EN">
<html><标题>
<title>401需要授权</title>
</头><正文>
<h1>需要授权</h1>
<p>此服务器无法验证您
有权访问文档
要求。要么你提供了错误的
凭据(例如,错误的密码),或您的
浏览器不理解如何提供
所需的凭证。</p>
<p>此外,需要 401 授权
尝试使用 ErrorDocument 处理请求时遇到错误。</p>
</body></html>
原因:JSON 服务器错误 HTTP 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><标题>
<title>401需要授权</title>
</头><正文>
<h1>需要授权</h1>
<p>此服务器无法验证您
有权访问文档
要求。要么你提供了错误的
凭据(例如,错误的密码),或您的
浏览器不理解如何提供
所需的凭证。</p>
<p>此外,需要 401 授权
尝试使用 ErrorDocument 处理请求时遇到错误。</p>
</body></html>
]
2018-03-16 13:05:22.678+0100 [L: 错误] [O: ctwBaseService] [I: ] [U: 管理员] [S: ] [T: http-nio-8443-exec-8] [上下文: com.thingworx.webservices.context.HttpExecutionContext@615b718f][消息:服务脚本 [ptc-windchill-demo-thing ListSavedSearches] 中的执行错误:包装的 com.ptc.connected.plm.thingworx.JSONServerException:JSON 服务器错误 HTTP 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><标题>
<title>401需要授权</title>
</头><正文>
- Apache 错误日志报告以下错误:
[错误] [客户端 xxxx] 没有可接受的变体:/opt/ptc/windchill/codebase/webserver/apache/error/apachelogin.html
[调试] ssl_engine_io.c(1952): OpenSSL: I/O error, 5 bytes expected to read on BIO#26d96a8 [mem: 15d22b3]
[调试] ssl_engine_io.c(1952): OpenSSL: I/O error, 5 bytes expected to read on BIO#26d93d8 [mem: 15de463]
[info] [client 10.16.134.11] (OS 10060)连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立连接失败,因为连接的主机没有响应。 : SSL 输入过滤器读取失败。
[调试] ssl_engine_io.c(1952): OpenSSL: I/O error, 5 bytes expected to read on BIO#26d96a8 [mem: 15d22b3]
[调试] ssl_engine_io.c(1952): OpenSSL: I/O error, 5 bytes expected to read on BIO#26d93d8 [mem: 15de463]
[info] [client 10.16.134.11] (OS 10060)连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立连接失败,因为连接的主机没有响应。 : SSL 输入过滤器读取失败。
- Apache访问日志报如下错误:
GET /Windchill/sslClientAuth/servlet/rest/search/saved-searches?%24select=%2Cname%2CobjectId&wt.effectiveUid=Administrator HTTP/1.1" 406 - 3007
- 在 ptc-windchill-integration-connector 中执行 ValidateConnection 服务失败,错误为 401-Unauthorized
- 集成运行时日志报告以下错误:
DEBUG ctirbHttpClientConfiguration - 因为 401 再试一次:false
调试 oacchHttpProducer - Http responseCode: 401
DEBUG ctircHttpConnectionResponseTypeConverter - ValidateConnection:HTTP 响应代码 [401],HTTP 响应文本 [未经授权]
调试 oacchHttpProducer - Http responseCode: 401
DEBUG ctircHttpConnectionResponseTypeConverter - ValidateConnection:HTTP 响应代码 [401],HTTP 响应文本 [未经授权]
这是文章 262115 的 PDF 版本,可能已过期。最新版本 CS262115