zoukankan      html  css  js  c++  java
  • BAD packet signature 18245 错误解决

    1、错误信息

    2014-7-15 2:46:38 org.apache.jk.common.MsgAjp processHeader
    严重: BAD packet signature 18245
    2014-7-15 2:46:38 org.apache.jk.common.ChannelSocket processConnection
    严重: Error, processing connection
    java.lang.IndexOutOfBoundsException
        at java.io.BufferedInputStream.read(BufferedInputStream.java:306)
        at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
        at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:577)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:685)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:595)


    2、原因,WEB请求訪问port不对。也就是说在浏览器中输入的URLport号是AJP协议的port号,而不是WEB服务的port号。

    以下的样例中ARJ协议port号为8009,真正的WEB服务port号应为9000,所以,若使用8009訪问,会出现上面的错误信息。



     <Service name="Catalina">
        <!--The connectors can use a shared executor, you can define one or more named thread pools-->  
        <!--
        <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
            maxThreads="150" minSpareThreads="4"/>
        -->  
        <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned. Documentation at :
             Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
             Java AJP  Connector: /docs/config/ajp.html
             APR (HTTP/AJP) Connector: /docs/apr.html
             Define a non-SSL HTTP/1.1 Connector on port 8080
        -->  
        <Connector URIEncoding="UTF-8" connectionTimeout="20000" port="9000" protocol="HTTP/1.1" redirectPort="8443"/>  
        <!-- A "Connector" using the shared thread pool-->  
        <!--
        <Connector executor="tomcatThreadPool"
                   port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
        -->  
        <!-- Define a SSL HTTP/1.1 Connector on port 8443
             This connector uses the JSSE configuration, when using APR, the
             connector should be using the OpenSSL style configuration
             described in the APR documentation -->  
        <!--
        <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
                   maxThreads="150" scheme="https" secure="true"
                   clientAuth="false" sslProtocol="TLS" />
        -->  
        <!-- Define an AJP 1.3 Connector on port 8009 -->  
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>  
        <!-- An Engine represents the entry point (within Catalina) that processes
             every request.  The Engine implementation for Tomcat stand alone
             analyzes the HTTP headers included with the request, and passes them
             on to the appropriate Host (virtual host).
             Documentation at /docs/config/engine.html -->  
        <!-- You should set jvmRoute to support load-balancing via AJP ie :
        <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">         
        -->  
        <Engine defaultHost="localhost" name="Catalina">
    下面XML内容略


    3、解决:将URLport号改动为WEB服务的port号。

    即协议protocal 为HTTP/1.1的那一个Connnector的port号,而不是AJP。


  • 相关阅读:
    dhl:asp.net mvc下用jQuery通过AJAX 实现HTTP 请求加载远程数据
    MVC .Routing
    ASP获取当前页URL
    jQuery中的mouseenter和mouseleave事件
    dhl:使用Resharper后还原原来Visual Studio中智能感知
    JSON 数据格式
    转:点击弹出div圆角的遮罩层,可关闭可移动(文章源自:烈火网,原文:http://www.liehuo.net/a/201004/2415766.html)
    15 个一定要会的 Windows7 快捷键
    Asp.Net Mvc中的一些初级问题整理
    Javascript操作form中Field Radio Checkbox Select等的代码
  • 原文地址:https://www.cnblogs.com/mfrbuaa/p/3922674.html
Copyright © 2011-2022 走看看