Infinispan 7.1.1中的clustered.xml无法识别** consistent-hash-factory **属性

时间:2015-07-01 09:22:32

标签: infinispan

我有一个infinispan集群在分布式模式下运行3个节点, numOwners = 2 。但启动时服务器无法识别一致哈希工厂属性。这是我的 clustered.xml

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:2.1">
<extensions>
    <extension module="org.infinispan.server.endpoint"/>
    <extension module="org.jboss.as.clustering.infinispan"/>
    <extension module="org.jboss.as.clustering.jgroups"/>
    <extension module="org.jboss.as.connector"/>
    <extension module="org.jboss.as.deployment-scanner"/>
    <extension module="org.jboss.as.jdr"/>
    <extension module="org.jboss.as.jmx"/>
    <extension module="org.jboss.as.logging"/>
    <extension module="org.jboss.as.modcluster"/>
    <extension module="org.jboss.as.naming"/>
    <extension module="org.jboss.as.remoting"/>
    <extension module="org.jboss.as.security"/>
    <extension module="org.jboss.as.threads"/>
    <extension module="org.jboss.as.transactions"/>
    <extension module="org.wildfly.extension.io"/>
    <extension module="org.wildfly.extension.undertow"/>
</extensions>


<management>
    <security-realms>
        <security-realm name="ManagementRealm">
            <authentication>
                <local default-user="$local" skip-group-loading="true"/>
                <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
            </authentication>
            <authorization map-groups-to-roles="false">
                <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
            </authorization>
        </security-realm>
        <security-realm name="ApplicationRealm">
            <authentication>
                <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
                <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
            </authentication>
            <authorization>
                <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
            </authorization>
        </security-realm>
    </security-realms>
    <audit-log>
        <formatters>
            <json-formatter name="json-formatter"/>
        </formatters>
        <handlers>
            <file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
        </handlers>
        <logger log-boot="true" log-read-only="false" enabled="false">
            <handlers>
                <handler name="file"/>
            </handlers>
        </logger>
    </audit-log>
    <management-interfaces>
        <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true">
            <socket-binding http="management-http"/>
        </http-interface>
    </management-interfaces>
    <access-control provider="simple">
        <role-mapping>
            <role name="SuperUser">
                <include>
                    <user name="$local"/>
                </include>
            </role>
        </role-mapping>
    </access-control>
</management>

