# Jupyter launch fails for UGE

**URL:** <https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814>\
**Category:** Get Help\
**Created:** [April 1, 2020, 4:46pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814 "2020-04-01T16:46:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomasbrTTU](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/thomasbrttu/32/249_2.png) [@thomasbrTTU](https://discourse.openondemand.org/u/thomasbrTTU)\
**Post date:** [April 1, 2020, 4:46pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814/1 "2020-04-01T16:46:57Z")

</div>

Running OOD Installed Jupyter App in sandbox. When it launches it times out after a minute. Is it a connection issue?

**System and scheduler info:**

UGE 8.6.6  
CentOS Linux release 7.4  
OnDemand version: v1.6.20 | Dashboard version: v1.35.3

**Security settings on compute node**

firewalld disabled  
selinux permissive

**/home/thomasbr/ondemand/dev/jupyter/form.yml file:**

* * *

cluster: “ivy”  
modules: “intel python3”  
extra\_jupyter\_args: “”  
form:

- modules
- extra\_jupyter\_args
- bc\_account
- bc\_queue
- bc\_num\_hours
- bc\_num\_slots
- bc\_email\_on\_started

**/home/thomasbr/ondemand/dev/jupyter/submit.yml./erb file:** (this is where the files are when the jupyter-bc stuff was installed. Not sure if it needs to be moved to /submit)

–  
batch\_connect:  
script:  
queue\_name: “ondemand”  
accounting\_id: “communitycluster”  
job\_name: “jupyter\_interactive”

native:  
- “-pe”  
- “sm”  
- “4”  
- “-S”  
- “/bin/bash”

**output log file** :

Script starting…  
Waiting for Jupyter Notebook server to open port 64356…  
TIMING - Starting wait at: Wed Apr 1 11:25:19 CDT 2020  
TIMING - Starting main script at: Wed Apr 1 11:25:19 CDT 2020  
TIMING - Starting jupyter at: Wed Apr 1 11:25:19 CDT 2020  
Timed out waiting for Jupyter Notebook server to open port 64356!  
TIMING - Wait ended at: Wed Apr 1 11:26:22 CDT 2020  
Cleaning up…

**scheduler error file** :

/export/uge/default/spool/compute-19-10/job\_scripts/745458: line 3: module: command not found  
/home/thomasbr/ondemand/data/sys/dashboard/batch\_connect/dev/jupyter/output/8656b32b-1419-462b-90e1-db491d1b2225/script.sh: line 14: module: command not found  
/home/thomasbr/ondemand/data/sys/dashboard/batch\_connect/dev/jupyter/output/8656b32b-1419-462b-90e1-db491d1b2225/script.sh: line 17: module: command not found  
/home/thomasbr/ondemand/data/sys/dashboard/batch\_connect/dev/jupyter/output/8656b32b-1419-462b-90e1-db491d1b2225/script.sh: line 20: module: command not found

- jupyter notebook --config=/home/thomasbr/ondemand/data/sys/dashboard/batch\_connect/dev/jupyter/output/8656b32b-1419-462b-90e1-db491d1b2225/config.py  
Traceback (most recent call last):  
File “/bin/jupyter-notebook”, line 8, in   
sys.exit(main())  
File “/usr/lib/python2.7/site-packages/jupyter\_core/application.py”, line 270, in launch\_instance  
return super(JupyterApp, cls).launch\_instance(argv=argv, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/traitlets/config/application.py”, line 663, in launch\_instance  
app.initialize(argv)  
File “”, line 2, in initialize  
File “/usr/lib/python2.7/site-packages/traitlets/config/application.py”, line 87, in catch\_config\_error  
return method(app, \*args, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/notebook/notebookapp.py”, line 1630, in initialize  
self.init\_webapp()  
File “/usr/lib/python2.7/site-packages/notebook/notebookapp.py”, line 1378, in init\_webapp  
self.jinja\_environment\_options,  
File “/usr/lib/python2.7/site-packages/notebook/notebookapp.py”, line 159, in **init**  
default\_url, settings\_overrides, jinja\_env\_options)  
File “/usr/lib/python2.7/site-packages/notebook/notebookapp.py”, line 252, in init\_settings  
allow\_remote\_access=jupyter\_app.allow\_remote\_access,  
File “/usr/lib/python2.7/site-packages/traitlets/traitlets.py”, line 556, in **get**  
return self.get(obj, cls)  
File “/usr/lib/python2.7/site-packages/traitlets/traitlets.py”, line 535, in get  
value = self.\_validate(obj, dynamic\_default())  
File “/usr/lib/python2.7/site-packages/notebook/notebookapp.py”, line 867, in \_default\_allow\_remote  
for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK\_STREAM):  
socket.gaierror: [Errno -2] Name or service not known

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 1, 2020, 5:40pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814/2 "2020-04-01T17:40:22Z")

</div>

It seems to be a networking interface issue. We configure to bind to [\* ip](https://github.com/OSC/bc_osc_jupyter/blob/4cb906b7da9de7c10d0186de434f483a0fd7fb87/template/before.sh.erb#L25) which is to say, any interface. That [python error](https://docs.python.org/2/library/socket.html#socket.gaierror), I can’t tell what it is for sure, but I’d guess it’s a DNS issue. Like you can’t resolve the loopback or `::1`. Are you allowed to open ports on your compute nodes?

When I run a quick test, I get this.

```auto
>>> import socket;
>>> socket.getaddrinfo("*", 8081, 0, socket.SOCK_STREAM)
[(10, 1, 6, '', ('::1', 8081, 0, 0)), (2, 1, 6, '', ('127.0.0.1', 8081))]

```

You could try to set `c.NotebookApp.ip = '0.0.0.0'` to be more explicit, see if that changes anything.

---

<div class="post-metadata">

**Author:** ![thomasbrTTU](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/thomasbrttu/32/249_2.png) [@thomasbrTTU](https://discourse.openondemand.org/u/thomasbrTTU)\
**Post date:** [April 1, 2020, 8:25pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814/3 "2020-04-01T20:25:51Z")

</div>

We are allowed to open ports on the compute node. On the compute node I get the same thing.

import socket  
socket.getaddrinfo("\*", 8081, 0, socket.SOCK\_STREAM)  
[(10, 1, 6, ‘’, (’::1’, 8081, 0, 0)), (2, 1, 6, ‘’, (‘127.0.0.1’, 8081))]

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 1, 2020, 9:13pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814/4 "2020-04-01T21:13:25Z")

</div>

I think it’s a resolution issue more than permission. If you google the phrase “Name or service not known” (the error string you received) it’s all about different programs not being able to DNS resolve a hostname.

Did you try setting `c.NotebookApp.ip = '0.0.0.0'` in your `before.sh.erb`? I see several answers on stack overflow or their Github that say that’s the resolution.

---

<div class="post-metadata">

**Author:** ![thomasbrTTU](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/thomasbrttu/32/249_2.png) [@thomasbrTTU](https://discourse.openondemand.org/u/thomasbrTTU)\
**Post date:** [April 1, 2020, 11:00pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814/5 "2020-04-01T23:00:24Z")

</div>

It works! You can close the ticket.

Thanks

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:43pm UTC](https://discourse.openondemand.org/t/jupyter-launch-fails-for-uge/814/6 "2022-05-26T15:43:19Z")

</div>

Closed on May 26, 2022, 3:43pm UTC


