the process of creating a web-app

Occasional Contributor

So... I exported the brain and then on azure, i created a web app in order to get a url to use in AnyLogic... strangely, for one of the brains I exported everything works perfectly fine, but for other brains, the azure website fails

for example i have this generated url

https://bonsai-infinite-ball.azurewebsites.net/v1/doc/index.html

that shows the following error:

:( Application Error

If you are the application administrator, you can access the diagnostic resources.

 
On the other hand i have this other one that works perfectly fine and gives me access to the exported brain api

I did the process 8 times, with each exported brain to be absolutely sure i am following the same steps... i created 3 different versions of the brain that works and it always works

I did the same process 5 times with the brain that doesn't work, and it never works with the same application error that states i did something wrong without saying what

I followed the exact same steps in both of them, so it's a mystery why one works and the other doesn't... 
 
3 Replies

In the configuration of your webapp (under the 'Settings' section), did you add the "WEBSITES_PORT" setting with the value set to 5000? I found that forgetting to do that results in the same error you're experiencing.

For specific instructions, see this page: https://docs.microsoft.com/en-us/azure/app-service/configure-common

 

@TWolfeAdam I did all that  

 

as i said in my original post, for one exported brain it works, and for the other it doesn't... I also stated that I used the exact same configuration and I attempted the same configuration several times

I also did it again with the one that worked to be sure i'm not forgetting something and the one that worked before worked again...

For me this is just one more of the several bugs I find in the system... There's probably an error during the training that is not shown, and the exported brain is defective in some way... And it's impossible for me to debug it.

@felipeharo100 I figured as much, I wanted to make sure our mutual understanding of the process was synced. The only other thing I can think to check is whether the correct tag was chosen - this is something I don't believe is well documented. 

If you click on the "Location" of your exported brain (in Bonsai) and look at the instructions, the tag is the last part of the docker image. This should match the tag chosen in the Container settings of the web app. See the image below for a visual representation.

 

 

2020-12-16_11-04-45.png