question

AaronB-5734 avatar image
0 Votes"
AaronB-5734 asked prmanhas-MSFT commented

VM created / but timed out trying to connect

I'm trying to create a VM with the parameters below:

az vm create --no-wait --resource-group forecast1 --name forecast1vm1 --public-ip-address-dns-name forecast1vm1 --image microsoft-dsvm:ubuntu-1804:1804:21.06.01 --admin-username azureuser --ssh-key-value %homepath%/.ssh/id_rsa.pub --size Standard_L16s_v2 --storage-sku StandardSSD_LRS --public-ip-address-allocation dynamic

It seems to spin up the VM just fine (I see it under 'Resources' at the online portal).

Next, this part seems to run fine as well:

start ssh azureuser@forecast1vm1.westus2.cloudapp.azure.com /anaconda/envs/py37_default/bin/dask-scheduler
start ssh azureuser@forecast1vm1.westus2.cloudapp.azure.com /anaconda/envs/py37_default/bin/dask-worker tcp://forecast1vm1.westus2.cloudapp.azure.com:8786 --nprocs 16 --nthreads 1

But when trying to run a script subsequently:

OSError: Timed out trying to connect to 'tcp://forecast1vm1.westus2.cloudapp.azure.com:8786' after 10 s: connect() didn't finish in time

Are any of the parameters or URL for connecting to the VM now obsolete? This code was last run successfully ~12 months ago.

TYIA

azure-virtual-machines
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AaronB-5734 Following up to check if you got a chance to go through my previous comment.

Do let me know in case of any queries.

Thanks

0 Votes 0 ·

1 Answer

CristianSPIRIDON72 avatar image
1 Vote"
CristianSPIRIDON72 answered CristianSPIRIDON72 commented

Could be from NSG? Is port 8786 opened?

Hope this helps!

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your response! There is a line of code that opens the ports in the firewall, which results in the following:

az network nsg rule create -g forecast1 --nsg-name forecast1vm1NSG -n DaskRule --priority 100 --destination-port-ranges 8786 8787 --access Allow --protocol Tcp --description "Dask"

So I don't think it's the NSG?

For what it's worth, the same exact code ran on the same computer successfully 12 months ago, but has not been executed since. All I did was update the VM image to a more recent version. Thus, I suspect it is something on the Azure side that has changed.

I am not a technical user (I just inherited this workload) and am trying to get by by blind trial and error and web searching... I need help identifying if anything the code is trying to call (e.g. SKUs of VM? URL?) has become deprecated /defunct on the Azure side... Please let me know if there is anything else I can show you that would help identifying what is being called / spun up.

0 Votes 0 ·

From your response it looks like NSG is set up correctly. (I assume also the linux VM has the firewall setup correctly)

I think, there must be some firewall along the way, but can't tell how to debug it.

Sorry, I couldn't help.

0 Votes 0 ·