Getting auth sign message when connecting cloud server using opencpu - r

I am trying to expose a sample r model as API so I created R package. In my local machine , I am able to get the output using the command :
curl http://local host/5656/ocpu/library/mypackage/R/tv/json -F "input=#test.csv"
But when I am trying the same in my AWS linux cloud server on CentOS , I am not getting the output. I tried the command :
curl 13.228.109.233:8787/p/5656/ocpu/library/mypackage/R/tv/json -F "input=#test.csv"
and I get the output as
http://13.228.109.233:8787/auth-sign-in?appUr‌​i=%2Fp%2F5656%2Focpu‌​%2Flibrary%2Fmypacka‌​ge%2FR%2Ftv%2Fjson .
The R package is loaded into the my R studio server and I am trying to access it using putty. I installed the open cpu using the command :
yum install opencpu-server
It looks like it is asking for some authentication but I am not able to get what it means. Am I missing something here?
Thanks

If one visits the URL with a browser, one sees the RStudio-Server login screen. And indeed, you are connecting to port 8787, which is the default port for Rstudio Server. Try URLs below http://13.228.109.233/ocpu/ instead.

As Ralf suggests, that was the error , I was giving the wrong URL . Also, whenever we install opencpu in CentOS , just doing a 'yum install opencpu-server' might not be sufficient. We need to execute the entire built script: https://github.com/opencpu/opencpu-server/blob/master/rpm/buildscript.sh
Without executing the build script , I was not able to connect to opencpu server.
Just in case someone gets the same issue.

Related

R connection via Proxy

I am working in a Windows on-premise server which needs a proxy to establish network connection. I have installed R (4.2.0) and now I need to install some packages. However, every time I try to run the command install.packages("dplyr") for instance, I got an error like:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
I have looked for some suggestions and what I find most is to define the environment variables http_proxy or https_proxy. I have tried to put http_proxy="http://someproxy.aaa.aa:1111/" in the Rprofile file (or directly in the console with Sys.setenv) with or without user:password but I get always the same error.
I wonder if the call is using those proxy settings since it never affects the outcome. I am not even sure if I am setting correctly because the error message is always the same.

Installing the windows patch using PSWindowsUpdate

I am trying to install windows updates using PSWindowsUpdate module in powershell as:
Get-WindowsUpdate -Install -KBArticle 'KB4560960' and hit enter key but i am not getting any response. Then for confirmation whether the update has been installed or not i used Get-Hotfix command in powershell then it has displayed a list in that list the above update is not their. How to install the specific update using PSWindowsUpdate module in powershell.
After you install the module and then import it you can run the following command:
PS C:\Install-WindowsUpdate -MicrosoftUpdate -KBArticleID KB4560960 -AcceptAll -IgnoreReboot
It will show the progress of the install or you can type at the PS prompt.
Get-WUHistory. Keep in mind, you can't install updates with PSWindowsUpdates on remote boxes directly. Will have to use a Task Scheduler—which, in combination with Windows Admin Center, works beautifully.

R plumber Installation SSH key Error on creating droplet in Digital Ocean

I am trying to deploy R plumber API on digital ocean (DO).
I am using windows 10 and following these steps to create droplets from RStudio. For SSH keys, I am using PuTTY key generator, followed step mentioned here and saved private key in c:/user/myname/.ssh folder and uploaded public key as copy and paste into the Add SSH section as describe here.
The problem I am facing is an “Error please install ssh“ when I am creating a droplet from RStudio.
mydrop <- plumber::do_provision()
I can see the droplet is created on DO control panel, however, when I am copying and pasting the IP address in the browser window to see the results I get “problem loading page” / ” Unable to connect “.
If I am trying to install any other R package, I get the same error,
Error Image :
or if I deploy using this code
plumber::do_deploy_api()
I get the same.
Any help will be highly appreciated.
Thanks
Maybe you already have figured this out. if not, please try installing the ssh package.
install.packages("ssh")

rsession: no process found - R Studio

I am installing R Studio on AWS ec2 instance running Ubuntu. While installation I get an error "rsession: no process found".
After installation I opened "server_ip:8787" in browser, R Studio asked me for login credentials. I am unable to login as it always shows "RStudio initialization error : Unable to connect to server".
In terminal when I enter sudo rstudio-server verify-installation nothing happens.
sudo rstudio-server restart gives rsession: no process found.
I also tried sudo ufw allow 8787 but no success.
you've probably already fix your issue, but have you actually installed R BEFORE RStudio?
I had the same problem (using Hetzner server) and sudo ufw allow 8787 did the trick for me. Thanks!

RStudio Server Initialization Error: Status code 500 returned

When I login to RStudio server installed as an Amazon Machine Image, I, I see the message "RStudio Server Initialization Error" and "Status code 500 returned," as in the screenshot. When I click OK, nothing changes.
What does this mean and how can I fix this?
Refer the following link. It will guide you about the complete installation of R-Studio Server along with required dependencies.
Automated Installation of R-Studio Using Shell Script
It would be useful if you could state which version of RStudio Server you are using. Neverthless, you can try the following:
Install the most recent version using: wget http://download2.rstudio.org/rstudio-server-0.98.1103-amd64.deb. If you want 32-bit version wget http://download2.rstudio.org/rstudio-server-0.98.1103-i386.deb.
Delete the startup files (.Rprofile, .Renviron, and .RData) from your initial working directory, which should be user's home.
Check if you can run R from command line and if your are getting any error messages - fix that first

Resources