Attempts to run a script in a Jupyter Notebook cell fail with no error returned in the notebook. However, the following error is returned in the command prompt.
Error: zmq message arrived on closed channel
By default, Jupyter Notebook uses port 8888. However, the port may be inaccessible due to the machine’s firewall security or if it is used by another application. The port numbers' availability can be checked using Windows Command Prompt. To do so, run the following command:
netstat -na | find "<port number>"
The following image is a sample result of the command.
To resolve this issue, start Jupyter Notebook with a custom port number. Check the availability of the desired port, and run the following command in the Python Command Prompt:
jupyter notebook --port=<port number>
Alternatively, the default start port can also be changed. To do so:
jupyter notebook --generate-config
c.NotebookApp.port = 8889
Get help from ArcGIS experts
Download the Esri Support App