Vishnu
Vishnu

Reputation: 110

Getting auth sign message when connecting cloud server using opencpu

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 "[email protected]"

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 "[email protected]" 

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

Upvotes: 1

Views: 109

Answers (2)

Vishnu
Vishnu

Reputation: 110

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.

Upvotes: 0

Ralf Stubner
Ralf Stubner

Reputation: 26833

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.

Upvotes: 1

Related Questions