gpt4 book ai didi

tomcat - 面对 tomcat 7.0.71 上的 CometD 问题

转载 作者:行者123 更新时间:2023-11-28 23:21:22 24 4
gpt4 key购买 nike

cometd 3.0.1 与 tomcat 7.0.73 长轮询时出现以下错误。我们尚未在 tomcat 7.0.50 中发现此问题。

来自 CometD 开发者

javax.servlet.ServletRequestWrapper.getAsyncContext(ServletRequestWrapper.java:418) org.cometd.server.transport.AbstractStreamHttpTransport.process(AbstractStreamHttpTransport.java:88)

这是 CometD 在暂停后恢复长轮询的地方,所以调用 getAsyncContext() 是完全合法的,这是 Tomcat提示。

有没有办法让 Tomcat 进行长轮询?

Time: Fri Mar 24 2017 17:46:55 GMT+0530 (India Standard Time) Channel: null Reason: Error occured during CometD connect.
Failure Message: {"id":"4","successful":false,"channel":"/meta/connect","failure":{"reason":"error","exception":"Internal Server Error","httpCode":500,"connectionType":"long-polling","transport":{"readyState":4,"withCredentials":true,"responseText":"

HTTP Status 500 - java.lang.RuntimeException: java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
type Exception report

message java.lang.RuntimeException: java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.RuntimeException: java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)\n\tcom.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)\n\torg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)\n\torg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)\n\torg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)\n\torg.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:317)\n\torg.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1681)\n\torg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:616)\n\torg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)\n\torg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)\n\tjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\torg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tjava.lang.Thread.run(Thread.java:745)\n
root cause

java.lang.RuntimeException: java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)\n\tcom.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)\n\torg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)\n\torg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)\n\torg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)\n\torg.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:317)\n\torg.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1681)\n\torg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:616)\n\torg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)\n\torg.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)\n\tjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\torg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tjava.lang.Thread.run(Thread.java:745)\n
root cause

java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)\n\torg.apache.catalina.connector.Request.getAsyncContext(Request.java:1740)\n\torg.apache.catalina.connector.RequestFacade.getAsyncContext(RequestFacade.java:1047)\n\tjavax.servlet.ServletRequestWrapper.getAsyncContext(ServletRequestWrapper.java:418)\n\torg.cometd.server.transport.AbstractStreamHttpTransport.process(AbstractStreamHttpTransport.java:88)\n\torg.cometd.server.transport.AbstractStreamHttpTransport.handle(AbstractStreamHttpTransport.java:61)\n\torg.cometd.server.CometDServlet.service(CometDServlet.java:103)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:731)\n
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.73 logs.

Apache Tomcat/7.0.73

","status":500,"statusText":"Internal Server Error"},"message":{"channel":"/meta/connect","connectionType":"long-polling","id":"4","clientId":"a10paginvut3d5yfwc3azxjvpa","ext":{"ack":-1}}}}

最佳答案

关于tomcat - 面对 tomcat 7.0.71 上的 CometD 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43180016/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com