Project-MONAI/MONAILabel

(uvicorn.error:217) - Uvicorn running on http://0.0.0.0:8000 :: Unable to access URL

staraudichya opened this issue · 4 comments

Describe the bug
I am getting following error when I start Radiology app under monailabel server using command

monailabel start_server --app apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models deepedit

I am using WINDOWS DOCKER DESKTOP

Server logs
Execution log
..................
root@6b8dcb32eb97:/opt/monai# monailabel start_server --app apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models deepedit
Using PYTHONPATH=/usr:

[2023-12-06 04:20:38,922] [640] [MainThread] [INFO] (main:285) - USING:: version = False
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: app = /opt/monai/apps/radiology
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: studies = /opt/monai/datasets/Task09_Spleen/imagesTr
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: verbose = INFO
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: conf = [['models', 'deepedit']]
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: host = 0.0.0.0
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: port = 8000
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: uvicorn_app = monailabel.app:app
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: ssl_keyfile = None
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: ssl_certfile = None
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: ssl_keyfile_password = None
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: ssl_ca_certs = None
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: workers = None
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: limit_concurrency = None
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: access_log = False
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: root_path = /
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: log_level = info
[2023-12-06 04:20:38,923] [640] [MainThread] [INFO] (main:285) - USING:: log_config = None
[2023-12-06 04:20:38,924] [640] [MainThread] [INFO] (main:285) - USING:: dryrun = False
[2023-12-06 04:20:38,924] [640] [MainThread] [INFO] (main:285) - USING:: action = start_server
[2023-12-06 04:20:38,924] [640] [MainThread] [INFO] (main:296) -
Allow Origins: ['']
[2023-12-06 04:20:39,282] [640] [MainThread] [INFO] (uvicorn.error:74) - Started server process [640]
[2023-12-06 04:20:39,283] [640] [MainThread] [INFO] (uvicorn.error:48) - Waiting for application startup.
[2023-12-06 04:20:39,283] [640] [MainThread] [INFO] (monailabel.interfaces.utils.app:37) - Initializing App from: /opt/monai/apps/radiology; studies: /opt/monai/datasets/Task09_Spleen/imagesTr; conf: {'models': 'deepedit'}
[2023-12-06 04:20:39,306] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for MONAILabelApp Found: <class 'main.MyApp'>
[2023-12-06 04:20:39,317] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'>
[2023-12-06 04:20:39,319] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'>
[2023-12-06 04:20:39,319] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'>
[2023-12-06 04:20:39,319] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'>
[2023-12-06 04:20:39,320] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'>
[2023-12-06 04:20:39,320] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.localization_vertebra.LocalizationVertebra'>
[2023-12-06 04:20:39,320] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.localization_spine.LocalizationSpine'>
[2023-12-06 04:20:39,321] [640] [MainThread] [INFO] (monailabel.utils.others.class_utils:57) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_vertebra.SegmentationVertebra'>
[2023-12-06 04:20:39,321] [640] [MainThread] [INFO] (main:95) - +++ Adding Model: deepedit => lib.configs.deepedit.DeepEdit
[2023-12-06 04:20:39,820] [640] [MainThread] [INFO] (lib.configs.deepedit:141) - EPISTEMIC Enabled: False; Samples: 5
[2023-12-06 04:20:39,821] [640] [MainThread] [INFO] (main:98) - +++ Using Models: ['deepedit']
[2023-12-06 04:20:39,821] [640] [MainThread] [INFO] (monailabel.interfaces.app:135) - Init Datastore for: /opt/monai/datasets/Task09_Spleen/imagesTr
[2023-12-06 04:20:39,821] [640] [MainThread] [INFO] (monailabel.datastore.local:130) - Auto Reload: True; Extensions: ['
.nii.gz', '.nii', '.nrrd', '.jpg', '.png', '.tif', '.svs', '*.xml']
[2023-12-06 04:20:39,826] [640] [MainThread] [INFO] (monailabel.datastore.local:577) - Invalidate count: 0
[2023-12-06 04:20:39,826] [640] [MainThread] [INFO] (monailabel.datastore.local:151) - Start observing external modifications on datastore (AUTO RELOAD)
[2023-12-06 04:20:39,829] [640] [MainThread] [INFO] (main:128) - +++ Adding Inferer:: deepedit => <lib.infers.deepedit.DeepEdit object at 0x7fca1dccd060>
[2023-12-06 04:20:39,830] [640] [MainThread] [INFO] (main:128) - +++ Adding Inferer:: deepedit_seg => <lib.infers.deepedit.DeepEdit object at 0x7fca1d7959c0>
[2023-12-06 04:20:39,830] [640] [MainThread] [INFO] (main:194) - {'deepedit': <lib.infers.deepedit.DeepEdit object at 0x7fca1dccd060>, 'deepedit_seg': <lib.infers.deepedit.DeepEdit object at 0x7fca1d7959c0>, 'Histogram+GraphCut': <monailabel.scribbles.infer.HistogramBasedGraphCut object at 0x7fca1d797100>, 'GMM+GraphCut': <monailabel.scribbles.infer.GMMBasedGraphCut object at 0x7fca16456560>}
[2023-12-06 04:20:39,830] [640] [MainThread] [INFO] (main:209) - +++ Adding Trainer:: deepedit => <lib.trainers.deepedit.DeepEdit object at 0x7fca164565f0>
[2023-12-06 04:20:39,830] [640] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: /root/.cache/monailabel/sessions
[2023-12-06 04:20:39,830] [640] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2023-12-06 04:20:39,830] [640] [MainThread] [INFO] (monailabel.interfaces.app:469) - App Init - completed
[2023-12-06 04:20:39,831] [timeloop] [INFO] Starting Timeloop..
[2023-12-06 04:20:39,831] [640] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2023-12-06 04:20:39,831] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete..run_scheduler at 0x7fca1d712050>
[2023-12-06 04:20:39,831] [640] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete..run_scheduler at 0x7fca1d712050>
[2023-12-06 04:20:39,831] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2023-12-06 04:20:39,831] [640] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2023-12-06 04:20:39,832] [640] [MainThread] [INFO] (uvicorn.error:62) - Application startup complete.
[2023-12-06 04:20:39,832] [640] [MainThread] [INFO] (uvicorn.error:217) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

................
Log
..............
2023-12-06 09:13:54
2023-12-06 09:13:54 =============
2023-12-06 09:13:54 == PyTorch ==
2023-12-06 09:13:54 =============
2023-12-06 09:13:54
2023-12-06 09:13:54 NVIDIA Release 23.08 (build 66128610)
2023-12-06 09:13:54 PyTorch Version 2.1.0a0+29c30b1
2023-12-06 09:13:54
2023-12-06 09:13:54 Container image Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2023-12-06 09:13:54
2023-12-06 09:13:54 Copyright (c) 2014-2023 Facebook Inc.
2023-12-06 09:13:54 Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
2023-12-06 09:13:54 Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
2023-12-06 09:13:54 Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
2023-12-06 09:13:54 Copyright (c) 2011-2013 NYU (Clement Farabet)
2023-12-06 09:13:54 Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
2023-12-06 09:13:54 Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
2023-12-06 09:13:54 Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
2023-12-06 09:13:54 Copyright (c) 2015 Google Inc.
2023-12-06 09:13:54 Copyright (c) 2015 Yangqing Jia
2023-12-06 09:13:54 Copyright (c) 2013-2016 The Caffe contributors
2023-12-06 09:13:54 All rights reserved.
2023-12-06 09:13:54
2023-12-06 09:13:54 Various files include modifications (c) NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2023-12-06 09:13:54
2023-12-06 09:13:54 This container image and its contents are governed by the NVIDIA Deep Learning Container License.
2023-12-06 09:13:54 By pulling and using the container, you accept the terms and conditions of this license:
2023-12-06 09:13:54 https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
2023-12-06 09:13:55
2023-12-06 09:13:55 WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
2023-12-06 09:13:55 Use the NVIDIA Container Toolkit to start this container with GPU support; see
2023-12-06 09:13:55 https://docs.nvidia.com/datacenter/cloud-native/ .
2023-12-06 09:13:55
2023-12-06 09:50:00 root@6b8dcb32eb97:/opt/monai# 2023-12-06T04:20:04.911326294Z
2023-12-06 09:50:04 =============
2023-12-06 09:50:04 == PyTorch ==
2023-12-06 09:50:04 =============
2023-12-06 09:50:04
2023-12-06 09:50:04 NVIDIA Release 23.08 (build 66128610)
2023-12-06 09:50:04 PyTorch Version 2.1.0a0+29c30b1
2023-12-06 09:50:04
2023-12-06 09:50:04 Container image Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2023-12-06 09:50:04
2023-12-06 09:50:04 Copyright (c) 2014-2023 Facebook Inc.
2023-12-06 09:50:04 Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
2023-12-06 09:50:04 Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
2023-12-06 09:50:04 Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
2023-12-06 09:50:04 Copyright (c) 2011-2013 NYU (Clement Farabet)
2023-12-06 09:50:04 Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
2023-12-06 09:50:04 Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
2023-12-06 09:50:04 Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
2023-12-06 09:50:04 Copyright (c) 2015 Google Inc.
2023-12-06 09:50:04 Copyright (c) 2015 Yangqing Jia
2023-12-06 09:50:04 Copyright (c) 2013-2016 The Caffe contributors
2023-12-06 09:50:04 All rights reserved.
2023-12-06 09:50:04
2023-12-06 09:50:04 Various files include modifications (c) NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2023-12-06 09:50:04
2023-12-06 09:50:04 This container image and its contents are governed by the NVIDIA Deep Learning Container License.
2023-12-06 09:50:04 By pulling and using the container, you accept the terms and conditions of this license:
2023-12-06 09:50:04 https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
2023-12-06 09:50:04
2023-12-06 09:50:04 WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
2023-12-06 09:50:04 Use the NVIDIA Container Toolkit to start this container with GPU support; see
2023-12-06 09:50:04 https://docs.nvidia.com/datacenter/cloud-native/ .
2023-12-06 09:50:04

