# Having trouble configuring Jupyter on OOD: "Not Found -- The requested URL was not found on this server."

**URL:** <https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085>\
**Category:** Get Help\
**Created:** [November 6, 2023, 6:57pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085 "2023-11-06T18:57:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![walidabualafia](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/walidabualafia/32/1962_2.png) [@walidabualafia](https://discourse.openondemand.org/u/walidabualafia)\
**Post date:** [November 6, 2023, 6:57pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/1 "2023-11-06T18:57:37Z")

</div>

Hi all,

I am trying to set up Jupyter on OOD. I’m running OOD on a LSF10.1, RHEL8 cluster.

The Jupyter interactive session launches, and gets to the `Running` state. However, whenever I click 👁 `connect to Jupyter`, I get the following error:

```auto
Not Found

The requested URL was not found on this server.

```

I went ahead and enabled reverse proxy in the `/etc/ood/config/ood_portal.yml` file like so:

```auto
host_regex: '[\w.-]+\.my_center\.edu'
node_uri: '/node'
rnode_uri: '/rnode'

```

I also tried the default value for `host_regex`, but that did not work either.

Any help would be appreciated. Many thanks in advance! 😄

---

<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:** [November 6, 2023, 9:28pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/2 "2023-11-06T21:28:56Z")

</div>

Can you share the URL you’re trying to access? You can obfuscate what you need, but your intuition about those configs is correct.

What I would question is - in the URL do you have the FQDN or a simpler hostname.

---

<div class="post-metadata">

**Author:** ![walidabualafia](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/walidabualafia/32/1962_2.png) [@walidabualafia](https://discourse.openondemand.org/u/walidabualafia)\
**Post date:** [November 6, 2023, 9:38pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/3 "2023-11-06T21:38:42Z")

</div>

Hi Jeff,

Thanks for your response. The URL that `Connect to Jupyter` button sends me to is this: [https://svltondemand01.institution.org/node/nodegpu228/39003/login](https://svltondemand01.institution.org/node/nodegpu228/39003/login)

In the URL, I don’t have the FQDN, just the domain name. A quick glance at `output.log` shows the following:

```auto
Script starting...
Waiting for Jupyter Notebook server to open port 39003...
TIMING - Starting wait at: Mon Nov 6 15:32:44 CST 2023
TIMING - Starting main script at: Mon Nov 6 15:32:44 CST 2023
TIMING - Starting jupyter at: Mon Nov 6 15:32:44 CST 2023
+ jupyter notebook --config=/home/wabuala/ondemand/data/sys/dashboard/batch_connect/dev/jupyter/output/bf30c35c-adbb-46f2-a8e5-598ef668f046/config.py
[W 15:32:48.566 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[W 15:32:48.567 NotebookApp] Terminals not available (error was No module named 'winpty')
[W 2023-11-06 15:32:50.098 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-11-06 15:32:50.098 LabApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'port_retries' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'base_url' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'allow_origin' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'disable_check_xsrf' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-11-06 15:32:50.098 LabApp] 'disable_check_xsrf' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-11-06 15:32:50.101 LabApp] JupyterLab extension loaded from /home/wabuala/.local/lib/python3.6/site-packages/jupyterlab
[I 2023-11-06 15:32:50.101 LabApp] JupyterLab application directory is /path/to/userHome/wabuala/.local/share/jupyter/lab
[I 15:32:50.122 NotebookApp] Serving notebooks from local directory: /home/wabuala
[I 15:32:50.122 NotebookApp] Jupyter Notebook 6.4.10 is running at:
[I 15:32:50.122 NotebookApp] http://nodegpu228:39003/node/nodegpu228/39003/
[I 15:32:50.122 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Discovered Jupyter Notebook server listening on port 39003!
TIMING - Wait ended at: Mon Nov 6 15:32:50 CST 2023
Generating connection YAML file...

```

This line `[W 15:32:48.567 NotebookApp] Terminals not available (error was No module named 'winpty')` captures my attention, but despite `winpty` not being installed, seems like Jupyter is spinning up.

---

<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:** [November 6, 2023, 9:40pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/4 "2023-11-06T21:40:33Z")

</div>

> [@walidabualafia](#):
>
> In the URL, I don’t have the FQDN, just the domain name. A quick glance at `output.log` shows the following:

Yea that may bit it exactly - you’re expecting to match against the FQDN and that `nodegpu228` doesn’t match that.

---

<div class="post-metadata">

**Author:** ![walidabualafia](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/walidabualafia/32/1962_2.png) [@walidabualafia](https://discourse.openondemand.org/u/walidabualafia)\
**Post date:** [November 6, 2023, 9:57pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/5 "2023-11-06T21:57:33Z")

</div>

I tried the following, and all give the same 404 error:

```auto
host_regex: '[^/]+'
host_regex: '[\w.-]'
host_regex: '[\w.-]+'
host_regex: '[\w.-]+\.institution\.org'

```

I’m confused as to why the default is not working, should map to all alphanumeric chars until it sees “/”. Is there a way for me to check what the host value is resolving to after applying `host_regex`?

---

<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:** [November 6, 2023, 10:04pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/6 "2023-11-06T22:04:14Z")

</div>

Sorry - you’re reconfiguring the yaml file - did you bounce httpd to be sure it takes affect? You can grep through the .conf files to see if it’s actually showing up for apache.

---

<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:** [November 6, 2023, 10:05pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/7 "2023-11-06T22:05:32Z")

</div>

> [@walidabualafia](#):
>
> `host_regex: '[\w.-]+'`

This is very permissive and seems like it should work (for just about anything lol) which leads me to think the configs aren’t being updated in apache.

---

<div class="post-metadata">

**Author:** ![walidabualafia](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/walidabualafia/32/1962_2.png) [@walidabualafia](https://discourse.openondemand.org/u/walidabualafia)\
**Post date:** [November 6, 2023, 10:28pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/8 "2023-11-06T22:28:05Z")

</div>

Aha! I had forgotten to bounce httpd, thanks for the heads up.

I got a new error, using `host_regex: '[\w.-]+'`. The new error reads:

```auto
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: DNS lookup failure for: nodegpu237

```

A quick google search shows this: [Solved: Proxy Error Apache Proxy SSL](https://community.atlassian.com/t5/Jira-questions/Proxy-Error-Apache-Proxy-SSL/qaq-p/1511654). Seems like it’s in the right direction, but I’m confused where to add the “/” that is mentioned in the answer.

Have you seen this error before?

Thanks for your prompt help and support, Jeff! 😄

---

<div class="post-metadata">

**Author:** ![walidabualafia](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/walidabualafia/32/1962_2.png) [@walidabualafia](https://discourse.openondemand.org/u/walidabualafia)\
**Post date:** [November 6, 2023, 10:34pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/9 "2023-11-06T22:34:38Z")

</div>

I actually just realized that the hostname is not is `/etc/hosts`! 😱 lol

I will add it and let you know if that resolves the issue. I have a keen feeling this might be the issue.

---

<div class="post-metadata">

**Author:** ![walidabualafia](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/walidabualafia/32/1962_2.png) [@walidabualafia](https://discourse.openondemand.org/u/walidabualafia)\
**Post date:** [November 6, 2023, 10:48pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/10 "2023-11-06T22:48:15Z")

</div>

That was the solution. Once I could directly ssh from the OOD host VM to the compute node, Jupyter spun up! Thanks again, @jeff.ohrstrom

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [May 4, 2024, 10:48pm UTC](https://discourse.openondemand.org/t/having-trouble-configuring-jupyter-on-ood-not-found-the-requested-url-was-not-found-on-this-server/3085/11 "2024-05-04T22:48:43Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
