All Apps and Add-ons

R Analytics : Error "Invalid top level api: /ocpu"

bgdalevich
New Member

After R Analytic deployment and configuration when I tried to run a simple script I received this error message " Invalid top level api: /ocpu" (in output window) . I already checked R and opencpu on my RHEL 6 and its look ok
I would appreciate if you can provide any feedback if you already experienced this kind of issue.
Thank you,
Boris,

When I tried to run simple script by using R Analytic GUI str(dataset); print(dataset) I got error message in output windows above data preview "Invalid top Level api: /ocpu". I already checked R on my RHEL 6 and it looks Ok. I also checked opencpu by curl -L -v http://myserver/ocpu/library and by checking http:/myserver/ocpu/test. All components look Ok. Please, can you let me know if this kind of error message was part of your initial configuration.
Thank you,
Boris

0 Karma
1 Solution

gwobben
Communicator

Hi Boris,
Glad it works, feel free to post as many questions as you like. Would you mind accepting the answer so other people can see this is solved?
Kind regards,
Gijs

View solution in original post

0 Karma

bgdalevich
New Member

Thank you again,
Boris,
P.S,
I just submitted another one and would appreciate if you can check it.
Regards,

0 Karma

gwobben
Communicator

Hi Boris,
Glad it works, feel free to post as many questions as you like. Would you mind accepting the answer so other people can see this is solved?
Kind regards,
Gijs

0 Karma

bgdalevich
New Member

I made this change and error message is gone, thank you.
I am planning to open new case because still can not see correct output and would appreciate if you can review it.
Thank you again,
Boris,I made this change and error message is gone. Thank you,
Boris
P.S.
I am planning to open another case because can not confirm correct output and would appreciate if you can review it.
Thank you again

0 Karma

gwobben
Communicator

Hi Boris,

According to the OCPU code, this error occurs when an invalid endpoint is called (which means the url doesn't exist).

res$notfound(message=paste("Invalid top level api: /", reqhead, sep=""))

Source: https://github.com/opencpu/opencpu/blob/master/R/httpget.R

My guess is that you included "/ocpu" in your configuration? That would result in a url like this: http://[your server]:[your port]/ocpu/ocpu.

0 Karma

bgdalevich
New Member

Hi Gijs,
I tried to modify url as you said by applying baseurl = http://mycomputer:8004/ocpu/ocpu entry under
/opt/splunk/etc/apps/ita_r/localrsetup.conf and it did not help. Of course I reloaded deployment to make it active. I also tried to browse IE by using http://mycomputer:8004/ocpu/ocpu and it does not work too, the same time I can get opencpu initial page (HTTP request option) by using original reference http://mycomputer:8004/ocpu. May I ask you to provide another check methods that can confirm connectivity between your app and opencpu that is located on another server.
Thank you,
Boris. P.S. I tried full DNS and shot comp names , still same result

0 Karma

gwobben
Communicator

I think you misunderstood. Try the otherway around: http://mycomputer:8004

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...