我查看了一下日志,说授权的请求头无效或丢失,错误信息如下:
[2023-07-06 09:57:01.267] |-[INFO] |-[6ff01328ac0f4fab8cfecb77074f8821] |-[admin] |-[g5.sv.defense.DefenseManager.reg(DefenseManager.java:43)] |-[QUERY: [未命名-3<未命名-3>] Add defense for id: 未命名-3, defense: GetQryMetaReq@583862885{id=未命名-3,timeout=1800000}]
[2023-07-06 09:57:01.284] |-[INFO] |-[6ff01328ac0f4fab8cfecb77074f8821] |-[admin] |-[g5.qry.util.http.HttpClientUtils.parseResponse(HttpClientUtils.java:112)] |-[QUERY: [未命名-3<未命名-3>] Start Receive data type: application/json; charset=UTF-8, total bytes: 65.]
[2023-07-06 09:57:01.284] |-[WARN] |-[6ff01328ac0f4fab8cfecb77074f8821] |-[admin] |-[g5.qry.util.http.HttpClientUtils.checkErrorInfo(HttpClientUtils.java:127)] |-[QUERY: [未命名-3<未命名-3>] Received invalid response! Http Status Code: 401, {"code":"-1","message":"Missing or invalid Authorization header"}]
[2023-07-06 09:57:01.284] |-[WARN] |-[6ff01328ac0f4fab8cfecb77074f8821] |-[admin] |-[g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:175)] |-[QUERY: [未命名-3<未命名-3>][ErrCode: 8192] get Meta Query'未命名-3' failed! 无法连接数据源:/信息工艺部/智能制造系统科/测试restful连接,请检查URL,用户名或密码是否正确。 Http code: 401]
g5.util.GRTException: 无法连接数据源:/信息工艺部/智能制造系统科/测试restful连接,请检查URL,用户名或密码是否正确。 Http code: 401
at g5.qry.util.http.HttpClientUtils.checkErrorInfo(HttpClientUtils.java:136) ~[product.jar:?]
at g5.qry.util.http.HttpClientUtils.parseResponse(HttpClientUtils.java:117) ~[product.jar:?]
at g5.qry.restful.RestFetchDatahandler.handle(RestFetchDatahandler.java:87) ~[product.jar:?]
at g5.qry.dataHandler.HandChain.doHandle(HandChain.java:34) ~[product.jar:?]
at g5.qry.DataExecutor.execute(DataExecutor.java:48) ~[product.jar:?]
at g5.qry.restful.RestDataExecutor.metaCols(RestDataExecutor.java:42) ~[product.jar:?]
at g5.qry.restful.RestfulExecutor.metaCols(RestfulExecutor.java:39) ~[product.jar:?]
at g5.qry.restful.RestfulQuery.metaCols(RestfulQuery.java:53) ~[product.jar:?]
at g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:93) [product.jar:?]
at g5.sv.Req.process(Req.java:50) [product.jar:?]
at g5.sv.qry.impl.QueryServiceImpl.process(QueryServiceImpl.java:192) [product.jar:?]
at g5.sv.qry.QueryProc.procReq(QueryProc.java:142) [product.jar:?]
at g5.sv.qry.QueryProc.service(QueryProc.java:61) [product.jar:?]
at g5.sv.ServletHelper.service(ServletHelper.java:114) [product.jar:?]
at g5.sv.PortalServlet.service(PortalServlet.java:629) [product.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at g5.sv.standardsso.AbstractTokenSSOFilter.doFilter(AbstractTokenSSOFilter.java:58) [product.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at g5.sv.standardsso.SSOLoginFilter.doFilter(SSOLoginFilter.java:124) [product.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:9.0.54]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:9.0.54]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.54]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:9.0.54]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [catalina.jar:9.0.54]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-coyote.jar:9.0.54]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.54]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:9.0.54]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.54]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.54]
at java.lang.Thread.run(Thread.java:834) [?:?]
换成post请求后还是报一样的错误
[2023-07-06 10:26:47.014] |-[INFO] |-[75d389febd1949f38f1c647ba89ccbc5] |-[admin] |-[g5.qry.util.http.HttpClientUtils.parseResponse(HttpClientUtils.java:112)] |-[QUERY: [未命名-4<未命名-4>] Start Receive data type: application/json; charset=UTF-8, total bytes: 65.]
[2023-07-06 10:26:47.014] |-[WARN] |-[75d389febd1949f38f1c647ba89ccbc5] |-[admin] |-[g5.qry.util.http.HttpClientUtils.checkErrorInfo(HttpClientUtils.java:127)] |-[QUERY: [未命名-4<未命名-4>] Received invalid response! Http Status Code: 401, {"code":"-1","message":"Missing or invalid Authorization header"}]
[2023-07-06 10:26:47.014] |-[WARN] |-[75d389febd1949f38f1c647ba89ccbc5] |-[admin] |-[g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:175)] |-[QUERY: [未命名-4<未命名-4>][ErrCode: 8192] get Meta Query'未命名-4' failed! 无法连接数据源:/信息工艺部/智能制造系统科/测试restful连接,请检查URL,用户名或密码是否正确。 Http code: 401]
g5.util.GRTException: 无法连接数据源:/信息工艺部/智能制造系统科/测试restful连接,请检查URL,用户名或密码是否正确。 Http code: 401
at g5.qry.util.http.HttpClientUtils.checkErrorInfo(HttpClientUtils.java:136) ~[product.jar:?]
at g5.qry.util.http.HttpClientUtils.parseResponse(HttpClientUtils.java:117) ~[product.jar:?]
at g5.qry.restful.RestFetchDatahandler.handle(RestFetchDatahandler.java:87) ~[product.jar:?]
at g5.qry.dataHandler.HandChain.doHandle(HandChain.java:34) ~[product.jar:?]
at g5.qry.DataExecutor.execute(DataExecutor.java:48) ~[product.jar:?]
at g5.qry.restful.RestDataExecutor.metaCols(RestDataExecutor.java:42) ~[product.jar:?]
at g5.qry.restful.RestfulExecutor.metaCols(RestfulExecutor.java:39) ~[product.jar:?]
at g5.qry.restful.RestfulQuery.metaCols(RestfulQuery.java:53) ~[product.jar:?]
at g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:93) [product.jar:?]
at g5.sv.Req.process(Req.java:50) [product.jar:?]
at g5.sv.qry.impl.QueryServiceImpl.process(QueryServiceImpl.java:192) [product.jar:?]
at g5.sv.qry.QueryProc.procReq(QueryProc.java:142) [product.jar:?]
at g5.sv.qry.QueryProc.service(QueryProc.java:61) [product.jar:?]
at g5.sv.ServletHelper.service(ServletHelper.java:114) [product.jar:?]
at g5.sv.PortalServlet.service(PortalServlet.java:629) [product.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at g5.sv.standardsso.AbstractTokenSSOFilter.doFilter(AbstractTokenSSOFilter.java:58) [product.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at g5.sv.standardsso.SSOLoginFilter.doFilter(SSOLoginFilter.java:124) [product.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:9.0.54]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:9.0.54]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.54]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:9.0.54]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [catalina.jar:9.0.54]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-coyote.jar:9.0.54]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.54]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:9.0.54]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.54]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.54]
at java.lang.Thread.run(Thread.java:834) [?:?]
我去掉了请求头参数中的Bearer报错还是一样的
[2023-07-06 11:55:45.740] |-[INFO] |-[a0981f33ba7f4f20bc44d33e400fa7f1] |-[admin] |-[g5.sv.defense.DefenseManager.reg(DefenseManager.java:43)] |-[QUERY: [未命名-5<未命名-5>] Add defense for id: 未命名-5, defense: GetQryMetaReq@582610860{id=未命名-5,timeout=1800000}]
[2023-07-06 11:55:45.757] |-[INFO] |-[a0981f33ba7f4f20bc44d33e400fa7f1] |-[admin] |-[g5.qry.util.http.HttpClientUtils.parseResponse(HttpClientUtils.java:112)] |-[QUERY: [未命名-5<未命名-5>] Start Receive data type: application/json; charset=UTF-8, total bytes: 65.]
[2023-07-06 11:55:45.758] |-[WARN] |-[a0981f33ba7f4f20bc44d33e400fa7f1] |-[admin] |-[g5.qry.util.http.HttpClientUtils.checkErrorInfo(HttpClientUtils.java:127)] |-[QUERY: [未命名-5<未命名-5>] Received invalid response! Http Status Code: 401, {"code":"-1","message":"Missing or invalid Authorization header"}]
[2023-07-06 11:55:45.758] |-[WARN] |-[a0981f33ba7f4f20bc44d33e400fa7f1] |-[admin] |-[g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:175)] |-[QUERY: [未命名-5<未命名-5>][ErrCode: 8192] get Meta Query'未命名-5' failed! 无法连接数据源:/信息工艺部/智能制造系统科/测试restful连接,请检查URL,用户名或密码是否正确。 Http code: 401]
g5.util.GRTException: 无法连接数据源:/信息工艺部/智能制造系统科/测试restful连接,请检查URL,用户名或密码是否正确。 Http code: 401
at g5.qry.util.http.HttpClientUtils.checkErrorInfo(HttpClientUtils.java:136) ~[product.jar:?]
at g5.qry.util.http.HttpClientUtils.parseResponse(HttpClientUtils.java:117) ~[product.jar:?]
at g5.qry.restful.RestFetchDatahandler.handle(RestFetchDatahandler.java:87) ~[product.jar:?]
at g5.qry.dataHandler.HandChain.doHandle(HandChain.java:34) ~[product.jar:?]
at g5.qry.DataExecutor.execute(DataExecutor.java:48) ~[product.jar:?]
at g5.qry.restful.RestDataExecutor.metaCols(RestDataExecutor.java:42) ~[product.jar:?]
at g5.qry.restful.RestfulExecutor.metaCols(RestfulExecutor.java:39) ~[product.jar:?]
at g5.qry.restful.RestfulQuery.metaCols(RestfulQuery.java:53) ~[product.jar:?]
at g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:93) [product.jar:?]
at g5.sv.Req.process(Req.java:50) [product.jar:?]
at g5.sv.qry.impl.QueryServiceImpl.process(QueryServiceImpl.java:192) [product.jar:?]
at g5.sv.qry.QueryProc.procReq(QueryProc.java:142) [product.jar:?]
at g5.sv.qry.QueryProc.service(QueryProc.java:61) [product.jar:?]
at g5.sv.ServletHelper.service(ServletHelper.java:114) [product.jar:?]
at g5.sv.PortalServlet.service(PortalServlet.java:629) [product.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at g5.sv.standardsso.AbstractTokenSSOFilter.doFilter(AbstractTokenSSOFilter.java:58) [product.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at g5.sv.standardsso.SSOLoginFilter.doFilter(SSOLoginFilter.java:124) [product.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina.jar:9.0.54]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:9.0.54]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:9.0.54]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.54]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [catalina.jar:9.0.54]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:9.0.54]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [catalina.jar:9.0.54]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-coyote.jar:9.0.54]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.54]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.54]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:9.0.54]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.54]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.54]
at java.lang.Thread.run(Thread.java:834) [?:?]