# WanDB connection error

**URL:** <https://community.wandb.ai/t/wandb-connection-error/4534>\
**Category:** W&B Help\
**Created:** [June 7, 2023, 2:49pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534 "2023-06-07T14:49:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexvizgard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/alexvizgard/32/1351_2.png) [@alexvizgard](https://community.wandb.ai/u/alexvizgard)\
**Post date:** [June 7, 2023, 2:49pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/1 "2023-06-07T14:49:46Z")

</div>

Hi,

It been a while and I have been getting Network Error (ConnectionError) whenever I am trying to link to my account.  
I have deleted the settings and netrc files, uninstalled and reinstalled wandb but nothing seems to work. My machine is an Azure machine.  
One further investigation, the debug log shows  
ConnectionRefusedError: [Errno 111] Connection refused

It used to work fine and then suddenly it stopped working one day. Please could you help sort this issue.

---

<div class="post-metadata">

**Author:** ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)\
**Post date:** [June 8, 2023, 10:18pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/2 "2023-06-08T22:18:07Z")

</div>

Hi @alexvizgard, do you get that error message on `wandb.init()`?

Also, are you trying to login to our public cloud service ([wandb.ai](http://wandb.ai)) or a private deployment hosted elsewhere?

Thank you,  
Nate

---

<div class="post-metadata">

**Author:** ![alexvizgard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/alexvizgard/32/1351_2.png) [@alexvizgard](https://community.wandb.ai/u/alexvizgard)\
**Post date:** [June 9, 2023, 9:14am UTC](https://community.wandb.ai/t/wandb-connection-error/4534/3 "2023-06-09T09:14:33Z")

</div>

Hi Nathan,

Yes, I do.

I am trying to use the public cloud service.

Kind regards  
Sandipan

---

<div class="post-metadata">

**Author:** ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)\
**Post date:** [June 9, 2023, 6:45pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/4 "2023-06-09T18:45:23Z")

</div>

@alexvizgard, Are you able to login to `wandb` and run `wandb.init()` with your API key on another machine? You could test out a Colab if you need.

If so, I would guess there is some infrastructure blocking the network traffic. Running `ping api.wandb.ai` from the CLI on the Azure machine would be a good baseline test to make sure it can establish a connection.

---

<div class="post-metadata">

**Author:** ![alexvizgard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/alexvizgard/32/1351_2.png) [@alexvizgard](https://community.wandb.ai/u/alexvizgard)\
**Post date:** [June 12, 2023, 8:19am UTC](https://community.wandb.ai/t/wandb-connection-error/4534/5 "2023-06-12T08:19:28Z")

</div>

Hi Nathan,

Yes, I am able to do run wandb.init() from another machine (on Azure within the same account) using the same API key. I had tried it on Colab as well. It is just this machine that it deosn’t work on.

I am able to ping [api.wandb.ai](http://api.wandb.ai) from the machine. I am able to ping and receive a response from the CLI as well as from within the virtual Conda environment.

The machine has been updated and the urllib library is updated as well.

---

<div class="post-metadata">

**Author:** ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)\
**Post date:** [June 13, 2023, 3:37pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/6 "2023-06-13T15:37:22Z")

</div>

@alexvizgard, thank you for testing.

If you run in CLI `wandb login --cloud` do you get your username printed to terminal?

Also, could you share more from the debug log? Preferably if you could upload it here or email it to [Nathan.kuneman@wandb.com](mailto:Nathan.kuneman@wandb.com) so I can take a look?

Lastly, was there anything that changed around the time this stopped working? Upgrading `wandb` for example or any changes to firewall of the Azure machine? I’m lead to think this may be firewall related.

---

<div class="post-metadata">

**Author:** ![alexvizgard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/alexvizgard/32/1351_2.png) [@alexvizgard](https://community.wandb.ai/u/alexvizgard)\
**Post date:** [June 14, 2023, 8:25am UTC](https://community.wandb.ai/t/wandb-connection-error/4534/7 "2023-06-14T08:25:22Z")

</div>

Hi Nathan,

The login does return the username. I have already done this test.

Please find attached the logs.

Nothing had changed since it suddenly stopped working. However, in a bid to troubleshoot the problem, I had updated the machine. However with an updated different VM, it works fine.

In the logs you might notice, I am using a conda environment. I have already tried without the conda environment and it still doesn’t work. With the same Conda file in a different machine it works.

Kind regards  
Sandipan

---

<div class="post-metadata">

**Author:** ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)\
**Post date:** [June 16, 2023, 9:26pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/8 "2023-06-16T21:26:26Z")

</div>

Hi @alexvizgard, interesting. Would it be possible to look through the env variables that are set on the machine and see if anything is suspicious? If `WANDB_BASE_URL` is set I could see that causing this or if any env variables that relate to setting up a proxy that doesn’t exist that may cause this.

---

<div class="post-metadata">

**Author:** ![alexvizgard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/alexvizgard/32/1351_2.png) [@alexvizgard](https://community.wandb.ai/u/alexvizgard)\
**Post date:** [June 19, 2023, 2:52pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/9 "2023-06-19T14:52:42Z")

</div>

Hi Nathan,

Surprisingly, it started working from today. Did you make any changes on your end?

---

<div class="post-metadata">

**Author:** ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)\
**Post date:** [June 27, 2023, 2:30pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/10 "2023-06-27T14:30:00Z")

</div>

Hi @alexvizgard, no nothing should have changed on our end. That’s interesting though. Do you want to call this solved for now and we can investigate further if this comes up again?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [August 26, 2023, 2:30pm UTC](https://community.wandb.ai/t/wandb-connection-error/4534/11 "2023-08-26T14:30:14Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
