dataiku with reverse proxy causes 404 when using notebooks

Solved!
jtobelem
Level 3
dataiku with reverse proxy causes 404 when using notebooks

I follow this post https://doc.dataiku.com/dss/latest/installation/custom/reverse-proxy.html#configuring-a-reverse-prox... to configure dss using a reverse proxy because I need to avoid port number in url. (for security rules).

All is working but I want to use notebooks, I get a 404. It works back when I add the port number in the url, but I have to make it work without the port number.

 

0 Kudos
1 Solution
jtobelem
Level 3
Author

Hi, 

I have solved my issue. I was using a jupyter server, and I set a url prefix '/jupyter' to access to tha server (installed on the same machine as DSS).

But DSS uses this prefix '/jupyter' in its notebooks url, which drive to 404 errors.

I use now a different prefix url in my nginx config for my jupyter server, and evrything is fine.

View solution in original post

7 Replies
sergeyd
Dataiker

Hi @jtobelem 

Is there a chance you can provide backend, ipython and nginx logs (Administration->Maintenance->Log files)? If not -> I would recommend creating a support ticket so we can review that information there. 

Thanks

0 Kudos
jtobelem
Level 3
Author

Hi Sergeyd,

 

Here are the logs. (I remove the audit to save place archive size).

0 Kudos
sergeyd
Dataiker

Hi @jtobelem 

Thanks for providing logs. In the frontend.log.0 indeed I can see these records: 

[2021/11/29-15:00:03] [exyxrfopcm-jtobelem@simplon.co] [DEBUG] [d.s.API]  - [D] GET /jupyter/api/contents/ADMINDSSUSERS/dssadm's Python notebook_1.ipynb (131ms)
[2021/11/29-15:00:03] [exyxrfopcm-jtobelem@simplon.co] [ERROR] [d.logger.$exceptionHandler]  - Caught exception: [object Object] 
Stack:  no stack - string thrown ? 
Caused by :  undefined 
Message : Possibly unhandled rejection: {"data":{"message":"No such file or directory: ADMINDSSUSERS/dssadm's Python notebook_1.ipynb","reason":null},"status":404,"config":{"method":"GET","transformResponse":[null],"jsonpCallbackParam":"callback","url":"/jupyter/api/contents/ADMINDSSUSERS/dssadm's Python notebook_1.ipynb","headers":{"Accept":"application/json, text/plain, */*","X-XSRF-TOKEN":"99efb60052da8198cc640102e2a9ba7d3171dc0676dedf5a8df0e97b3f8d41db"},"xsrfCookieName":"dss_xsrf_token_2df3479d9d7cd9ada11da4480075e686"},"statusText":"Not Found","xhrStatus":"complete"}

This confirms you got that UI 404 response code but this message was returned by your reverse proxy as I do not see this call reached out to the DSS as there were no records in ipython.log or DSS nginx access.log. 

Basically, this behaviour usually means misconfiguration of the reverse proxy. Have you used the same reverse proxy settings we provide in our docs or made customization to them? Or you are using a completely custom reverse proxy setup? 

Just in case, I tried to replicate a similar setup (setting up the reverse proxy based on the sample in our docs) and for now, I cannot replicate the issue.

0 Kudos
jtobelem
Level 3
Author

Hi @sergeyd ,

Thank you for investigating. Here is my nginx config, same as the provided in the link : 

        location /{
                proxy_pass http://backend_dataiku;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header Host $http_host;
                proxy_http_version 1.1;
                proxy_redirect off;
                proxy_buffering off;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_read_timeout 86400;

        }

I also have a specific jupyter config (~/.jupyter/jupyter_notebook_config.py) : 

c.NotebookApp.base_url = 'jupyter/'

But I still have the error if I deactivate this setting. May I post you a link to our server so you can watch the error?

0 Kudos
tgb417

@jtobelem ,

This older post reminds me a bit of your current situation.  It may help.

--Tom
0 Kudos
jtobelem
Level 3
Author

Hi Tom,

 

Thank you for the link, I read it, but this doesn't solve my case. The redirection is ok, the only things that fail is when I try working with notebook in DSS.

0 Kudos
jtobelem
Level 3
Author

Hi, 

I have solved my issue. I was using a jupyter server, and I set a url prefix '/jupyter' to access to tha server (installed on the same machine as DSS).

But DSS uses this prefix '/jupyter' in its notebooks url, which drive to 404 errors.

I use now a different prefix url in my nginx config for my jupyter server, and evrything is fine.