Local network: Can't access Compute IP from other computer

Hi all,

I am able to successfully run Compute on my windows machine and send requests to it from the same machine.

However, I can not access Compute from another machine on the same network. I set the IP address in the compute.rhino3d/src/compute.geometry/Config.cs file on line 44. Should I be doing something else?

AFAIK I am running a ‘Development’ environment (developing and testing code, local network, no windows server) and should therefor not set up CPU billing.

Greetings,
TVG

Hello. You should not need to change any of the Rhino.Compute code. Please follow these steps:

  1. If you have not already, please pull the latest Rhino.Compute repo src and build the solution.
  2. Set the following Environment Variable:
  1. Open a new powershell console and navigate to the Rhino.Compute build output. It should be in a path like C:<path on your computer>\compute.rhino3d\src\bin\Debug\rhino.compute
  2. run Rhino.Compute by typing rhino.compute and pressing enter.
  3. Allow access to the Windows Firewall:
  4. After rhino.compute starts, you should be able to connect to the machine hosting rhino.compute from another machine on the same network by using the machine’s IP address and the 5000 port. For example: http://192.168.0.21:5000.

Please let us know if you run into any issues.

edit 2022.11.23: on W11 I had to manually set up the firewall rule

1 Like

Hi Luis,

Thanks for the message. Is the above part of the documentation? Just wondering if there’s resources I have missed!

Thanks

Nope. We are in the process of putting up a guide for this.

1 Like

Hi,

I’ve been attempting something similar but even after following your steps, I’m having issues connecting to the rhino Compute IP. I’ve set up the app server to run on a digital ocean droplet and have been trying to test out the connection with my local running version of Compute. I’ve whitelisted the 5000 port for both inbound and outbound traffic in my firewall and modem settings, but still no dice. The solution doesn’t work even if I try accessing it through the same network and machine by running the app server on localhost.

For both cases, I can see that the request has gone through to Compute and that it sent a response. However, on the app server side, I keep getting the same error; VM2796:1 Uncaught (in promise) SyntaxError: Unexpected token ‘e’, “error in solve” is not valid JSON. Checking the code the debug console gives me this; message: ‘Cannot read properties of null (reading ‘split’)’. So it looks like the response is an empty JSON that it can’t process.

It does work however if I run both of them on localhost, then the connection is fine, so I’m assuming there is still some network issue I’m not quite getting. @fraguada if you could shed some light on this issue I would be extremely grateful!

Cheers

Hi Tina,

Similar issue here, put outbound and inbound rules on both computers, not just for the exe but also the port number but still not luck. This is what I get - Bad Request - Invalid Hostname. @fraguada if you could have a look that would be great thanks!

Cheers