wandb / server

W&B Server is the self hosted version of Weights & Biases
MIT License
263 stars 21 forks source link

HTTPError: 503 Server Error: Service Unavailable for url: http://localhost:8080/graphql #100

Closed wztdream closed 1 year ago

wztdream commented 1 year ago

Hi,

I was using wandb-local normally, but after I restart my computer. I can not start wandb-local, there is an error `HTTPError: 503 Server Error: Service Unavailable for url: http://localhost:8080/graphql

  1. The script is very simple:
    
    ### file name: debug.py
    import wandb

wandb.init(project="debug") print("done")

2. terminal output:

╰─➤ python debug.py 1 ↵ 503 response executing GraphQL.

503 response executing GraphQL.

503 response executing GraphQL.

Retry attempt failed: Traceback (most recent call last): File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/sdk/lib/retry.py", line 113, in call result = self._call_fn(*args, kwargs) File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py", line 210, in execute return self.client.execute(*args, *kwargs) # type: ignore File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/vendor/gql-0.2.0/wandb_gql/client.py", line 52, in execute result = self._get_result(document, args, kwargs) File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/vendor/gql-0.2.0/wandb_gql/client.py", line 60, in _get_result return self.transport.execute(document, *args, **kwargs) File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/vendor/gql-0.2.0/wandb_gql/transport/requests.py", line 39, in execute request.raise_for_status() File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://localhost:8080/graphql wandb: Network error (HTTPError), entering retry loop. wandb: W&B API key is configured. Use wandb login --relogin to force relogin Problem at: debug.py 3 ()... wandb: ERROR Error communicating with wandb process wandb: ERROR For more info see: https://docs.wandb.ai/library/init#init-start-error Traceback (most recent call last): File "debug.py", line 3, in wandb.init(project="debug") File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/sdk/wandb_init.py", line 1078, in init run = wi.init() File "/home/wangzongtao/anaconda3/envs/pytorch/lib/python3.8/site-packages/wandb/sdk/wandb_init.py", line 719, in init raise UsageError(error_message) wandb.errors.UsageError: Error communicating with wandb process For more info see: https://docs.wandb.ai/library/init#init-start-error wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.

3. here is the output of  `docker logs wandb-local`

╰─➤ docker logs wandb-local 1 ↵ Running /etc/my_init.d/00_regen_ssh_host_keys.sh... Running /etc/my_init.d/01_enable-services.sh... Copying services to runit Copying jobber template Enabling production mode Running /etc/my_init.d/02_load-settings.sh... Loading settings... Booting runit daemon... Runit started as PID 47 Starting wandb servers... Migrating database... No change. Loading custom chart definitions... All services started *** Access W&B at http://localhost:8080


4. I can normally log into project in browser through http://localhost:8080
5. wandb version is latest when I write the issue:
`wandb, version 0.13.5`
6. I am using ubuntu 20.04
7. I start the server on my personal computer by `docker run --rm -d -v /500g/research/wandb-local:/vol -p 8080:8080 --name wandb-local wandb/local`

It seems this is related with GraphQL., but I have no idea what it does. I also using proxy in my computer for a long time, no problem early.
wztdream commented 1 year ago

update: I have set proxy in my .zshrc, after disable this setting it works as expected.

# proxy
# export HTTP_PROXY="http://127.0.0.1:8889/"
# export HTTPS_PROXY="https://127.0.0.1:8889/"

As this proxy is useful for other software, I can disable it temporally, but I think we need a better solution for using proxy.

vanpelt commented 1 year ago

We support proxies. Sounds like you need to contact the administrator of your proxy and see why it's returning 500's.

vanpelt commented 1 year ago

503 generally means "can't talk to the service". This means you're proxy is unable to connect to the address of the server.

exalate-issue-sync[bot] commented 1 year ago

WandB Internal User commented: wztdream commented: update: I have set proxy in my .zshrc, after disable this setting it works as expected.

# proxy
# export HTTP_PROXY="http://127.0.0.1:8889/"
# export HTTPS_PROXY="https://127.0.0.1:8889/"

As this proxy is useful for other software, I can disable it temporally, but I think we need a better solution for using proxy.

anmolmann commented 1 year ago

Hi @wztdream, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

wztdream commented 1 year ago

Hi @wztdream, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

I think the issue is solved for me, wandb is great!

anmolmann commented 1 year ago

@wztdream , thanks for the update and am glad you're liking wandb. :)