Wildfly 8和独立应用程序

时间:2015-09-18 13:26:44

标签: java wildfly-8 infinispan

我尝试在Wildfly 8.0.2和独立JAR应用程序之间创建集群。两者都使用与嵌入式模式相同的Infinispan版本(6.0.2)。缓存配置为分布式模式。但是在启动Wildfly然后启动Standalone Application时,会抛出以下错误,

Stanalone Infinispan日志:



2015-09-18 17:43:47,675 INFO  [JGroupsTransport] (Proxy) ISPN000094: Received new cluster view: [BillingServerLoc1/ActiveCallsCluster|1] (2) [BillingServerLoc1/ActiveCallsCluster, localhost-15773]
2015-09-18 17:43:47,676 INFO  [JGroupsTransport] (Proxy) ISPN000079: Cache local address is localhost-15773, physical addresses are [131.10.20.207:7700]
2015-09-18 17:43:47,762 INFO  [CacheJmxRegistration] (Proxy) ISPN000031: MBeans were successfully registered to the platform MBean server.
2015-09-18 17:43:47,824 WARN  [CommandAwareRpcDispatcher] (INT-2,ActiveCallsCluster,localhost-15773) ISPN000220: Problems un-marshalling remote command from byte buffer
java.io.StreamCorruptedException: Unexpected lead byte 62
        at org.jboss.marshalling.river.BlockUnmarshaller.badLeadByte(BlockUnmarshaller.java:127)
        at org.jboss.marshalling.river.BlockUnmarshaller.readBlockHeader(BlockUnmarshaller.java:96)
        at org.jboss.marshalling.river.BlockUnmarshaller.readUnsignedByte(BlockUnmarshaller.java:258)
        at org.jboss.marshalling.river.BlockUnmarshaller.readInt(BlockUnmarshaller.java:296)
        at org.infinispan.commons.util.ImmutableListCopy.readExternal(ImmutableListCopy.java:222)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1292)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
        at org.infinispan.marshall.exts.ArrayExternalizers$ListArray.readObject(ArrayExternalizers.java:36)
        at org.infinispan.marshall.exts.ArrayExternalizers$ListArray.readObject(ArrayExternalizers.java:22)
        at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:389)
        at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:205)
        at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:152)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
        at org.infinispan.distribution.ch.DefaultConsistentHash$Externalizer.readObject(DefaultConsistentHash.java:306)
        at org.infinispan.distribution.ch.DefaultConsistentHash$Externalizer.readObject(DefaultConsistentHash.java:286)
        at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:389)
        at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:205)
        at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:152)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
        at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readParameters(ReplicableCommandExternalizer.java:100)
        at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readObject(ReplicableCommandExternalizer.java:83)
        at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readObject(ReplicableCommandExternalizer.java:30)
        at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:389)
        at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:205)
        at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:152)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
        at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:136)
        at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:101)
        at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80)
        at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:28)
        at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:206)
        at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460)
        at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377)
        at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:247)
        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:665)
        at org.jgroups.JChannel.up(JChannel.java:708)
        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1015)
        at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:178)
        at org.jgroups.protocols.FRAG2.up(FRAG2.java:165)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:381)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:370)
        at org.jgroups.protocols.pbcast.GMS.up(GMS.java:1010)
        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
        at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:694)
        at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:381)
        at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:636)
        at org.jgroups.protocols.BARRIER.up(BARRIER.java:103)
        at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)
        at org.jgroups.protocols.FD_ALL.up(FD_ALL.java:184)
        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:301)
        at org.jgroups.protocols.MERGE2.up(MERGE2.java:209)
        at org.jgroups.protocols.Discovery.up(Discovery.java:379)
        at org.jgroups.protocols.TP.passMessageUp(TP.java:1399)
        at org.jgroups.protocols.TP$MyHandler.run(TP.java:1585)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: an exception which occurred:
        in object of type org.infinispan.commons.util.ImmutableListCopy




从日志中可以清楚地看出,节点可以互相看到。但我不确定为什么会显示StreamCorruptedException。因为我刚刚启动了应用程序,并没有尝试将任何对象放入缓存中。

请帮助解决问题。

感谢。

Infinispan XML:



<infinispan
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
        xmlns="urn:infinispan:config:6.0">

   <global>
   <transport clusterName="ActiveCallsCluster">
   <properties>
   <property name="configurationFile" value="jgroups-activeCalls.xml"/>
    </properties>
     </transport>
 <asyncTransportExecutor
            factory="org.infinispan.executors.DefaultExecutorFactory">
         <properties>
            <property name="maxThreads" value="25"/>
            <!-- <property name="threadNamePrefix" value="AsyncSerializationThread"/> -->
         </properties>
      </asyncTransportExecutor>
<globalJmxStatistics enabled="false" allowDuplicateDomains="true"/>
   </global>

   <default>
        <locking useLockStriping="false"/>
       <clustering mode="distribution">
        <async/>
      </clustering>
   </default>
<namedCache name="activeCallsCache">
        <compatibility enabled="true"/>
</namedCache>
</infinispan>
&#13;
&#13;
&#13;

0 个答案:

没有答案