PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Remote Process Control  (Read 1775 times)

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Remote Process Control
« on: July 27, 2018, 03:15:05 AM »
Hi,
   How can we use PROCESS SERVER directive for Remote Process Control. we tried the code as like this:

       
         PROCESS SERVER "inventory" ON "[tcp]xxx.xxx.xxx.xx;80"
         CALL "[RPC]:inventory]RPCTest"
         PROCESS SERVER "inventory" CLOSE
   
   error:


         PROCESS SERVER "inventory" ON "[tcp]xxx.xxx.xxx.xx;80"
         Error #15: Operating system command failed
         Last file accessed [tcp]xxx.xxx.xxx.xxx;80
         Current program is C:\PxPlus\xxxx\xx\RPCTestCode, line 20
         [TCP][Winsock]Error status:0 (-1:<Unk>)


   please let us know what happening here, what is the solution for this.


Thank you,
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.

Stéphane Devouard

  • Diamond Member
  • *****
  • Posts: 122
  • PxPlus guru with skills in PHP, JS, C#, Java
    • View Profile
    • Stéphane's Web Resume
Re: Remote Process Control
« Reply #1 on: July 27, 2018, 04:54:36 AM »
Again, there is a page dedicated to RPC in the On-Line Documentation I pointed you to in another forum thread, reading it carefully should give you some insight...

https://manual.pvxplus.com/PXPLUS/Remote%20Process%20Capability/Introduction.htm

xxx.xxx.xxx.xxx in "xxx.xxx.xxx.xxx;80" obviously needs to be replaced by the IP address of the server where the RPC host program is running and listening
80 in "xxx.xxx.xxx.xxx;80" is the TCP/IP port on which the RPC host program on the remote server is supposed to listen -- chances are that you'll have another program with this port already in use (maybe IIS on Windows, maybe Apache on Linux), so you'll have to use another port.

To sum it up:
- First, have the *RPSRVR program running on a remote computer on your network and listening on an available IP port (e.g. 15000)
- On another server, use the PROCESS SERVER statement to establish a connection between your "Inventory" logical name and the physical IP & Port of the RPC server, as in "[tcp]192.168.1.11;15000" (again this is an example, the IP address must be the one of the computer where *RPSRVR is running)
- To call a program on the remote server, do a CALL "[rpc:Inventory]RPCTest"

Hope that helps
Stéphane Devouard
Portfolio | Work

Prajin P K

  • Silver Member
  • ***
  • Posts: 21
  • Beginner in PvxPlus
    • View Profile
Re: Remote Process Control
« Reply #2 on: July 30, 2018, 09:36:34 AM »
Hi Stephane,


    I have tried as like you mentioned, now its able to execute RPC call from my system. thank you so much for great help.
Prajin P K
Software Engineer,
World Source Infotech,
Bangalore, India.