2

I am trying to connect R from a browser using opencpu js. I cannot have opencpu in local mode and I need it to run in remote host so that my javascript based app server can be access by multiple users from where bunch of input data needs to be sent to openCPU server and R modules should work independently for each user.

I have a centOS6 instance where I have R installed properly. I have managed to install openCPU as well using the rpm binary https://archive.opencpu.org/centos-6/. The installation was successful but ended with:

sudo rpm -ivh opencpu-server-2.1.0-rpm0.x86_64.rpm
Preparing...                ########################################### [100%]
   1:opencpu-server         ########################################### [100%]
/var/tmp/rpm-tmp.T2qZY9: line 13: systemctl: command not found
/var/tmp/rpm-tmp.T2qZY9: line 14: systemctl: command not found
/var/tmp/rpm-tmp.T2qZY9: line 13: systemctl: command not found
/var/tmp/rpm-tmp.T2qZY9: line 14: systemctl: command not found

,which means the stage where after successful installation the server gets started, has failed as systemctl is not present in centOS.

So my questions are: - what is the best way to start the openCPU server ? - how can i change the port as i don't have all ports open ? - Is this approach of connecting remote openCPU server instance from browser feasible or am I in a wrong direction?

Any pointers would be very helpful.

Thanks in advance.

user2359902
  • 121
  • 1
  • 7
  • Did you installl `opencpu` R package? – Sonny Mar 22 '19 at 18:26
  • Yes. I did install opencpu R package as well in the R 3.5.2 installation. – user2359902 Mar 22 '19 at 18:31
  • `systemctl` replaces `/sbin/service` in CentOS 7.x..The opencpu-server rpm you're using was meant for CentOS 7 not 6. – GoinOff Mar 22 '19 at 18:36
  • does that mean even though rpms are distributed in the centOS 6 folder at https://archive.opencpu.org/centos-6/ it is still meant for using in centOS 7 ? – user2359902 Mar 22 '19 at 18:44
  • It seems that way or could be a bug in the rpm code or someone placed the wrong file in the centos-6 folder. I would email someone at `opencpu.org` and ask them about this. Also, make sure you did download from the centos-6 folder..maybe try the centos-7 download and see if you get the same result??? – GoinOff Mar 22 '19 at 18:48
  • try `rpm -qi opencpu-server` to see if there is any additional information that might help – GoinOff Mar 22 '19 at 18:57
  • Thanks I would email them and also try running on centos 7 if it works. Would you have any idea on where would the app folder be located ? Meaning if there is an opencpu app like https://github.com/rwebapps/appdemo, where exactly should i place it so that i can access it from a remote client machine's browser. – user2359902 Mar 22 '19 at 18:58
  • sudo rpm -qi opencpu-server-2.1.0-rpm0.x86_64.rpm package opencpu-server-2.1.0-rpm0.x86_64.rpm is not installed No more messages come. Not seeing any process for opencpu running when i do sudo netstat -plnt – user2359902 Mar 22 '19 at 19:02
  • Navigate to the `opencpu-server` rpm on your system and try `rpm -qip opencpu-server-2.1.0-rpm0.x86_64.rpm`. See https://stackoverflow.com/questions/3005889/displaying-information-on-non-installed-rpm-package the `systemctl` error has prevented the rpm from installing. – GoinOff Mar 22 '19 at 19:05
  • `sudo rpm -qi opencpu-server` not `sudo rpm -qi opencpu-server-2.1.0-rpm0.x86_64.rpm`. Other than that, I know nothing about opencpu-server so I can't help with app details. – GoinOff Mar 22 '19 at 19:10

1 Answers1

0

You can probably ignore this error. Does this work on your server?

curl http://localhost/opcu/info

What do you see if you run sudo apachectl restart?

Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207