开发者社区> 问答> 正文

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 啊

展开
收起
爱吃鱼的程序员 2020-06-22 13:54:58 791 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

       去掉这个启动就不报错么?    对的<EnginedefaultHost="localhost"name="Catalina">

         <!--Forclustering,pleasetakealookatdocumentationat:
             /docs/cluster-howto.html (simplehowto)
             /docs/config/cluster.html(referencedocumentation)-->
         <!--
         <ClusterclassName="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
         -->

         <!--UsetheLockOutRealmtopreventattemptstoguessuserpasswords
              viaabrute-forceattack-->
         <RealmclassName="org.apache.catalina.realm.LockOutRealm">
           <!--ThisRealmusestheUserDatabaseconfiguredintheglobalJNDI
                resourcesunderthekey"UserDatabase". Anyedits
                thatareperformedagainstthisUserDatabaseareimmediately
                availableforusebytheRealm. -->
           <RealmclassName="org.apache.catalina.realm.UserDatabaseRealm"resourceName="UserDatabase"/>
         </Realm>

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

           <!--SingleSignOnvalve,shareauthenticationbetweenwebapplications
                Documentationat:/docs/config/valve.html-->
           <!--
           <ValveclassName="org.apache.catalina.authenticator.SingleSignOn"/>
           -->
          <ContextdocBase="nginx"reloadable="false"path="/nginx"> 
             <ManagerclassName="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>
           <!--Accesslogprocessesallexample.
                Documentationat:/docs/config/valve.html
                Note:Thepatternusedisequivalenttousingpattern="common"-->
           <ValveclassName="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的配置

    <aclass='referer'target='_blank'>@爱在戏院前   是tomcat端口占用还是memcached端口占用? 把错误发出来tomcat端口占用靠真丢人看错日志了。其实是jar包依赖错误!结贴!

    2020-06-22 13:55:15
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载