Issue deploying RhinoCompute to production server

Hey @AndyPayne ,

I’m running into an issue when trying to access localhost on port 5000—I’m getting an error saying, “API Key was not provided.” I’ve followed all the steps in the guide, but still no luck. Heroku isn’t working either. Could you take a look when you get a chance?

Appreciate the help!

You need to add the RhinoComputeKey header in your request, you chose the Rhinocomputekey when launching the 1st powershell script.
That was not needed locally as there was no server to auth to.

Farouk

@farouk.serragedine yeah i already did that but why its showing this “Spawn children at startup is set to False”


API key is showing in System variables.

So, it looks like you’re trying to launch the Rhino.Compute instance manually, but that is not necessary when you run the bootstrap script. Basically, when you start your VM, IIS will automatically start up and then it will handle starting up your Rhino.Compute instance. You won’t see the console window the way you’re looking at it now, but it is running in the background. Per the documentation, you need to send a valid request to the IP address on your VM, followed by a colon and then the port number 80 (not 5000). So, it might look something like this (http://52.168.38.105:80/) although your IP address will be different. You will also need to include your API key in the request header.

To be honest, the easiest way to simply test if your Rhino.Compute instance is working is to use Hops (on a different machine). Please review this guide, scrolling down to the section called “Testing the app”. In the Hops preferences section, you can provide the URL to your VM and then you can also provide the API key that you set during the bootstrap process. Once you have those two items setup up, drag and drop a Hops component onto your canvas and right-click on it to set the Path. Download the file below and then point the Hops component at this file. It should take a little while on the first request for it to return a valid response. This is because Rhino.Compute is starting up Rhino and Grasshopper which will take some time. But, hopefully after about 30 seconds you should see a valid response and the Hops component should change into a component that has inputs and outputs.
HelloWorld.gh (5.6 KB)

2 Likes