开发者社区> 问答> 正文

在tomcat服务器上部署阿里云短信模块时在服务器启动不成功

在eclipse中运行阿里云sms短信服务时,发送与接收信息运行正常,打包后部署到tomcat服务器上后,启动tomcat服务器后,服务器报如下错误,一直运行不起来,不知道啥原因。
08:43:38.175 [PullMessageTask-thread] ERROR c.a.m.t.DefaultAlicomMessagePuller - PullMessageTask_execute_error,messageType:SmsUp,queueName:Alicom-Queue-XXXXXXXXXXXXXX-SmsUp
com.aliyuncs.exceptions.ClientException: SDK.ServerUnreachable : Server unreachable: java.net.UnknownHostException: dybaseapi.aliyuncs.com

at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:207) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:152) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:60) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.aliyuncs.DefaultAcsClient.getAcsResponse(DefaultAcsClient.java:104) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.alicom.mns.tools.TokenGetterForAlicom.getTokenFromRemote(TokenGetterForAlicom.java:63) ~[receive-2017.8.jar:na]
at com.alicom.mns.tools.TokenGetterForAlicom.getTokenByMessageType(TokenGetterForAlicom.java:92) ~[receive-2017.8.jar:na]
at com.alicom.mns.tools.DefaultAlicomMessagePuller$PullMessageTask.run(DefaultAlicomMessagePuller.java:31) ~[receive-2017.8.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]

08:43:38.175 [PullMessageTask-thread] ERROR c.a.m.t.DefaultAlicomMessagePuller - PullMessageTask_execute_error,messageType:SmsReport,queueName:Alicom-Queue-XXXXXXXXXXXXXX-SmsReport
com.aliyuncs.exceptions.ClientException: SDK.ServerUnreachable : Server unreachable: java.net.UnknownHostException: dybaseapi.aliyuncs.com

at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:207) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:152) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:60) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.aliyuncs.DefaultAcsClient.getAcsResponse(DefaultAcsClient.java:104) ~[aliyun-java-sdk-core-3.2.2.jar:na]
at com.alicom.mns.tools.TokenGetterForAlicom.getTokenFromRemote(TokenGetterForAlicom.java:63) ~[receive-2017.8.jar:na]
at com.alicom.mns.tools.TokenGetterForAlicom.getTokenByMessageType(TokenGetterForAlicom.java:92) ~[receive-2017.8.jar:na]
at com.alicom.mns.tools.DefaultAlicomMessagePuller$PullMessageTask.run(DefaultAlicomMessagePuller.java:31) ~[receive-2017.8.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]

展开
收起
游客afv2w2vxtgxwi 2019-05-16 18:42:03 8315 0
1 条回答
写回答
取消 提交回答
  • 一.先确定在服务器可否正常打开

    命令行 wget http://localhost:8080检查   或浏览器 http://localhost:8080检查

    二.如果上面没问题进入阿里云控制台:

    步骤:

    1.登陆阿里云 
    2.进入安全组

    “控制台” -> “云服务器 ECS” -> 选择云服务器 -> “更多” -> “安全组配置”

    3.配置规则

    “配置规则” -> “添加安全组规则”

    4.配置8080端口 

    image
    image
    image

    2019-07-17 23:35:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
ECS全知道(下) 镜像与快照+块存储、安全、网运维与监控 立即下载
ECS全知道(上) 实例+计费 立即下载
云服务器可观测能力的探索与实践 立即下载