# Jupyter app ask for password first time, works second time

**URL:** <https://discourse.openondemand.org/t/jupyter-app-ask-for-password-first-time-works-second-time/557>\
**Category:** Get Help\
**Tags:** question\
**Created:** [October 18, 2019, 6:11pm UTC](https://discourse.openondemand.org/t/jupyter-app-ask-for-password-first-time-works-second-time/557 "2019-10-18T18:11:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gufranco](https://avatars.discourse-cdn.com/v4/letter/g/7bcc69/32.png) [@gufranco](https://discourse.openondemand.org/u/gufranco)\
**Post date:** [October 21, 2019, 3:32pm UTC](https://discourse.openondemand.org/t/jupyter-app-ask-for-password-first-time-works-second-time/557/3 "2019-10-21T15:32:03Z")

</div>

Hello Jeff Ohrstrom,

Thank you for answer and thank you for the wonderful tool Open OnDemand.  
I followed your instructions, this is what I have:

{I have to cut a lot f output, you have restrictions to links on this forum, and It seems that is capturing a lot of my output as links}

I ask for a new instance of Jupyter Notebook and I got this job in our Torque/Moab system

# **Jupyter Notebook**

And this Session ID from OOD

**Session ID:** 8ddcda60-91bf-4264-828e-3c6e3e30aff1

I did not click on “Connect to Jupyter”

Now, on the file system, I went to:

~/ondemand/data/sys/dashboard/batch\_connect/dev/jupyter/output/8ddcda60-91bf-4264-828e-3c6e3e30aff1

The Working Directory for the job and consistent with the address you mentioned. The file connection.yml is there and its contents are:

host: tcocs001.hpc.wvu.edu  
port: 25339  
password: PxMbNrGkj41wPO3h

And the config.py contains

c.NotebookApp.ip = ‘_’  
c.NotebookApp.port = 25339  
c.NotebookApp.port\_retries = 0  
c.NotebookApp.password = u’sha1:hNRTRQkWHbr8Cdvz:ec67bafc67b49a23472386325b537afcd2c22b7a’  
c.NotebookApp.base\_url = ‘/node/tcocs001.hpc.wvu.edu/25339/’  
c.NotebookApp.open\_browser = False  
c.NotebookApp.allow\_origin = '_’  
c.NotebookApp.notebook\_dir = ‘/users/gufranco’  
c.NotebookApp.disable\_check\_xsrf = True

I have no way to check the password because I am loosing the SALT but I imagine the lines on before.sh are doing their job

# Generate SHA1 encrypted password (requires OpenSSL installed)

SALT="(create\_passwd 16)" password="(create\_passwd 16)"  
PASSWORD\_SHA1="(echo -n "{password}${SALT}" | openssl dgst -sha1 | awk ‘{print $NF}’)"

Now I go back and click on “Connect to Jupyter” I got the page asking for password  
I inspect the sources for that page close to Password and contains:

```
      <div class="center-nav">
        <form action="/node/tcocs001.hpc.wvu.edu/25339/logiXXX" method="post" class="navbar-form pull-left">
          <input type="hidden" name="_xsrf" value="2|ff030bad|024e132d8039e5ec72e01f690bc292fe|1571670441"/>
          
            <label for="password_input"><strong>Password:</strong></label>
          
          <input type="password" name="password" id="password_input" class="form-control">
          <button type="submit" class="btn btn-default" id="login_submit">Log in</button>
        </form>
      </div>

```

The file connection.yml has not changed after the first click

Now I click a second time and it opens the Jupyter Dashboard.

An inspection to the source code on (I have to replace tt with xx because I am not allowed to post links)

hxxps://ondemand-tf.hpc.wvu.edu/pun/sys/dashboard/batch\_connect/sessions

Reveals the following code close to “Connect to Jupyter”

 Connect to Jupyter 

I see the password in that div section

And the value matches  
connection.yml

host: tcocs001.hpc.wvu.edu  
port: 25339  
password: PxMbNrGkj41wPO3h

Still a mistery why I have to click twice to get the Jupyter Dashboard

Thank you very much, just to complete the context here are a few details of our system

RedHat 7.6  
$ openssl version  
OpenSSL 1.1.1a 20 Nov 2018

I am testing this from Firefox and Chrome, no difference from which browser you try to connect,

Thank you

---

_[View the full topic](https://discourse.openondemand.org/t/jupyter-app-ask-for-password-first-time-works-second-time/557)._
