Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.

Omnicore virtual controller (RW7) web service change to http in appweb.conf doesn't work

Hi all,

I recently started development on Omnicore project. I have created an robot simulation with RW7 Omnicore. And I would like to use the web service as I did in the past for RW6. 

And I found online that Omnicore is can support https and http where you just need to modify the parameter on appweb.conf listen port.
https://forums.robotstudio.com/discussion/12180/how-to-get-started-with-robot-web-services-and-jog-a-robot-via-rest-api-requests

I tried to change the first parameters from:
#Listen -1
ListenSecure -1

to

Listen -1
#ListenSecure -1

But when I use Listen instead of ListenSecure, after reboot the virtual controller, I have error on controller

Picture uploaded to this link  https://ibb.co/hmH2RKy

It doesn't have any issue when I switch back to ListenSecure. 

May I know did Omnicore required particular option to enable web service? 

And I couldn't find the virtual controller listening port from the netstat -aon | FindStr command as thread below. I am only able to get a response if I try on the robotstudio.exe PID instead of RobotVC.exe
https://forums.robotstudio.com/discussion/12177/how-to-change-the-listening-port-of-the-virtual-controller-robotware-6-x-and-7-x

And the webservice command doesn't work on the robotstudio.exe listening port.

Thanks for the help in advance.

Comments

  • Hello there,

    Thanks for pointing out some mistakes in the initial post. I have now corrected the post to contain correct information for OmniCore.

    So if you want OmniCore to listen on HTTP as well as HTTPS, you'll have to uncomment the Listen -1 and change the -1 to some open port. I wouldn't recommend disabling HTTPS on OmniCore as that would cause RobAPI exceptions in RobotStudio.

    Then, regarding "netstat -aon | FindStr", you should find the process Vrchost64.exe for OmniCore controllers instead and use that pid in the command.

    Maxim Riabichev
    PC Software Support Engineer
  • Thanks Maxim,

    I am able to see the virtual controller listening port based on Vrchost64.exe

    My next roadblock is I tried a few command but all of them return with error 401 unauthorized. 

    I am using username : Default User; password: robotics 

    my curl command : curl -u "Default User":robotics "http://127.0.0.1:51000/rw/elog

    I set my listen port to 51000 and below is my netstat response on Vrchost64.exe PID

    C:\Users\Boon Ping Lai>netstat -aon | FindStr 12608
      TCP    0.0.0.0:5466           0.0.0.0:0              LISTENING       12608
      TCP    0.0.0.0:50424          0.0.0.0:0              LISTENING       12608
      TCP    0.0.0.0:51000          0.0.0.0:0              LISTENING       12608
      TCP    127.0.0.1:5466         127.0.0.1:52874        ESTABLISHED     12608
      TCP    127.0.0.1:5466         127.0.0.1:53095        ESTABLISHED     12608
      TCP    127.0.0.1:50424        127.0.0.1:50427        ESTABLISHED     12608
      TCP    127.0.0.1:50424        127.0.0.1:52873        ESTABLISHED     12608
      TCP    [::]:5466              [::]:0                 LISTENING       12608
      TCP    [::]:51000             [::]:0                 LISTENING       12608
      UDP    0.0.0.0:55682          *:*                                    12608
      UDP    127.0.0.1:55683        *:*                                    12608



    My URL GET command response

    HTTP/1.1 401 Unauthorized
    Vary: Accept-Encoding
    Keep-Alive: timeout=300, max=2147483646
    Content-Type: text=html
    X-Content-Type-Options: nosniff
    Date: Fri, 29 Nov 2024 01:25:31 GMT
    Cache-Control: no-cache
    Content-Length: 29
    X-XSS-Protection: 1; mode=block
    Connection: Keep-Alive
    WWW-Authenticate: Basic realm="validusers@robapi.abb"
    Accept-Ranges: bytes

    HTTP/1.1 406 Not Acceptable
    Set-Cookie: -http-session-=17::http.session::b6949b46571ffdc79d0d2d957e8e2560; path=/; domain=127.0.0.1; httponly; SameSite=None
    Set-Cookie: ABBCX=1769482; path=/; domain=127.0.0.1; httponly; SameSite=None
    Vary: Accept-Encoding
    Keep-Alive: timeout=300, max=2147483645
    Content-Type: application/xhtml+xml;v=2.0
    X-Content-Type-Options: nosniff
    Date: Fri, 29 Nov 2024 01:25:31 GMT
    Cache-Control: no-cache="set-cookie", max-age=0, no-cache, no-store
    Content-Length: 413
    X-XSS-Protection: 1; mode=block
    Connection: Keep-Alive
    Pragma: no-cache
    Expires: -1
    Accept-Ranges: bytes

    ?xml version="1.0" encoding="UTF-8"? 
    html xmlns="http://www.w3.org/1999/xhtml
    head 
        base href="http://127.0.0.1:51000/
    head 
    body 
       div class="status"  span class="code">-1073414146
       span
    class="msg">C:\a\1\s\S0.01.Kernel\Areas\RobApi2\Components\rws_rapid\rws_resource_rapid_modules.cpp[62] Server cannot generate response for given accept header code:-1073414146 icode:-1 
       span
    div
    body
    html

    Is this due to unauthorized account login?
  • It looks like the headers aren't correctly setup. The post you linked to in your initial post covers required header settings.

    Maxim Riabichev
    PC Software Support Engineer