开发者社区> 问答> 正文

tomcat 配置memcached 配置报错 

在tomcat/conf/context.xml 下
配置memcached
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"         memcachedNodes="n1:localhost:11211"         requestUriIgnorePattern=".*/.(png|gif|jpg|css|js)$"         sessionBackupAsync="false"         sessionBackupTimeout="100"         transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
        copyCollectionsForSerialization="false"/>

启动tomcat  就报错 端口占用
去掉context.xml的 memcached 的配置 就能启动~ why 啊

展开
收起
kun坤 2020-05-31 18:38:15 493 0
1 条回答
写回答
取消 提交回答
  •      去掉这个启动就不报错么?        ######对的######<Engine defaultHost="localhost" name="Catalina">

          <!--For clustering, please take a look at documentation at:

              /docs/cluster-howto.html  (simple how to)

              /docs/config/cluster.html (reference documentation) -->

          <!--

          <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

          -->

          <!-- Use the LockOutRealm to prevent attempts to guess user passwords

               via a brute-force attack -->

          <Realm className="org.apache.catalina.realm.LockOutRealm">

            <!-- This Realm uses the UserDatabase configured in the global JNDI

                 resources under the key "UserDatabase".  Any edits

                 that are performed against this UserDatabase are immediately

                 available for use by the Realm.  -->

            <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>

          </Realm>

          <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" deployOnStartup="false">

            <!-- SingleSignOn valve, share authentication between web applications

                 Documentation at: /docs/config/valve.html -->

            <!--

            <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

            -->

             <Context docBase="nginx" reloadable="false" path="/nginx">  

                <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"  

                    memcachedNodes="n1:localhost:11211"  

                    requestUriIgnorePattern=".*.(png|gif|jpg|css|js)$"  

                    sessionBackupAsync="false"  

                    sessionBackupTimeout="100"  

                    transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"  

                    copyCollectionsForSerialization="false"  

                    />  

            </Context>

            <!-- Access log processes all example.

                 Documentation at: /docs/config/valve.html

                 Note: The pattern used is equivalent to using pattern="common" -->

            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/>

               

          </Host>

        </Engine>
    server.xml的配置 ######@爱在戏院前######     是tomcat端口占用还是memcached端口占用?  把错误发出来######tomcat 端口占用######靠 真丢人 看错日志了。 其实是jar包 依赖错误! 结贴!

    2020-05-31 18:38:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载