Can't load 'RhinoCommon' on Rhino Compute production server

Hello Rhino developers,

I’m having issues when sending HTTP requests to the production server. Whenever I attempt a simple Postman request, my responses time out.

Below is the error log from “C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\rhino.compute\logs\log-rhino-compute-20240118.txt” on the server:


{
  "Timestamp": "2024-01-18T12:38:49.5354232+00:00",
  "Level": "Error",
  "MessageTemplate": "An exception occurred",
  "RenderedMessage": "An exception occurred",
  "Exception": "System.IO.FileLoadException: Could not load file or assembly 'RhinoCommon, Version=7.0.20314.3000, Culture=neutral, PublicKeyToken=552281e97c755530' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))\r\nFile name: 'RhinoCommon, Version=7.0.20314.3000, Culture=neutral, PublicKeyToken=552281e97c755530' ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at RhinoInside.Resolver.FindRhinoSystemDirectory()\r\n   at RhinoInside.Resolver.get_RhinoSystemDirectory()\r\n   at RhinoInside.Resolver.ResolveForRhinoAssemblies(Object sender, ResolveEventArgs args)\r\n   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)\r\n   at compute.geometry.OwinSelfHost.Start(HostControl hctrl)\r\n   at Topshelf.Builders.ControlServiceBuilder`1.ControlServiceHandle.Start(HostControl hostControl)\r\n   at Topshelf.Hosts.ConsoleRunHost.Run()\r\n\r\n",
  "Properties": { "SourceContext": "Topshelf.Hosts.ConsoleRunHost" }
}


Does anyone know how I can troubleshoot this?

I’m still having trouble figuring it out, but I assume it’s related to the step-1 bootstrap that can’t install Rhino.

At C:\Users\abadi\AppData\Local\Temp\tmpa6f3.tmp\bootstrap_step-1\module_rhino.ps1:58 char:32
+ ...  [Version] (get-itemproperty -Path HKLM:\SOFTWARE\McNeel\Rhinoceros\7 ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKLM:\SOFTWARE\...ros\7.0\Install:String) [Get-ItemProperty], 
ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
get-itemproperty : Cannot find path 'HKLM:\SOFTWARE\McNeel\Rhinoceros\7.0\Install' because it does not exist.
At C:\Users\abadi\AppData\Local\Temp\tmpa6f3.tmp\bootstrap_step-1\module_rhino.ps1:58 char:32
+ ...  [Version] (get-itemproperty -Path HKLM:\SOFTWARE\McNeel\Rhinoceros\7 ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKLM:\SOFTWARE\...ros\7.0\Install:String) [Get-ItemProperty], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand``

Are you saying that Rhino didn’t get installed during the bootstrap installation? If that is the case, then yes, it would be causing a problem as it wouldn’t have installed all of the necessary Rhino files needed to run Rhino.Compute. You can check just by checking whether a Rhino app is available in the Windows search bar (or by checking the C:/ drive for the bootstrap_step-1_log.txt file to see if there were any errors during installation).
To fix this, you’ll need to reinstall Rhino. You can do this by running the Rhino Update script, or by simply downloading it from the main Rhino 8 download site. However, we’ll need to provide a proper license since this will be installed on a Windows Server VM. In order to do this, click on this guide and follow the steps under Using Core-Hour Billing. You’ll have to use a small power-shell command to enter the license information into the environment variables because the token is so large and you won’t be able to enter it manually using the standard environment variable dialog.
Once you’ve installed Rhino and properly set your auth token as an environment variable, try launching Rhino by clicking on the Rhino icon. If everything starts up correct and a license is found, then you should be all set. You may need to restart your IIS server, but hopefully that will fix the issues you’ve been seeing.

Thanks a lot Andy- I manually installed Rhino, and it resolved the issue. The bootstrap script was not installing Rhino for some reason. I’m not sure if that’s related to the type of server I’m using, but installing Rhino manually worked for me. I’m using a Google Cloud Virtual Machine, which is slightly different from what you suggested, but I haven’t seen any other problems using it.

1 Like