ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

"No connection could be made because the target machine actively refused it"

Open FNRocha opened this issue 8 years ago • 14 comments

Hello! I am experiencing the following problem while trying to follow the 3DBall tutorial. I can run the Scene in player mode no problem, however there seems to be a problem with communication between jupyter and Unity3D. "No connection could be made because the target machine actively refused it"

image

This is how I build: #image

Brain type - external:

image

Can anyone provide any suggestion?

Thanks for the attention!

FNRocha avatar Jan 14 '18 21:01 FNRocha

Hi @FNRocha just to clarify, you launched an instance of the build using the Jupyter Notebook, right?

If that's not the case, maybe a firewall is blocking the socket communication.

MarcoMeter avatar Jan 15 '18 09:01 MarcoMeter

Yeah, I am using Jupyter notebook, I thought it could be firewall at first too, I tried disabling the windows firewall and retried but it still didn't work.

FNRocha avatar Jan 15 '18 13:01 FNRocha

I had the same problem and error because I launched 2 python Notebook on the same 3dBall.exe. Try to open and run just Basics.ipynb or PPO.ipynb.

andreaspastor avatar Jan 15 '18 21:01 andreaspastor

I'm having a similar issue. It looks like my Unity environment is closing as soon as the connection is made.

dracolytch avatar Jan 16 '18 03:01 dracolytch

i closed everything and started again and it worked!!it seems that backlog file is getting full.

barotdhrumil21 avatar Jan 16 '18 08:01 barotdhrumil21

I still seem to be experincing the same error message, I have tried the steps above i.e. closing the notebook and everything, even rebuilt the 3dbal binary, the same error keeps appearing.

kamalp99 avatar Jan 23 '18 22:01 kamalp99

I closed everything, downloaded a new version of ML Agents, made sure everything was coordinating using that version of ML Agents, and I was able to get it to go again (re-bind everything with the most current version and try again). Not really much of a "solution", but it got things to work.

dracolytch avatar Jan 23 '18 22:01 dracolytch

I have tried those steps, but it still doesn't work, most of the time the unity app fails to launch from within the Jupyter notebook. It says (Not Responding) on the app window, even though the notebook cell says the cell ran successfully.

kamalp99 avatar Jan 24 '18 12:01 kamalp99

open 'environments.py 'and add '+ 10' or any number to 'self.port = base_port + worker_id'.You might be running something on old port. and if issue still stays than give full traceback.

barotdhrumil21 avatar Jan 24 '18 17:01 barotdhrumil21

Have tried updating the environment.py file and still experiencing the same issues, either the app doesn't respond or the message "No connection could be made because the target machine actively refused it" is displayed if the unity exe manages to open and run.

kamalp99 avatar Jan 24 '18 20:01 kamalp99

check that firewall isn't blocking it.if it doesn't work remove everything and see some tutorials then follow one with most details and if it still doesn't work just run it in someone else's computer and note the steps that you are taking and learn there.

barotdhrumil21 avatar Jan 25 '18 04:01 barotdhrumil21

Heads up: Game crashed and gave me this error when the memory size was out of synch with the MakeMemory method in my Decision class

dracolytch avatar Jan 30 '18 23:01 dracolytch

Thanks for reaching out to us. Hopefully you were able to resolve your issue. We are closing this due to inactivity.

shihzy avatar Mar 28 '18 21:03 shihzy

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 03 '20 15:01 lock[bot]