att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
432 stars 142 forks source link

Missing execution token, requesting authentication... #2732

Closed js1642 closed 4 years ago

js1642 commented 4 years ago

Hi, I'm building a standalone rcloud installation on RHEL7.4, R3.5.2 and rcloud 2.2.0. I've gotten other installs running before, and we have rc1.8 on RHEL7.4 running in another environment. So the title says it all. I get the login page just fine, submit my credentials, then "Missing execution token, requesting authentication..." flashes, and then brought back to the login page, http://localhost:18181/rcloud.html?redirect=%2Fedit.html. I'm attaching a text file of the tailing of /var/log/messages. This is through a tunnel via vpn now, hence localhost. In #2692, @gordonwoodhull offered some debugging info that could be made available, I would certainly appreciate any and all tips. Also mentioned was an installation script. If that could be shared,that would be great. Another point. In preparing for an install, since our target boxes are on a private network, I install rcloud on a network facing box, and run scripts/bootstrapR.sh --mk-dist. Recently this has been failing with "Error: (converted from warning) unable to access index for repository http://r.research.att.com/src/contrib: cannot open URL 'http://r.research.att.com/src/contrib/PACKAGES' Execution halted" Can't ping r.research.att.com either. Is this still a recommended method to get the required packages?

exectoken.txt

gordonwoodhull commented 4 years ago

Hi @js1642, looks like a whole lot of questions here!

Let's start with the execution token problem. One probable cause for this is not your cookie domain set correctly. Please try setting Host: to the canonical name of your server in rcloud.conf.

As for r.research.att.com, I'm not sure why this is down, but if you have access to the Internet, any CRAN mirror will do. According to https://github.com/att/rcloud/issues/2710#issuecomment-581614291 it redirects tohttps://cloud.R-project.org outside the AT&T firewall.

I guess you are following these instructions:

https://github.com/att/rcloud/blob/develop/doc/INSTALL.md

We have scripts for this but I am not sure how general purpose they are. Same goes for "debugging info" - unfortunately there are many, many different ways to configure RCloud so nothing is one-size-fits-all.

js1642 commented 4 years ago

Hi @gordonwoodhull, thanks for the quick reply. Here's my rcloud.conf: Host: myhost1.att.net Cookie.Domain: myhost1.att.net gist.backend: gitgist gist.git.root: ${ROOT}/data/gists rcs.engine: redis Welcome.page: /rcloud.html session.server: http://127.0.0.1:4301 rserve.socket: ${ROOT}/run/qap rcloud.jupyter.python.path:/bin/python3.6 solr.url: http://127.0.0.1:8983/solr/rcloudnotebooks rcloud.alluser.addons: rcloud.viewer, rcloud.enviewer, rcloud.notebook.info, rcloud.htmlwidgets, rcloud.rmd, rcloud.flexdashboard, rcloud.shiny, rcloud.rcap rcloud.languages: rcloud.r, rcloud.jupyter, rcloud.rmarkdown, rcloud.sh compute.separation.modes: IDE Exec.auth: pam Exec.match.user: login Exec.anon.user: nobody

With r.reseach down, I substituted it with cloud.R-project.org, and then bootstrap mk-dist completed. I reinstalled the dist-repos and did scripts/bootstrap.sh, but still am getting the missing exectution token.

I have followed https://github.com/att/rcloud/blob/develop/doc/INSTALL.md, and used that as the basis for my own script.

gordonwoodhull commented 4 years ago

Hmm, the execution token problem usually has something to do with RCloud not being able to find its own cookies.

In your browser, please check the cookies to be sure they are being set, and the host matches.

In Chrome Developer Tools, go to the Application tab, then expand Cookies on the left.

In Firefox Developer Tools, go to the Storage tab and expand Cookies on the left.

The entry in the left menu should match your domain, as should the Domain column of the "token" and "user" fields. The "token" should be a hexadecimal hash, and the "user" should be be your username.

gordonwoodhull commented 4 years ago

Your original comment talks about localhost:18181 which does not match myhost1.att.net, so I wonder if that has something to do with it.

js1642 commented 4 years ago

No cookies being set, as per the Chrome Application tab. Within the hosts file on my laptop, I've set 127.0.01 myhost1.att.net, and used myhost1.att.net:18181/rcloud.html, and the same result. Again, I'm tunneling with putty through vpn, so that adds whatever layers, but I believe this has worked in the past. Within the lab, we use ldap for host resolution, not DNS. I was having this issue while in the lab, with a workstation on the same subnet as myhost1.

gordonwoodhull commented 4 years ago

Okay, how about if you go to the Network tab, enable the "Preserve log" checkbox, and then login.

Does the response to login.R have Set-Cookie: headers, and if so, does the domain exactly match what is in the address bar?

I believe that if this does not match, then the browser will refuse to set the cookie.

js1642 commented 4 years ago

Success! My brain is somewhat fried. I had a typo in the laptop/hosts file. The only exception showing in the network log is an evaluation error, 500 for MathJax. Looking at my install, I used MathJax3.0, and I know there was an issue, and you've stepped down to 2.7.7 believe. I'll reload that. Thank you very much for your help. I'll be back with questions about migrating notebooks from gitgist to gist-service, if that is possible.

Again, Thank You.

gordonwoodhull commented 4 years ago

Great!!!

Yes I can’t recall the specific problem but we are pinning to MathJax 2.7.7 on develop, commit 570ee40dbed67cbf8e44d3501b6e1a8d955044e4

And yes I’ll be glad to help you migrate those notebooks too.