Issue deploying RhinoCompute to production server

Hi all, I’ve followed the guide to deploy RhinoCompute to a VM. I tried Azure first but ran into some weird issues where RDP connected 1 in every 20 tries. I decided that it wasn’t worth the headache and set up an AWS EC2 instance which has seemingly worked without a hitch (ie. I launched the VM and ran the two bootstrap scripts successfully). However, when I try to test the server by pasting the url and apiKey into the Hops Solver tab, the hops component doesn’t read the inputs or output of a simple grasshopper definition I know to work. Ultimately, I’m trying to use this RhinoCompute server to evaluate a grasshopper definition in a website so I tried setting the url and apiKey and running RhinoCompute.Grasshopper.evaluateDefinition() but I get a 404 response. I don’t know where to look to troubleshoot so I was hoping someone got stuck on the same step or could advise what things to check.

Hmm. Ok. Let’s start at the beginning. Can you log into your VM and see if you can launch Rhino directly (there should be an icon on the desktop). Do you get any errors when launching Rhino? I’d like to confirm that there are no licensing issue when starting Rhino as that will at least let us move onto other areas where there could be a problem.

I don’t get any errors when launching Rhino on the VM

Ok. Great. So we can rule out any licensing issues. Let’s try launching rhino.compute.exe manually and see if there are any errors there.
Go to C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\rhino.compute and launch the rhino.compute.exe program. It should start, but likely won’t get that far… meaning it won’t launch the child processes of compute.geometry.exe. That’s because the “Spawn on startup” flag is set to false by default (which is what we want in this case).
In order to kick off the spawning of the children, we need to send it a valid request. This could be a Hops file, but it could also just be a simple GET request to the /activechildren endpoint. This endpoint simply returns an integer telling you how many children are currently running. It should be zero the first time you hit that endpoint, but by sending that request, it will start the process of launching the children processes. I like to use Postman with this request, but you can use a terminal as well. Here’s a thread where a user had a similar issue. You’ll need to make sure that your API key is provided in the header of the request, otherwise the request will not be authenticated by rhino.compute and the children will not be started.
Can you try these steps and see where we get?

Ok. Running rhino.compute.exe seems to work fine:

Hitting the /activechildren endpoint doesn’t:

And just for sanity’s sake, I checked that getting the VM url does work:

Hmm… Ok, that’s interesting. What happens if you go up one directory from the rhino.compute folder and go into the compute.geometry folder. Can you launch the compute.geometry.exe that’s located there? Does that work?
For a sanity check, there should be 19 items located in the compute.geometry directory.

All 19 files are there. I ran compute.geometry.exe without a problem. While it was running I tried to hit that /activechildren endpoint again but to no avail.

I did try navigating to the url in my browser while it was up and it brought me here whereas before it would show me an IIS Webserver welcome page like this:

The /activechildren endpoint won’t work on the compute.geometry.exe… it’s a registered endpoint for the rhino.compute.exe… which is why you’re getting a 404 when trying to hit that when only the compute.geometry.exe is running… However, by the looks of things, it appears as though the compute.geometry.exe is working correctly (it’s loading the rhino/grasshopper plugins, etc.)… so it’s strange that the rhino.compute.exe is having trouble launching the compute.geometry.exe as a sub-process. We may need to setup a zoom call in order to trouble shoot this issue.

If anyone bumps into the same issue, I think the problem was that things were running very slowly because I was using the free tier t2.micro instance and that the first bootstrap script failed to complete. I upgraded the instance type, followed the steps in the guide, and it worked without hitch. Or at least so I thought, no idea if it’s related but I’ve now run into a another problem with my compute server.