Skip to content

Http.demo Subscriber is not working in EventMesh-test project #337

@jinrongluo

Description

@jinrongluo

Http.demo Http Subscriber (SubService) is not working. When the Async Http Producer (AsyncPublishInstance) publishes a message to EventMesh runtime, This Subscriber is not able to consume it.

Steps to reproduce this issue in JAVA IDE Intellij:

  1. Import eventmesh project to Intellij and build the project.

  2. Start up EventMesh runtime from eventmesh-starter project's StartUp class

  3. Start up Http Subscriber Test Application, from eventmesh-test project: org.apache.eventmesh.http.demo.sub.SpringBootDemoApplication.java

  4. Start up Http Async Producer Test Application, from eventmesh-test project:
    org.apache.eventmesh.http.demo.AsyncPublishInstance.java

  5. Observe the logs of Http Subscriber, it is not getting the published message from Eventmesh, Expecting log is
    "=======receive message======= {message}"

  6. I saw this error message in the EventMesh runtime. Which indicates the subscriber endpoint (http://10.48.244.96:8088/sub/test) is not available.

2021-05-10 16:44:35,931 DEBUG [ConsumeMessageThread_ConsumerGroup-1234-FT0_1] message(EventMeshConsumer.java:122) - message|mq2eventMesh|topic=FT0-e-80010001-01-1|msg=Message [topic=FT0-e-80010001-01-1, systemProperties={BORN_TIMESTAMP=1620679475869, BORN_HOST=/10.48.244.96:63080, STORE_TIMESTAMP=1620679359743, MESSAGE_ID=0A30F46009EC18B4AAC231F0F89D0000, DESTINATION=FT0-e-80010001-01-1, STORE_HOST=/10.213.96.192:10911}, userProperties={QUEUE_OFFSET=2, UNIQ_KEY=0A30F46009EC18B4AAC231F0F89D0000, MIN_OFFSET=0, TIMEOUT=4000, req_c2eventMesh_timestamp=1620679475711, CLUSTER=DefaultCluster, CONSUME_START_TIME=1620679475916, DESTINATION=FT0-e-80010001-01-1, req_mq2eventMesh_timestamp=1620679475916, msgType=persistent, QUEUE_ID=1, BORN_TIMESTAMP=1620679475869, req_eventMesh2mq_timestamp=1620679475711, RMB_UNIQ_ID=587619427592869279781144310620, STORE_TIME=1620679359743, MAX_OFFSET=3, SEARCH_KEYS=089741186351320383322062214034}, body=18]
2021-05-10 16:44:35,962 DEBUG [eventMesh-http-asyncContext-3] http(SendAsyncMessageProcessor.java:172) - httpCommand={RES,POST/HTTP,requestCode=104,opaque=5,cost=948,header=sendMessageResponseHeader={code=104,eventMeshEnv=PRD,eventMeshRegion=region1,eventMeshIdc=DEFAULT,eventMeshDcn=010,eventMeshCluster=COMMON,eventMeshIp=10.48.244.96},body=sendMessageResponseBody={retCode=0,retMsg=successSendResult[topic=FT0-e-80010001-01-1, messageId=0A30F46009EC18B4AAC231F0F89D0000],resTime=2021-05-10 16:44:35.916}}
2021-05-10 16:44:36,294 INFO  [eventMesh-pushmsg-1] cmd(AsyncHTTPPushRequest.java:146) - cmd=105|eventMesh2client|from=10.48.244.96|to=http://10.48.244.96:8088/sub/test
2021-05-10 16:44:36,310 INFO  [eventMesh-tcp-scheduler-1] appMonitor(EventMeshTcpMonitor.java:143) - {"protocol":"tcp","s":"retryQueueSize","t":"0"}
2021-05-10 16:44:37,312 INFO  [eventMesh-tcp-scheduler-5] appMonitor(EventMeshTcpMonitor.java:143) - {"protocol":"tcp","s":"retryQueueSize","t":"0"}
2021-05-10 16:44:38,312 INFO  [eventMesh-tcp-scheduler-1] appMonitor(EventMeshTcpMonitor.java:143) - {"protocol":"tcp","s":"retryQueueSize","t":"0"}
2021-05-10 16:44:38,455 ERROR [eventMesh-pushmsg-1] message(AsyncHTTPPushRequest.java:210) - push2client err
org.apache.http.conn.HttpHostConnectException: Connect to 10.48.244.96:8088 [/10.48.244.96] failed: Connection refused: connect
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.eventmesh.runtime.core.protocol.http.push.AsyncHTTPPushRequest.tryHTTPRequest(AsyncHTTPPushRequest.java:150) ~[main/:?]
	at org.apache.eventmesh.runtime.core.protocol.http.push.HTTPMessageHandler.lambda$handle$1(HTTPMessageHandler.java:80) ~[main/:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_261]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_261]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_261]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_261]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_261]
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.8.0_261]
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75) ~[?:1.8.0_261]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) ~[?:1.8.0_261]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) ~[?:1.8.0_261]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) ~[?:1.8.0_261]
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) ~[?:1.8.0_261]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) ~[?:1.8.0_261]
	at java.net.Socket.connect(Socket.java:606) ~[?:1.8.0_261]
	at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) ~[httpclient-4.5.2.jar:4.5.2]
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) ~[httpclient-4.5.2.jar:4.5.2]
	... 18 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions