botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Bot Framework Crashes On Remote Server When Entering FormFlow

Open XelaMon opened this issue 10 years ago • 8 comments

I have a bot that enters a simple FormFlow (a single enumeration and a single Boolean, no validation/dynamically defined fields, etc). When I deploy the bot to an IIS instance locally, I have no issues going through the FormFlow.

However, when I try to deploy this bot into an Azure VM, I run into some problems. The bot continually fails at calling the form that I have built. The exception gives several "An error occurred while sending the request" which I eventually discovered to say "No connection could be made because the target machine actively refused it 127.0.0.1:9000"

I recognize this might be an IIS problem, but it is interesting since all my other intents (the dialog which calls the form is a LUIS dialog) appear to work fine.

XelaMon avatar Jun 10 '16 23:06 XelaMon

I also just noticed that giving the same query to the bot from the test web control in the dev portal and from the bot framework returns different results. It's not just LUIS being weird, the result I am getting in the web control comes from code that is no longer deployed to the server.

XelaMon avatar Jun 10 '16 23:06 XelaMon

Based on the IP address (127.0.0.1:9000) it seems as if you are using the emulator to talk to your bot in Azure. As far as I know, that won't work because the bot code in Azure is trying to send messages to the emulator running on your local machine.

willportnoy avatar Jun 11 '16 00:06 willportnoy

Well emulator does work for site deployed in azure. I have a bot working with same flow LUIS -> Form without any issue. Is it possible to share the code? Try once doing a clean publish. It might be case where old dll's were not replaced.

ankitbko avatar Jun 11 '16 03:06 ankitbko

@ankitbko you're right the emulator will work for a single message that can be returned inline with the incoming http post to the bot. But additional messages are sent directly as a separate http call through IConnectorClient, which will be directed back to the emulator at http://localhost:9000, but that address won't be listening on the azure box.

willportnoy avatar Jun 11 '16 05:06 willportnoy

@willportnoy Oh I get it. Thanks

ankitbko avatar Jun 11 '16 14:06 ankitbko

@willportnoy that makes sense. If that is the case, is there any recommended way to test the bot while deployed w/o having to configure a channel? I suppose I could also install the bot framework emulator on the VM.

XelaMon avatar Jun 13 '16 18:06 XelaMon

You could try this:

http://docs.botframework.com/connector/getstarted/#testing-the-connection-to-your-bot

I assume eventually you'll want to configure at least one of the channels too.

willportnoy avatar Jun 13 '16 19:06 willportnoy

Sounds good! Thanks @willportnoy

XelaMon avatar Jun 14 '16 21:06 XelaMon