Expected behavior
Webpage should open at at http://0.0.0.0:8000/
But it say : The webpage at http://0.0.0.0:8000/ might be temporarily down or it may have moved permanently to a new web address.

Hi @staraudichya,

Sorry for the late response.
Are you trying to use 3DSlicer to interact with the MONAI Label server? If you want to see the MONAI Label APIs, please try opening the http://127.0.0.1:8000/ or http://localhost:8000/

Let us know,

Hi @diazandr3s,

  1. There was same problem after using specified URL (127.0.0.1 or localhost) or port (8000-9000). I can open the URL in remote computer but cannot open with my local computer.
  2. And sometimes I can load the URL in Slicer, but there was no APP name such as radiology. I can't use it normally.
    Do you know what's going on? Thanks for your help.

Hi @greeyun,

Could you please provide more details of the issue here?

There was same problem after using specified URL (127.0.0.1 or localhost) or port (8000-9000). I can open the URL in remote computer but cannot open with my local computer.

Which IP did you use for local connection?

And sometimes I can load the URL in Slicer, but there was no APP name such as radiology. I can't use it normally.
Do you know what's going on? Thanks for your help.

Did you make sure you're using the latest Slicer? could you share a print screen of this issue?

Hi @greeyun,

Could you please provide more details of the issue here?

There was same problem after using specified URL (127.0.0.1 or localhost) or port (8000-9000). I can open the URL in remote computer but cannot open with my local computer.

Which IP did you use for local connection?

And sometimes I can load the URL in Slicer, but there was no APP name such as radiology. I can't use it normally.
Do you know what's going on? Thanks for your help.

Did you make sure you're using the latest Slicer? could you share a print screen of this issue?

Hi @diazandr3s,

There was a problem about SSH tunnel setting. It can work now.
Thanks for your reply and have a good day!