简体   繁体   English

在AWS上发布Microsoft Bot后出现连接错误

[英]Connection Error on Microsoft Bot after publishing it on AWS

I am trying to publish a bot that I coded in C# through visual studio 2015 on to AWS. 我试图将通过Visual Studio 2015用C#编写的机器人发布到AWS上。 I installed the Amazon Cloud SDK and was able to successfully publish the bot to AWS. 我安装了Amazon Cloud SDK,并且能够成功地将该机器人发布到AWS。 I updated the bot endpoint with the address it gave ( http://benbot-dev.us-west-2.elasticbeanstalk.com/ ). 我用它给定的地址( http://benbot-dev.us-west-2.elasticbeanstalk.com/ )更新了bot端点。 But when I go to Microsoft Bots site and test the bot connection it says Unable to connect to the remote server. 但是,当我转到Microsoft Bots网站并测试漫游器连接时,它说无法连接到远程服务器。 Please help. 请帮忙。 I am thinking it is the https endpoint issue. 我认为这是https端点问题。 But I am not sure how to get an API Gateway endpoint, if I should. 但是我不确定如何获取API网关端点。

<<<<<<<<<<
500 InternalServerError
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 52.42.245.162:443
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Intercom.DevPortal.Server.Controllers.BotManagerController.<PingV3BotAsync>d__54.MoveNext() in C:\a\1\s\DevPortalLib\Controllers\BotManagerController.cs:line 1420
>>>>>>>>>>>>>>>>

This exception message tells you that within your server code you are trying to reach server at 52.42.245.162, and this server is inaccessible (more specifically, https port 443 is inaccessible). 此异常消息告诉您,您正在服务器代码中尝试通过52.42.245.162连接到服务器,并且该服务器不可访问(更具体地说,https端口443无法访问)。 This IP resolves to some AWS host (use nslookup command to find this out, see this answer ). 此IP解析为某些AWS主机(使用nslookup命令可以找到该主机,请参阅此答案 )。 You can try to ping this IP, or try to see if port 80 is accessible (both are not from my host). 您可以尝试ping通此IP,或尝试查看端口80是否可访问(都不是从我的主机来的)。 Or you can try to enumerate if any other ports are open on that host (search google/bing for instructions how to do that). 或者您可以尝试枚举该主机上是否有其他端口打开(搜索google / bing以获取有关如何执行此操作的说明)。 If you can't reach that port from your host, Microsoft Bots site can't reach it either. 如果您无法从主机访问该端口,则Microsoft Bots网站也无法访问该端口。 If your service is running on that IP, the most probably cause is that you have to open the port on AWS to be accessible from public internet (search google/bing for aws open port or aws allow ssh ) 如果您的服务在该IP上运行,则最可能的原因是您必须打开AWS上的端口才能从公共互联网进行访问(搜索google / bing以获取aws open portaws allow ssh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM