开发者社区> 问答> 正文

memcached-session-manager 如何配置:配置报错 

最近在做msm但是在网上找的答案都配置不出来,有谁配置过能告诉我怎么配置的吗?我现在的情况是:192.168.0.100,192.168.0.200

这2台服务器上,分别放了2个tomcat服务器,现在在192.168.0.100上面安装了memcached,接下来要怎么配置呢?也可以加我QQ:23767445   或者   mail : pros@foxmail.com,先谢谢大家了。

展开
收起
kun坤 2020-06-02 17:23:37 494 0
1 条回答
写回答
取消 提交回答
  • 。。。不要问这种问题, 谁有空手把手的加qq教你。。######弄了好几天了,实在没有好办法才来的啊

    ######你可以类似这样的配置 我现在也是两个tomcat+1个memcached         <Context path=""
                docBase="/home/wap01/deploy/2011/06/10/a"
                reloadable="true"
                caseSensitive="false"
                debug="0">             <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"                     memcachedNodes="n1:192.168.3.4:11211"                     requestUriIgnorePattern=".*.(png|gif|jpg|css|js|ico|jpeg|htm|html)$"                     transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"                     />         </Context>######

    引用来自“li_mohao”的答案

    你可以类似这样的配置 我现在也是两个tomcat+1个memcached         <Context path=""             docBase="/home/wap01/deploy/2011/06/10/a"             reloadable="true"             caseSensitive="false"             debug="0">             <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"                     memcachedNodes="n1:192.168.3.4:11211"                     requestUriIgnorePattern=".*\.(png|gif|jpg|css|js|ico|jpeg|htm|html)$"                     transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"                     />         </Context>
    是2个tomcat都要修改 server.XML文件吗?还是只要配置安装了memcached的,还是2个服务器都要安装memcached???   ######Jun 24, 2011 2:37:59 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jun 24, 2011 2:37:59 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.29 Jun 24, 2011 2:38:00 PM de.javakaffee.web.msm.MemcachedBackupSessionManager startInternal INFO: MemcachedBackupSessionManager starts initialization... (configured nodes definition n1:192.168.3.4:11211, failover nodes null) Jun 24, 2011 2:38:00 PM de.javakaffee.web.msm.SessionTrackerValve <init> INFO: Setting ignorePattern to .*\.(png|gif|jpg|css|js|ico|jpeg|htm|html)$ Jun 24, 2011 2:38:00 PM de.javakaffee.web.msm.MemcachedBackupSessionManager setLockingMode INFO: Setting lockingMode to null Jun 24, 2011 2:38:00 PM de.javakaffee.web.msm.MemcachedBackupSessionManager createTranscoderFactory INFO: Creating transcoder factory de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory Jun 24, 2011 2:47:12 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments/jdk1.6.0_25/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib Jun 24, 2011 2:47:13 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not fin Jun 24, 2011 2:47:13 PM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: de.javakaffee.web.msm.MemcachedBackupSessionManager     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)     at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)     at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1356)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:     at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocu     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocume     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:6     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFr     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)     at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)     at org.apache.catalina.startup.Catalina.load(Catalina.java:510)     at org.apache.catalina.startup.Catalina.load(Catalina.java:548)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jun 24, 2011 2:47:13 PM org.apache.catalina.startup.Catalina load WARNING: Catalina.start using conf/server.xml: java.lang.ClassNotFoundException: de.javakaffee.web.msm.MemcachedBackupSessionManager     at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2806)     at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2832)     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1359)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:     at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocu     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocume     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:6     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFr     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)     at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)     at org.apache.catalina.startup.Catalina.load(Catalina.java:510)     at org.apache.catalina.startup.Catalina.load(Catalina.java:548)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.ClassNotFoundException: de.javakaffee.web.msm.MemcachedBackupSessionManager     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)     at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)     at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1356)     ... 20 more Jun 24, 2011 2:47:13 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not fin Jun 24, 2011 2:47:13 PM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw exception java.lang.ClassNotFoundException: de.javakaffee.web.msm.MemcachedBackupSessionManager     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)     at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)     at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1356)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:     at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocu     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocume     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:6     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFr     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)     at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)     at org.apache.catalina.startup.Catalina.load(Catalina.java:510)     at org.apache.catalina.startup.Catalina.start(Catalina.java:568)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Jun 24, 2011 2:47:13 PM org.apache.catalina.startup.Catalina load WARNING: Catalina.start using conf/server.xml: java.lang.ClassNotFoundException: de.javakaffee.web.msm.MemcachedBackupSessionManager     at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2806)     at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2832)     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1359)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:     at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocu     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocume     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:6     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFr     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)     at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)     at org.apache.catalina.startup.Catalina.load(Catalina.java:510)     at org.apache.catalina.startup.Catalina.start(Catalina.java:568)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.ClassNotFoundException: de.javakaffee.web.msm.MemcachedBackupSessionManager     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)     at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)     at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)     at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1356)     ... 20 more Jun 24, 2011 2:47:13 PM org.apache.catalina.startup.Catalina start SEVERE: Cannot start server. Server instance is not configured.     这个问题怎么解决 ?要导入哪些包? 我现在导入了 memcached-session-manager-1.4.0.jar memcached-2.5.jar kryo-1.03.jar minlog-1.2.jar reflectasm-0.9.jar asm-3.2.jar kryo-serializers-0.8.jar msm-kryo-serializer-1.4.0.jar javolution-5.4.3.1.jar msm-javolution-serializer-1.4.0.jar xstream-1.3.1.jar xpp3_min-1.1.3.4.O.jar msm-xstream-serializer-1.4.0.jar 都放到了 tomcat lib中 ######问题解决了吗?######cookie 可保存少量信息,如果有更多的信息可用memcached集中保存。 这样可以屏蔽调session管理
    2020-06-02 17:23:48
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
《基于 Service Worker 实现在线代理》 立即下载
Data as a Service - 数据即服务 -- MongoDB⾼级应⽤模式 立即下载
MongoShake -- Multi Active-Active and Cross-Region Disaster Recoverable MongoDB Service 立即下载