# Cannot start\_server for MONAILABEL

**URL:** <https://discourse.slicer.org/t/cannot-start-server-for-monailabel/27406>\
**Category:** Support\
**Tags:** monailabel\
**Created:** [January 22, 2023, 7:28pm UTC](https://discourse.slicer.org/t/cannot-start-server-for-monailabel/27406 "2023-01-22T19:28:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bor\_Antolic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bor_antolic/32/17628_2.png) [@Bor\_Antolic](https://discourse.slicer.org/u/Bor_Antolic)\
**Post date:** [January 22, 2023, 7:28pm UTC](https://discourse.slicer.org/t/cannot-start-server-for-monailabel/27406/1 "2023-01-22T19:28:03Z")

</div>

Hi! I hope someone could help me with my problem. I successfully installed Monailabel on my home (Mac)computer, started the server, and it works inside 3D Slicer. I followed same steps to install it on my work Windows computer - which is more powerful - but I cannot seem to start the server.  
Can anyone please look at the output bellow and suggest a solution?

(monailabel-env) C:\Users\EchoPac\>monailabel start\_server --app apps/radiology --studies datasets/Task02\_Heart/ImagesTr --conf models deepedit  
Using PYTHONPATH=C:\Users\EchoPac.conda\envs;  
“”  
2023-01-20 17:48:12,913 - USING:: version = False  
2023-01-20 17:48:12,913 - USING:: app = C:\Users\EchoPac\apps\radiology  
2023-01-20 17:48:12,913 - USING:: studies = C:\Users\EchoPac\datasets\Task02\_Heart\imagesTr  
2023-01-20 17:48:12,913 - USING:: verbose = INFO  
2023-01-20 17:48:12,913 - USING:: conf = [[‘models’, ‘deepedit’]]  
2023-01-20 17:48:12,913 - USING:: host = 0.0.0.0  
2023-01-20 17:48:12,913 - USING:: port = 8000  
2023-01-20 17:48:12,913 - USING:: uvicorn\_app = monailabel.app:app  
2023-01-20 17:48:12,913 - USING:: ssl\_keyfile = None  
2023-01-20 17:48:12,913 - USING:: ssl\_certfile = None  
2023-01-20 17:48:12,913 - USING:: ssl\_keyfile\_password = None  
2023-01-20 17:48:12,913 - USING:: ssl\_ca\_certs = None  
2023-01-20 17:48:12,913 - USING:: workers = None  
2023-01-20 17:48:12,913 - USING:: limit\_concurrency = None  
2023-01-20 17:48:12,913 - USING:: access\_log = False  
2023-01-20 17:48:12,913 - USING:: log\_config = None  
2023-01-20 17:48:12,913 - USING:: dryrun = False  
2023-01-20 17:48:12,913 - USING:: action = start\_server  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_API\_STR =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_PROJECT\_NAME = MONAILabel  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_APP\_DIR =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_STUDIES =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_AUTH\_ENABLE = False  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_AUTH\_DB =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_APP\_CONF = ‘{}’  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_TASKS\_TRAIN = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_TASKS\_STRATEGY = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_TASKS\_SCORING = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_TASKS\_BATCH\_INFER = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_URL =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_USERNAME =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_PASSWORD =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_API\_KEY =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_CACHE\_PATH =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_PROJECT =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_ASSET\_PATH =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_DSA\_ANNOTATION\_GROUPS =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_USERNAME =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_PASSWORD =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_CACHE\_PATH =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_QIDO\_PREFIX = None  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_WADO\_PREFIX = None  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_STOW\_PREFIX = None  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_FETCH\_BY\_FRAME = False  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_CONVERT\_TO\_NIFTI = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_SEARCH\_FILTER = ‘{“Modality”: “CT”}’  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_CACHE\_EXPIRY = 180  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_PROXY\_TIMEOUT = 30.0  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DICOMWEB\_READ\_TIMEOUT = 5.0  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_AUTO\_RELOAD = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_READ\_ONLY = False  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_DATASTORE\_FILE\_EXT = ‘[“_.nii.gz", "_.nii”, “_.nrrd", "_.jpg”, “_.png", "_.tif”, “_.svs", "_.xml”]’  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_SERVER\_PORT = 8000  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_CORS\_ORIGINS = ‘’  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_SESSIONS = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_SESSION\_PATH =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_SESSION\_EXPIRY = 3600  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_INFER\_CONCURRENCY = -1  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_INFER\_TIMEOUT = 600  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_TRACKING\_ENABLED = True  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_TRACKING\_URI =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_ZOO\_SOURCE = github  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_ZOO\_REPO = Project-MONAI/model-zoo/hosting\_storage\_v1  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_ZOO\_AUTH\_TOKEN =  
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI\_LABEL\_AUTO\_UPDATE\_SCORING = True  
2023-01-20 17:48:12,913 -  
Allow Origins: [‘\*’]  
[2023-01-20 17:48:14,147] [11612] [MainThread] [INFO] (uvicorn.error:75) - Started server process [11612]  
[2023-01-20 17:48:14,147] [11612] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.  
[2023-01-20 17:48:14,147] [11612] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: C:\Users\EchoPac\apps\radiology; studies: C:\Users\EchoPac\datasets\Task02\_Heart\imagesTr; conf: {‘models’: ‘deepedit’}  
[2023-01-20 17:48:14,584] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for MONAILabelApp Found: \<class ‘main.MyApp’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.deepedit.DeepEdit’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.deepgrow\_2d.Deepgrow2D’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.deepgrow\_3d.Deepgrow3D’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.localization\_spine.LocalizationSpine’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.localization\_vertebra.LocalizationVertebra’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.segmentation.Segmentation’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.segmentation\_spleen.SegmentationSpleen’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class\_utils:37) - Subclass for TaskConfig Found: \<class ‘lib.configs.segmentation\_vertebra.SegmentationVertebra’\>  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (main:93) - +++ Adding Model: deepedit =\> lib.configs.deepedit.DeepEdit  
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.generic:185) - Downloading resource: C:\Users\EchoPac\apps\radiology\model\pretrained\_deepedit\_dynunet.pt from [https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology\_deepedit\_dynunet\_multilabel.pt](https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology_deepedit_dynunet_multilabel.pt)  
pretrained\_deepedit\_dynunet.pt: 0.00B [00:00, ?B/s]  
2023-01-20 17:48:14,727 - ERROR - Download failed from [https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology\_deepedit\_dynunet\_multilabel.pt](https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology_deepedit_dynunet_multilabel.pt) to C:\Users\EchoPac\AppData\Local\Temp\tmp6fkuh0c8\pretrained\_deepedit\_dynunet.pt.  
[2023-01-20 17:48:14,806] [11612] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last):  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 1346, in do\_open  
h.request(req.get\_method(), req.selector, req.data, headers,  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1285, in request  
self.\_send\_request(method, url, body, headers, encode\_chunked)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1331, in \_send\_request  
self.endheaders(body, encode\_chunked=encode\_chunked)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1280, in endheaders  
self.\_send\_output(message\_body, encode\_chunked=encode\_chunked)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1040, in \_send\_output  
self.send(msg)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 980, in send  
self.connect()  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1454, in connect  
self.sock = self.\_context.wrap\_socket(self.sock,  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\ssl.py”, line 501, in wrap\_socket  
return self.sslsocket\_class.\_create(  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\ssl.py”, line 1041, in \_create  
self.do\_handshake()  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\ssl.py”, line 1310, in do\_handshake  
self.\_sslobj.do\_handshake()  
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\starlette\routing.py”, line 635, in lifespan  
async with self.lifespan\_context(app):  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\starlette\routing.py”, line 530, in **aenter**  
await self.\_router.startup()  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\starlette\routing.py”, line 612, in startup  
await handler()  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monailabel\app.py”, line 106, in startup\_event  
instance = app\_instance()  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monailabel\interfaces\utils\app.py”, line 51, in app\_instance  
app = c(app\_dir=app\_dir, studies=studies, conf=conf)  
File “C:\Users\EchoPac\apps\radiology\main.py”, line 95, in **init**  
self.models[k].init(k, self.model\_dir, conf, self.planner)  
File “C:\Users\EchoPac\apps\radiology\lib\configs\deepedit.py”, line 74, in init  
download\_file(url, self.path[0])  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monailabel\utils\others\generic.py”, line 187, in download\_file  
download\_url(url, path)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monai\apps\utils.py”, line 203, in download\_url  
\_download\_with\_progress(url, tmp\_name, progress=progress)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monai\apps\utils.py”, line 114, in \_download\_with\_progress  
raise e  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monai\apps\utils.py”, line 107, in \_download\_with\_progress  
urlretrieve(url, filepath, reporthook=t.update\_to)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 239, in urlretrieve  
with contextlib.closing(urlopen(url, data)) as fp:  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 214, in urlopen  
return opener.open(url, data, timeout)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 517, in open  
response = self.\_open(req, data)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 534, in \_open  
result = self.\_call\_chain(self.handle\_open, protocol, protocol +  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 494, in \_call\_chain  
result = func(\*args)  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 1389, in https\_open  
return self.do\_open(http.client.HTTPSConnection, req,  
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 1349, in do\_open  
raise URLError(err)  
urllib.error.URLError: \<urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host\>

[2023-01-20 17:48:14,806] [11612] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 23, 2023, 10:39am UTC](https://discourse.slicer.org/t/cannot-start-server-for-monailabel/27406/2 "2023-01-23T10:39:27Z")

</div>

Hi Bor,  
Please make sure that you install MONIALabel on Windows as [outlined here](https://projectweek.na-mic.org/PW37_2022_Virtual/Projects/MONAILabelLung/MONAILabel_Installation.html).  
From the error messages I vaguely assume this could be Firewall / Network / Admin rights problems, maybe ports that are not open, but I would like to ask @diazandr3s to have a look at this. Thank you, Andres. We have never tried to use MONAILabel within our hospital network yet.

---

<div class="post-metadata">

**Author:** ![Bor\_Antolic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bor_antolic/32/17628_2.png) [@Bor\_Antolic](https://discourse.slicer.org/u/Bor_Antolic)\
**Post date:** [January 23, 2023, 11:06am UTC](https://discourse.slicer.org/t/cannot-start-server-for-monailabel/27406/3 "2023-01-23T11:06:59Z")

</div>

Thank you for your reply. I managed to solve this problem, thanks to @SachidanandAlle([SachidanandAlle (SACHIDANAND ALLE) · GitHub](https://github.com/SachidanandAlle)). It’s more of a workaround - I manually downloaded the file that couldn’t be downloaded and added it to the specified folder.

---

<div class="post-metadata">

**Author:** ![natachavalador](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/natachavalador/32/79247_2.png) [@natachavalador](https://discourse.slicer.org/u/natachavalador)\
**Post date:** [January 27, 2025, 6:11pm UTC](https://discourse.slicer.org/t/cannot-start-server-for-monailabel/27406/4 "2025-01-27T18:11:27Z")

</div>

Hi,  
It seems I am facing the same problem with the server.

. Running on my own pc (Windows 11)  
. 3D Slicer installed with MonaiLabel plug-in working  
. Tryed Anaconda, Python 3.11 and Visual Studio Code as an interface  
. Followed precisely all tutorials from Andres Pinto and the server remains not working  
. Tried to mix my personal IP with the Port :8000 and the error remains

Could you please help me?

Natacha Valador
