Code Monkey home page Code Monkey logo

Comments (6)

nnhy avatar nnhy commented on July 18, 2024

连接超时,连不上

from newlife.rocketmq.

shiayoung avatar shiayoung commented on July 18, 2024

连接超时,连不上

请问连不上有超时时间可以设置吗?或者可以有一个可能传递 Cancelled 信息的参数,连不上会一直占用线程池的资源。

from newlife.rocketmq.

nnhy avatar nnhy commented on July 18, 2024

这个超时,是客户端连接不上名称服务器,一般不需要配置超时时间,如果服务端启动并且地址正确没有防火墙,一般很短时间内返回。如果超时了,哪怕1秒超时,都可能是服务端没对或者网络问题。
所以,查一查能否telnet你的服务端地址

from newlife.rocketmq.

shiayoung avatar shiayoung commented on July 18, 2024

这个超时,是客户端连接不上名称服务器,一般不需要配置超时时间,如果服务端启动并且地址正确没有防火墙,一般很短时间内返回。如果超时了,哪怕1秒超时,都可能是服务端没对或者网络问题。 所以,查一查能否telnet你的服务端地址

地址没问题,是对应的 Topic 没有创建也会导致。没法控制用户 Topic 填啥,所以如果没法快速失败,确实有可能会影响到其它任务。

16:17:46.953 81 N T System.AggregateException: One or more errors occurred. ([Name]集群所有地址连接失败!)
 ---> NewLife.XException: [Name]集群所有地址连接失败!
   at NewLife.RocketMQ.ClusterClient.EnsureCreate()
   at NewLife.RocketMQ.ClusterClient.SendAsync(Command cmd)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at NewLife.RocketMQ.ClusterClient.Invoke(RequestCode request, Object body, Object extFields, Boolean ignoreError)
   at NewLife.RocketMQ.NameClient.GetRouteInfo(String topic)
   at NewLife.RocketMQ.NameClient.DoWork(Object state)
   at NewLife.Threading.TimerScheduler.Execute(Object state)
16:17:46.953 81 N T 任务 [6]NameClient.DoWork (30000ms) 耗时过长 192,511ms,建议使用异步任务Async=true

from newlife.rocketmq.

nnhy avatar nnhy commented on July 18, 2024

如果对应的Topic不存在,则需要使用默认Topic连上去,然后创建新的Topic

from newlife.rocketmq.

nnhy avatar nnhy commented on July 18, 2024

阿里云目前需要在Topic前面带上实例ID并用【%】连接,组成路由Topic[用来路由到实例Topic]。 fix #24 fix#35 … · 33e58a6
33e58a6

from newlife.rocketmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.