Rstudio app works BUT each session begins with a single auth failure that must be ignored

Hiya everyone,

We’re running centos 6 and slurm 19, and are one OOD release behind.
I just setup the RStudio interactive app but am quite perplexed by this reproducible and ignorable authentication error that follows immediately after clicking “Connect to RStudio Server” for each session:

Error: Incorrect or invalid username/password

One can simply go back to the OOD tab and click the button again (with or without closing this goofy error tab) and every subsequent connection to that session works great!

The only logs that seem connected that we’ve so far seen:

___tailing <computenode>:/var/log/messages___
Jan  8 17:14:24 cn68 nslcd[3328]: [456249] nslcd_passwd_byname(): invalid user name
Jan  8 17:14:24 cn68 rserver[67254]: ERROR system error 13 (Permission denied) [user-value=]; OCCURRED AT: rstudio::core::Error rstudio::core::system::user::{anonymous}::userFrom(const rstudio_boost::function<int(T, passwd*, char*, long unsigned int, passwd**)>&, T, rstudio::core::system::user::User*) [with T = const char*] /var/lib/jenkins/workspace/IDE/open-source-pipeline/v1.2-patch/src/cpp/core/system/PosixUser.cpp:107; LOGGED FROM: std::string rstudio::server::pam_auth::{anonymous}::userIdentifierToLocalUsername(const string&) /var/lib/jenkins/workspace/IDE/open-source-pipeline/v1.2-patch/src/cpp/server/ServerPAMAuth.cpp:178
Jan  8 17:14:24 cn68 rserver[67254]: WARNING No PAM password provided for user ''; refusing login; LOGGED FROM: bool rstudio::server::pam_auth::pamLogin(const string&, const string&) /var/lib/jenkins/workspace/IDE/open-source-pipeline/v1.2-patch/src/cpp/server/ServerPAMAuth.cpp:456
_____________________________________________

…and just as a reminder, clicking the button from this point on works perfectly fine without touching anything else. Like magic!

This may or may not be related to a much less reproducible issue that might happen on a per-browser basis: After clicking the “Launch” button at the session setup form, and being bounced to https://ondemand.hpc.nau.edu/pun/sys/dashboard/batch_connect/sys/RStudio/session_contexts
…Instead of seeing “Session was successfully created” in a friendly green box, we’ll see “This app does not supply a sub app form file under the directory ‘/var/www/ood/apps/sys/RStudio/local’” in a hangry red box.

Since at this step, it seems it hasn’t yet generated a valid session, our ondemand node itself has some logs:

___tailing ondemand:/var/log/secure___
Jan  8 17:05:43 ondemand sudo:   apache : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/opt/ood/nginx_stage/sbin/nginx_stage pun -u jtb49 -a https%3a%2f%2fondemand.hpc.nau.edu%3a443%2fnginx%2finit%3fredir%3d%24http_x_forwarded_escaped_uri
Jan  8 17:07:28 ondemand sudo: pam_unix(sudo:auth): authentication failure; logname=jtb49 uid=129387 euid=0 tty=/dev/pts/1 ruser=jtb49 rhost=  user=jtb49
Jan  8 17:07:28 ondemand sudo:    jtb49 : TTY=pts/1 ; PWD=/var/www/ood/apps/sys/RStudio ; USER=root ; COMMAND=/usr/bin/tail -n 500 /var/log/messages
Jan  8 17:08:53 ondemand sudo:    jtb49 : TTY=pts/1 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/tail secure
______________________________________

Is this familiar to anyone?
Best next steps?

Thanks very much!
Jason Buechler
NAU Monsoon

Do you happen to use CAS authentication? If so, this topic below will be helpful, if not the answer.

Even if you don’t use CAS, it may be worth looking though this anyhow for information about how these apps use the passwords they’re given. It may give you ideas on how to troubleshoot, what files to look for, html elements to inspect, what API calls in your browser to look at and so on.

Let me know if that’s helpful!

1 Like

Ooh thank you for the tip! We do indeed use CAS, and I’ll dig into that thread right this second!

You nailed it, Jeff! We were missing those CASScope entries in the config, and it now runs like a dream. Thanks so much!
–jason

PS: it seemed this was the root cause of both of the issues. Double win!