memcached-session-manager 如何配置

发布于 2021-11-03 21:48:14 字数 221 浏览 739 评论 6

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

秋意浓 2021-11-10 18:40:29

cookie 可保存少量信息,如果有更多的信息可用memcached集中保存。 这样可以屏蔽调session管理

等风来 2021-11-10 18:33:07

问题解决了吗?

情绪失控 2021-11-10 18:26:55

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中

秋意浓 2021-11-10 17:53:09

引用来自“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>

终遇你 2021-11-09 23:47:17

你可以类似这样的配置

我现在也是两个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>

别低头,皇冠会掉 2021-11-08 04:57:35

弄了好几天了,实在没有好办法才来的啊

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文