SOLVED

Blocked in connecting simulators

Occasional Contributor

Hello, It's my first attempt to carry out AnyLogic-Bonsai collaborative experiment. I tried to run the case on Github, but it failed. When I uploaded the model and clicked the "Train" button, the progress bar on the right side of the Connecting Simulators was stalled, and there was no connection after a long wait. I don't know what's wrong with this, and the run log seems to be fine, just not progress.

QinglongHao_1-1663296198099.png

 

QinglongHao_0-1663296173755.png

Here is some information about my Bonsai below. Looking forward to your generous help. Thanks!

 

Azure account: Azure for Students

QinglongHao_2-1663297023688.png

 

 

11 Replies

Out of curiosity, what did you upload for your simulator? Did you upload the exported.zip file from the GitHub repo? Or did you zip the entire directory and upload that?

Thanks for your reply, I uploaded the zip file exported from the "Export to Microsoft Bonsai" option in the "RLexperiment" of the AnyLogic model.

@QinglongHaoDid you make any changes to the model?

 

To check for model errors (which would stop the sims from successfully connecting) go to Azure then in Container instances, find the container for the running brain (check in the tags) and under its settings go to Container > Logs. The screenshot shows these steps visually.

 

This will show you the console output for the running model, including any errors.

 

 

 

@TWolfeAdam Thanks for your reply, I did not make any changes to the model, and I did find some problems displayed in Logs shown below. 

MZH)]_J$WJGEP6@]Y{H7{EP.png

It seems to me that this is because the compiled version of the file exported from AnyLogic is version 55.0 (Java 11), but the upper limit supported by this platform is version 52.0 (Java 1.8). I'm not sure whether this is related to my local Java environment, so I tried to switch between two Java versions(Java1.8 & Java18) on my Windows PC, and then re executed the necessary steps such as Export>Upload>Train. However, the content displayed in Logs is still the same as that in the screenshot above.

I wonder how can I solve this problem? Looking forward to receiving your help again. Thanks sincerely!

best response confirmed by QinglongHao (Occasional Contributor)
Solution

@QinglongHao Oh, that's because AL 8.8 switched to Java 11 which is what the model exports with (it uses the Java installed with AL, not your system one) and Bonsai's handling of AL models uses Java 8. Hopefully they will fix this soon!

 

For now, use the `exported.zip` file provided in the ABCA folder as what to upload. This was compiled on an earlier version and should still work.

 

If you want to use any of your own models, you'll need to manually create docker containers and manage uploading them to your Azure repo. To do this:

1. Export the model to a zip file

2. Rename it to "sim.zip"

3. Put the docker file in the attached zip in the same directory

4. Follow the instructions on this Bonsai help article

@TWolfeAdamThanks for your answer. I have got it. Your help and reminder are very detailed and friendly to the novices like me. Thank you very much. Best regards.:happyface:

I have updated the AnyLogic simulator to support Java 11. Let me know if this continues to be an issue for you.

@davidcoeThank you! In testing this, I noticed there is a choice in base images between "anylogic-professional-8" and "anylogic-professional-8-managed" -- what's the difference between them and is it relevant which is chosen?

@davidcoe 

Thank you, the model started training successfully, but there is a new problem, the interface always pops up this window, and then the training stops.

QinglongHao_0-1663898794846.png

 

 

@QinglongHao 

 

I have the same problem. and there is nothing in the container instance log. the log is in the loading state. the training session is running without any problem in the animated state but I wanted to train the brain by uploading the simulation zip file to azure. now I am blocked in "connecting simulators" and couldn't find the solution. please help!

 
 

 

 

I got the an error similar to this (but not exactly) but I managed to solve it by setting the max instance count, cores, and memory to the default values in the simulation environment configuration in the bonsai workspace