开发者社区> 问答> 正文

短信上行服务官方demo 报错

下载了官方的短信上行的demo。可以正常运行使用,但是在线程中会一直报错。报错内容:

2020-06-30 14:56:05  [ PullMessageTask-thread-0:890407 ] - [ ERROR ] com.alicom.mns.tools.DefaultAlicomMessagePuller$PullMessageTask.run(DefaultAlicomMessagePuller.java:150) PullMessageTask_execute_error,messageType:SmsUp,queueName:Alicom-Queue-1*******-SmsUp
[Error Code]:InternalServerError, [Message]:<?xml version="1.0" ?>
<Error xmlns="http://mns.aliyuncs.com/doc/v1">
  <Code>MessageNotExist</Code>
  <Message>Message not exist.</Message>
  <RequestId>***</RequestId>
  <HostId>http://***.mns.cn-hangzhou.aliyuncs.com</HostId>
</Error>, [RequestId]: null
	at com.aliyun.mns.common.http.ExceptionResultParser.parse(ExceptionResultParser.java:46)
	at com.aliyun.mns.common.http.ExceptionResultParser.parse(ExceptionResultParser.java:12)
	at com.aliyun.mns.common.http.HttpCallback.handleResult(HttpCallback.java:155)
	at com.aliyun.mns.common.http.HttpCallback.buildResponseMessage(HttpCallback.java:128)
	at com.aliyun.mns.common.http.HttpCallback.completed(HttpCallback.java:88)
	at com.aliyun.mns.common.http.HttpCallback.completed(HttpCallback.java:22)
	at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177)
	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:412)
	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:305)
	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:267)
	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:123)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:164)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:339)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:317)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:590)
	at java.base/java.lang.Thread.run(Thread.java:834)

经过debug追踪。发现问题在:DefaultAlicomMessagePuller.java:150

reqeust:

GET 
/queues/Alicom-Queue-1577115491384977-SmsUp/messages?numOfMessages=16 
HTTP/1.1 
[date: Tue, 30 Jun 2020 07:01:05 GMT,
authorization: *****, 
security-token: *****, 
x-mns-version: 2015-06-06, 
content-type: text/xml;
charset=UTF-8, 
Host: ***.mns.cn-hangzhou.aliyuncs.com,
Connection: Keep-Alive,
 User-Agent: aliyun-sdk-java/1.1.8(Mac OS X/10.15.5/x86_64;11.0.3)]

response:

HTTP/1.1 404 Not Found 
[Server: AliyunMQS, 
Date: Tue, 30 Jun 2020 07:01:35 GMT, 
Content-Type: text/xml;
charset=utf-8,
Content-Length: 271, 
Connection: keep-alive, 
x-mns-version: 2015-06-06, 
x-mns-request-id: *****] 
[Content-Length: 271,Chunked: false]

导致解析错误;这个需要如何解决呢

展开
收起
娘娘蛋hehe 2020-06-30 15:07:04 4713 0
1 条回答
写回答
取消 提交回答
  • 建议点击右侧-联系我们-售后人工;

    这种情况帮你在专业问答群问了一下,大家都没遇到过

    2020-07-03 15:48:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载