<profile>
    <subsystem xmlns="urn:jboss:domain:logging:2.0">
        <console-handler name="CONSOLE">
            <level name="DEBUG"/>
            <formatter>
                <named-formatter name="COLOR-PATTERN"/>
            </formatter>
        </console-handler>
        <periodic-rotating-file-handler name="FILE" autoflush="true">
            <formatter>
                <named-formatter name="PATTERN"/>
            </formatter>
            <file relative-to="jboss.server.log.dir" path="server.log"/>
            <suffix value=".yyyy-MM-dd"/>
            <append value="true"/>
        </periodic-rotating-file-handler>
        <logger category="com.arjuna">
            <level name="WARN"/>
        </logger>
        <logger category="org.apache.tomcat.util.modeler">
            <level name="WARN"/>
        </logger>
        <logger category="org.jboss.as.config">
            <level name="DEBUG"/>
        </logger>
        <logger category="sun.rmi">
            <level name="WARN"/>
        </logger>
        <logger category="jacorb">
            <level name="WARN"/>
        </logger>
        <logger category="jacorb.config">
            <level name="ERROR"/>
        </logger>
        <root-logger>
            <level name="DEBUG"/>
            <handlers>
                <handler name="CONSOLE"/>
                <handler name="FILE"/>
            </handlers>
        </root-logger>
        <formatter name="PATTERN">
            <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
        </formatter>
        <formatter name="COLOR-PATTERN">
            <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
        </formatter>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
    </subsystem>
    <subsystem xmlns="urn:infinispan:server:endpoint:7.0">
        <hotrod-connector cache-container="clustered" socket-binding="hotrod">
            <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000"/>
        </hotrod-connector>
        <memcached-connector cache-container="clustered" socket-binding="memcached"/>
        <rest-connector cache-container="clustered" auth-method="BASIC" security-domain="other" virtual-server="default-host"/>
        <websocket-connector cache-container="clustered" socket-binding="websocket"/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:datasources:2.0">
        <datasources/>
    </subsystem>
    <subsystem xmlns="urn:infinispan:server:core:7.1">
        <cache-container name="clustered" default-cache="default" statistics="true">
            <transport executor="infinispan-transport" lock-timeout="60000"/>
            <distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
                <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
                <transaction mode="NONE"/>
            </distributed-cache>
            <distributed-cache name="memcachedCache" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER" consistent-hash-factory="org.infinispan.distribution.ch.TopologyAwareConsistentHashFactory">
                <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
                <transaction mode="NONE"/>
            </distributed-cache>
            <distributed-cache name="namedCache" mode="SYNC" start="EAGER"/>
            <distributed-cache name="transactionalCache" mode="SYNC" start="EAGER">
                <transaction mode="NON_XA" locking="PESSIMISTIC"/>
            </distributed-cache>
        </cache-container>
        <cache-container name="security"/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:io:1.1">
        <worker name="default"/>
        <buffer-pool name="default"/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:jca:2.0">
        <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
        <bean-validation enabled="true"/>
        <default-workmanager>
            <short-running-threads>
                <core-threads count="50"/>
                <queue-length count="50"/>
                <max-threads count="50"/>
                <keepalive-time time="10" unit="seconds"/>
            </short-running-threads>
            <long-running-threads>
                <core-threads count="50"/>
                <queue-length count="50"/>
                <max-threads count="50"/>
                <keepalive-time time="10" unit="seconds"/>
            </long-running-threads>
        </default-workmanager>
        <cached-connection-manager/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
    <subsystem xmlns="urn:infinispan:server:jgroups:7.0" default-stack="${jboss.default.jgroups.stack:udp}">
        <stack name="udp">
            <transport type="UDP" socket-binding="jgroups-udp"/>
            <protocol type="PING"/>
            <protocol type="MERGE3"/>
            <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
            <protocol type="FD_ALL"/>
            <protocol type="VERIFY_SUSPECT"/>
            <protocol type="pbcast.NAKACK2"/>
            <protocol type="UNICAST3"/>
            <protocol type="pbcast.STABLE"/>
            <protocol type="pbcast.GMS"/>
            <protocol type="UFC"/>
            <protocol type="MFC"/>
            <protocol type="FRAG2"/>
        </stack>
        <stack name="tcp">
            <transport type="TCP" socket-binding="jgroups-tcp"/>
            <protocol type="TCPPING">
                <property name="initial_hosts">
                    192.168.196.132[7800],192.168.196.133[7802],192.168.196.134[7800]
                </property>
            </protocol>
            <protocol type="MERGE3"/>
            <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
            <protocol type="FD_ALL"/>
            <protocol type="VERIFY_SUSPECT"/>
            <protocol type="pbcast.NAKACK2">
                <property name="use_mcast_xmit">
                    false
                </property>
            </protocol>
            <protocol type="UNICAST3"/>
            <protocol type="pbcast.STABLE"/>
            <protocol type="pbcast.GMS"/>
            <protocol type="MFC"/>
            <protocol type="FRAG2"/>
            <protocol type="RSVP"/>
        </stack>
        <stack name="s3">
            <transport type="TCP" socket-binding="jgroups-tcp"/>
            <protocol type="S3_PING">
                <property name="location">
                    ${jgroups.s3.bucket:}
                </property>
                <property name="access_key">
                    ${jgroups.s3.access_key:}
                </property>
                <property name="secret_access_key">
                    ${jgroups.s3.secret_access_key:}
                </property>
                <property name="pre_signed_delete_url">
                    ${jgroups.s3.pre_signed_delete_url:}
                </property>
                <property name="pre_signed_put_url">
                    ${jgroups.s3.pre_signed_put_url:}
                </property>
                <property name="prefix">
                    ${jgroups.s3.prefix:}
                </property>
            </protocol>
            <protocol type="MERGE3"/>
            <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
            <protocol type="FD_ALL"/>
            <protocol type="VERIFY_SUSPECT"/>
            <protocol type="pbcast.NAKACK2">
                <property name="use_mcast_xmit">
                    false
                </property>
            </protocol>
            <protocol type="UNICAST3"/>
            <protocol type="pbcast.STABLE"/>
            <protocol type="pbcast.GMS"/>
            <protocol type="MFC"/>
            <protocol type="FRAG2"/>
        </stack>
        <stack name="google">
            <transport type="TCP" socket-binding="jgroups-tcp"/>
            <protocol type="GOOGLE_PING">
                <property name="location">
                    ${jgroups.google.bucket:}
                </property>
                <property name="access_key">
                    ${jgroups.google.access_key:}
                </property>
                <property name="secret_access_key">
                    ${jgroups.google.secret_access_key:}
                </property>
            </protocol>
            <protocol type="MERGE3"/>
            <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
            <protocol type="FD_ALL"/>
            <protocol type="VERIFY_SUSPECT"/>
            <protocol type="pbcast.NAKACK2">
                <property name="use_mcast_xmit">
                    false
                </property>
            </protocol>
            <protocol type="UNICAST3"/>
            <protocol type="pbcast.STABLE"/>
            <protocol type="pbcast.GMS"/>
            <protocol type="MFC"/>
            <protocol type="FRAG2"/>
        </stack>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:jmx:1.3">
        <expose-resolved-model/>
        <expose-expression-model/>
        <remoting-connector/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:modcluster:1.2">
        <mod-cluster-config advertise-socket="modcluster" connector="ajp">
            <dynamic-load-provider>
                <load-metric type="cpu"/>
            </dynamic-load-provider>
        </mod-cluster-config>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:naming:2.0">
        <remote-naming/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:remoting:2.0">
        <endpoint worker="default"/>
        <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:security:1.2">
        <security-domains>
            <security-domain name="other" cache-type="default">
                <authentication>
                    <login-module code="Remoting" flag="optional">
                        <module-option name="password-stacking" value="useFirstPass"/>
                    </login-module>
                    <login-module code="RealmDirect" flag="required">
                        <module-option name="password-stacking" value="useFirstPass"/>
                    </login-module>
                </authentication>
            </security-domain>
            <security-domain name="jboss-web-policy" cache-type="default">
                <authorization>
                    <policy-module code="Delegating" flag="required"/>
                </authorization>
            </security-domain>
        </security-domains>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:threads:1.1">
        <thread-factory name="infinispan-factory" group-name="infinispan" thread-name-pattern="%G %f-%t" priority="5"/>
        <unbounded-queue-thread-pool name="infinispan-transport">
            <max-threads count="25"/>
            <keepalive-time time="0" unit="milliseconds"/>
            <thread-factory name="infinispan-factory"/>
        </unbounded-queue-thread-pool>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:transactions:2.0">
        <core-environment>
            <process-id>
                <uuid/>
            </process-id>
        </core-environment>
        <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
    </subsystem>
    <subsystem xmlns="urn:jboss:domain:undertow:1.1">
        <buffer-cache name="default"/>
        <server name="default-server">
            <http-listener name="default" socket-binding="http"/>
            <host name="default-host" alias="localhost">
                <filter-ref name="server-header"/>
                <filter-ref name="x-powered-by-header"/>
            </host>
        </server>
        <servlet-container name="default"/>
        <filters>
            <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
            <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
        </filters>
    </subsystem>
</profile>

<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:192.168.196.132}"/>
    </interface>
    <interface name="public">
        <inet-address value="${jboss.bind.address:192.168.196.132}"/>
    </interface>
</interfaces>

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
    <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
    <socket-binding name="hotrod" port="11222"/>
    <socket-binding name="http" port="${jboss.http.port:8082}"/>
    <socket-binding name="https" port="${jboss.https.port:8443}"/>
    <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45700"/>
    <socket-binding name="jgroups-tcp" port="7800"/>
    <socket-binding name="jgroups-tcp-fd" port="57600"/>
    <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45688"/>
    <socket-binding name="jgroups-udp-fd" port="54200"/>
    <socket-binding name="memcached" port="11211"/>
    <socket-binding name="modcluster" port="0" multicast-address="224.0.1.115" multicast-port="23364"/>
    <socket-binding name="txn-recovery-environment" port="4712"/>
    <socket-binding name="txn-status-manager" port="4713"/>
    <socket-binding name="websocket" port="8181"/>
</socket-binding-group>

,日志如下:

14:42:40,138 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112) [wildfly-controller-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.server.ServerService.boot(ServerService.java:331) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256) [wildfly-controller-8.1.0.Final.jar:8.1.0.Final]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[144,17]
Message: JBAS014788: Unexpected attribute 'consistent-hash-factory' encountered
at org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:104) [wildfly-controller-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_7_1.parseCacheAttribute(InfinispanSubsystemXMLReader_7_1.java:361)
at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_7_1.parseClusteredCacheAttribute(InfinispanSubsystemXMLReader_7_1.java:390)
at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_7_1.parseDistributedCache(InfinispanSubsystemXMLReader_7_1.java:458)
at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_7_1.parseContainer(InfinispanSubsystemXMLReader_7_1.java:158)
at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_7_1.readElement(InfinispanSubsystemXMLReader_7_1.java:54)
at org.jboss.as.clustering.infinispan.subsystem.InfinispanSubsystemXMLReader_7_1.readElement(InfinispanSubsystemXMLReader_7_1.java:34)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:1131) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:458) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:145) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:104) [wildfly-controller-8.1.0.Final.jar:8.1.0.Final]
... 3 more

14:42:40,140 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

1 个答案:

答案 0 :(得分:3)

您正在查看嵌入式(库)模式(urn:infinispan:config:7.1)的架构,而Infinispan服务器接受带有urn:infinispan:server:core:7.1的架构(无法找到它的发布位置,here is the source location )。这两个模式应该非常接近但不相等。 如果您认为服务器也应支持此属性,请在JIRA中提交功能请求。