You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@rocketmq.apache.org by 鳞波微步 <37...@qq.com> on 2018/06/15 07:28:39 UTC

回复: Quick Start: No route info of this topic, TopicTest

I already set the NAMESRV_ADDR.






------------------ 原始邮件 ------------------
发件人: "Jason Joo"<hb...@163.com>;
发送时间: 2018年6月15日(星期五) 下午3:20
收件人: "users"<us...@rocketmq.apache.org>;

主题: Re: Quick Start: No route info of this topic, TopicTest



maybe you forgot to set the ENV:

export NAMESRV_ADDR=172.24.150.158:9876

 
best regards,


Jason
 
 
On Jun 15, 2018, at 15:15, 鳞波微步 <37...@qq.com> wrote:

Hi,


I follow http://rocketmq.apache.org/docs/quick-start/ to setup RocketMQ and test message sending.


Environment:


# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)
# java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)



RocketMQ Version: 4.2.0


1. Create Topic
# bin/mqadmin updateTopic -b localhost:10911 -c DefaultCluster -n 172.24.150.158:9876 -t TopicTest 


# bin/mqadmin topicRoute -t TopicTest -n 172.24.150.158:9876
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
{
	"brokerDatas":[
		{
			"brokerAddrs":{0:"172.24.150.159:10911"
			},
			"brokerName":"i-B6712B6C",
			"cluster":"DefaultCluster"
		}
	],
	"filterServerTable":{},
	"queueDatas":[
		{
			"brokerName":"i-B6712B6C",
			"perm":6,
			"readQueueNums":8,
			"topicSynFlag":0,
			"writeQueueNums":8
		}
	]
}



2. try send message, told no route info


# sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
15:14:34.726 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
15:14:34.733 [main] DEBUG i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 4
15:14:34.745 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
15:14:34.746 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
15:14:34.747 [main] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
15:14:34.747 [main] DEBUG i.n.util.internal.PlatformDependent0 - direct buffer constructor: available
15:14:34.748 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
15:14:34.748 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
15:14:34.749 [main] DEBUG io.netty.util.internal.Cleaner0 - java.nio.ByteBuffer.cleaner(): available
15:14:34.749 [main] DEBUG i.n.util.internal.PlatformDependent - Java version: 8
15:14:34.750 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
15:14:34.750 [main] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
15:14:34.750 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
15:14:34.837 [main] DEBUG i.n.util.internal.PlatformDependent - Javassist: available
15:14:34.837 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: /tmp (java.io.tmpdir)
15:14:34.838 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
15:14:34.838 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
15:14:34.838 [main] DEBUG i.n.util.internal.PlatformDependent - io.netty.maxDirectMemory: 1040187392 bytes
15:14:34.849 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
15:14:34.850 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
15:14:34.853 [main] DEBUG i.n.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
org.apache.rocketmq.client.exception.MQClientException: No route info of this topic, TopicTest
See http://rocketmq.apache.org/docs/faq/ for further details.
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:564)
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1069)
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1023)
	at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:214)
	at org.apache.rocketmq.example.quickstart.Producer.main(Producer.java:67)
org.apache.rocketmq.client.exception.MQClientException: No route info of this topic, TopicTest
See http://rocketmq.apache.org/docs/faq/ for further details.
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:564)
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1069)
	at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1023)
	at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:214)
	at org.apache.rocketmq.example.quickstart.Producer.main(Producer.java:67)

回复: Quick Start: No route info of this topic, TopicTest

Posted by 鳞波微步 <37...@qq.com>.
I made mistake, when set namesrv env, use only ip, forgot port.








------------------ 原始邮件 ------------------
发件人: "我自己的邮箱"<37...@qq.com>;
发送时间: 2018年6月19日(星期二) 上午8:22
收件人: "users"<us...@rocketmq.apache.org>;

主题: 回复: Quick Start: No route info of this topic, TopicTest



I will summary the issue. can anyone do me a favour ?


1. Auto create topic is enabled by default, not sure why topic is not create automaticly when send message.
2. Create topic manually, told no route info. But check topic route info is correct?
3. client log looks code throws exception.


2018-06-19 08:12:53 INFO MQClientFactoryScheduledThread - new name server is chosen. OLD: 172.24.150.158 , NEW: 172.24.150.158. namesrvIndex = 68
2018-06-19 08:12:53 ERROR MQClientFactoryScheduledThread - createChannel: create channel exception
java.lang.ArrayIndexOutOfBoundsException: 1
        at org.apache.rocketmq.remoting.common.RemotingHelper.string2SocketAddress(RemotingHelper.java:57) ~[rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.createChannel(NettyRemotingClient.java:478) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateNameserverChannel(NettyRemotingClient.java:433) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateChannel(NettyRemotingClient.java:394) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:363) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1207) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1197) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:605) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:492) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:361) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance$3.run(MQClientInstance.java:278) [rocketmq-client-4.2.0.jar:4.2.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_65]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_65]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_65]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_65]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]







