# re: 淘宝开源MQ——metamorphosis的github分支 回复 更多评论
2012-05-10 15:48 by
2012-05-10 15:46:21 [ pool-2-thread-1:15156 ] - [ ERROR ] 获取ZKLoadRebalanceListener失败
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.taobao.metamorphosis.client.consumer.ConsumerZooKeeper.getBrokerConnectionListener(ConsumerZooKeeper.java:100)
at com.taobao.metamorphosis.client.consumer.ConsumerZooKeeper.commitOffsets(ConsumerZooKeeper.java:89)
at com.taobao.metamorphosis.client.consumer.SimpleMessageConsumer$1.run(SimpleMessageConsumer.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.taobao.metamorphosis.client.consumer.ConsumerZooKeeper$1.call(ConsumerZooKeeper.java:169)
at com.taobao.metamorphosis.client.consumer.ConsumerZooKeeper$1.call(ConsumerZooKeeper.java:165)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.taobao.metamorphosis.client.consumer.ConsumerZooKeeper.registerConsumer(ConsumerZooKeeper.java:183)
at com.taobao.metamorphosis.client.consumer.SimpleMessageConsumer.completeSubscribe(SimpleMessageConsumer.java:212)
at com.duokoo.Remove.main(Remove.java:42)
# re: 淘宝开源MQ——metamorphosis的github分支[未登录] 回复 更多评论
2012-05-10 15:54 by
@xnang
无背景,无程序,请问你让我怎么帮你看?
# re: 淘宝开源MQ——metamorphosis的github分支 回复 更多评论
2012-05-10 16:02 by
安装你说的步骤搭建了服务,所有的代码都是example里面的,生产端可以正常写入数据,返回类似Send message successfully,sent to -1-0 这样的提示。消费端通过SyncConsumer这个类只能取出部分数据,比如写入5条只能取到部分几条使用AsyncConsumer.java
log4j在debug模式下出现了上面评论的那个异常错误
# re: 淘宝开源MQ——metamorphosis的github分支[未登录] 回复 更多评论
2012-05-10 16:35 by
@xnang
从堆栈来看,明显不是example的代码,你自己写的或者修改的吧。
从错误来看,应该是因为消费者的zk配置问题,请看example代码。
SyncConsumer不是只能取出部分数据,可能是因为你没有递增offset,或者服务端延迟force的问题。
# re: 淘宝开源MQ——metamorphosis的github分支[未登录] 回复 更多评论
2012-05-10 17:26 by
@xnang
killme2008@gmail.com,可以的话gtalk
# re: 淘宝开源MQ——metamorphosis的github分支 回复 更多评论
2012-05-10 17:58 by
感谢博主的指导,调试通过了。博主真的不错,很耐心。再次感谢
# re: 淘宝开源MQ——metamorphosis的github分支 回复 更多评论
2012-10-26 11:20 by
准备启动服务器,配置为:MetaConfig [brokerId=0, dataPath=d:metamorphosisdatafile
, deletePolicy=delete,168, diamondZKDataId=metamorphosis.zkConfig, diamondZKGrou
p=DEFAULT_GROUP, getProcessThreadCount=80, hostName=null, maxSegmentSize=1073741
824, maxTransferSize=1048576, numPartitions=10, putProcessThreadCount=80, server
Port=8123, slaveGroup=meta-slave-group, slaveId=-1, statTopicSet=[mytopic], topi
cDeletePolicy=, topics=[mytopic], unflushInterval=10000, unflushThreshold=1000,
zkConfig=com.taobao.metamorphosis.utils.ZkUtils$ZKConfig@1630ab9]
Exception in thread "main" com.taobao.metamorphosis.server.exception.Metamorphos
isServerStartupException: Register broker to zk failed
at com.taobao.metamorphosis.server.assembly.MetaMorphosisBroker.start(Me
taMorphosisBroker.java:206)
at com.taobao.metamorphosis.EnhancedBroker.start(EnhancedBroker.java:46)
at com.taobao.metamorphosis.ServerStartup.main(ServerStartup.java:47)
Caused by: org.I0Itec.zkclient.exception.ZkNodeExistsException: org.apache.zooke
eper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /meta
/brokers/ids/0/master
at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:55)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:685)
at org.I0Itec.zkclient.ZkClient.create(ZkClient.java:304)
at org.I0Itec.zkclient.ZkClient.createEphemeral(ZkClient.java:328)
at com.taobao.metamorphosis.utils.ZkUtils.createEphemeralPath(ZkUtils.ja
va:82)
at com.taobao.metamorphosis.server.BrokerZooKeeper.registerBrokerInZk(Br
okerZooKeeper.java:188)
at com.taobao.metamorphosis.server.assembly.MetaMorphosisBroker.start(Me
taMorphosisBroker.java:201)
... 2 more
Caused by: org.apache.zookeeper.KeeperException$NodeExistsException: KeeperError
Code = NodeExists for /meta/brokers/ids/0/master
at org.apache.zookeeper.KeeperException.create(KeeperException.java:110)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:42)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:637)
at org.I0Itec.zkclient.ZkConnection.create(ZkConnection.java:87)
at org.I0Itec.zkclient.ZkClient$1.call(ZkClient.java:308)
at org.I0Itec.zkclient.ZkClient$1.call(ZkClient.java:304)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:675)
... 7 more
菜鸟一个求指导,是不是哪里配置不对了