------------------ 原始邮件 ------------------
发件人: "我自己的邮箱"<37...@qq.com>;
发送时间: 2018年6月19日(星期二) 上午8:02
收件人: "萨尔卡"<10...@rocketmq.apache.org>;

主题: 回复: Quick Start: No route info of this topic, TopicTest



Thanks.


1. auto create topic already true by default, but not sure why ask create topic manually.
2. I already create topic before send message.


------------------ 原始邮件 ------------------
发件人: "萨尔卡"<10...@qq.com>;
发送时间: 2018年6月15日(星期五) 晚上6:07
收件人: "users"<us...@rocketmq.apache.org>;
抄送: "鳞波微步"<37...@qq.com>; 
主题: 回复: Quick Start: No route info of this topic, TopicTest



try those
1. set auto create topic when start broker
or
2. create topic first, then try send messages 


------------------
Have a nice dayFrancis Lee


QQ : 1026203200

回复: Quick Start: No route info of this topic, TopicTest

Posted by 鳞波微步 <37...@qq.com>.
I will summary the issue. can anyone do me a favour ?


1. Auto create topic is enabled by default, not sure why topic is not create automaticly when send message.
2. Create topic manually, told no route info. But check topic route info is correct?
3. client log looks code throws exception.


2018-06-19 08:12:53 INFO MQClientFactoryScheduledThread - new name server is chosen. OLD: 172.24.150.158 , NEW: 172.24.150.158. namesrvIndex = 68
2018-06-19 08:12:53 ERROR MQClientFactoryScheduledThread - createChannel: create channel exception
java.lang.ArrayIndexOutOfBoundsException: 1
        at org.apache.rocketmq.remoting.common.RemotingHelper.string2SocketAddress(RemotingHelper.java:57) ~[rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.createChannel(NettyRemotingClient.java:478) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateNameserverChannel(NettyRemotingClient.java:433) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.getAndCreateChannel(NettyRemotingClient.java:394) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:363) [rocketmq-remoting-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1207) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1197) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:605) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:492) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:361) [rocketmq-client-4.2.0.jar:4.2.0]
        at org.apache.rocketmq.client.impl.factory.MQClientInstance$3.run(MQClientInstance.java:278) [rocketmq-client-4.2.0.jar:4.2.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_65]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_65]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_65]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_65]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]







------------------ 原始邮件 ------------------
发件人: "我自己的邮箱"<37...@qq.com>;
发送时间: 2018年6月19日(星期二) 上午8:02
收件人: "萨尔卡"<10...@rocketmq.apache.org>;

主题: 回复: Quick Start: No route info of this topic, TopicTest



Thanks.


1. auto create topic already true by default, but not sure why ask create topic manually.
2. I already create topic before send message.


------------------ 原始邮件 ------------------
发件人: "萨尔卡"<10...@qq.com>;
发送时间: 2018年6月15日(星期五) 晚上6:07
收件人: "users"<us...@rocketmq.apache.org>;
抄送: "鳞波微步"<37...@qq.com>; 
主题: 回复: Quick Start: No route info of this topic, TopicTest



try those
1. set auto create topic when start broker
or
2. create topic first, then try send messages 


------------------
Have a nice dayFrancis Lee


QQ : 1026203200

回复: Quick Start: No route info of this topic, TopicTest

Posted by 鳞波微步 <37...@qq.com>.
Thanks.


1. auto create topic already true by default, but not sure why ask create topic manually.
2. I already create topic before send message.


------------------ 原始邮件 ------------------
发件人: "萨尔卡"<10...@qq.com>;
发送时间: 2018年6月15日(星期五) 晚上6:07
收件人: "users"<us...@rocketmq.apache.org>;
抄送: "鳞波微步"<37...@qq.com>; 
主题: 回复: Quick Start: No route info of this topic, TopicTest



try those
1. set auto create topic when start broker
or
2. create topic first, then try send messages 


------------------
Have a nice dayFrancis Lee


QQ : 1026203200

回复: Quick Start: No route info of this topic, TopicTest

Posted by 萨尔卡 <10...@qq.com>.
try those
1. set auto create topic when start broker
or
2. create topic first, then try send messages 


------------------
Have a nice dayFrancis Lee


QQ : 1026203200