Logs in compute

Hi!
This post is directly related to this one but it didn’t get answers.
I have three questions concerning the way the logs work on compute:

  • Is there a way to find these logs for the distant server? They appear in the command prompt window on local server but i can’t seem to find the right logs folder.
  • I have a few examples where components have a different behaviour whether they are run with the GH GUI or on a compute server (even local). Is this a known issue?
  • Is there a way to make the errors that appear in red non blocking the way it is with the GUI? In the GUI when i have a red error it just blocks the downstream but what’s non dependant on the component still runs, on compute it just blocks the whole process: is there a way to change that in the parameters?

Thanks in advance, best


[NOTA] First point was solved, please find solution on original post

Hi!
Anybody has an idea about that please, @AndyPayne maybe?
Thanks :slight_smile:

The logs on a production server (ie. VM) can be found at C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\rhino.compute\logs

You would need to provide an example file for us to be able to see what’s going on.

Rhino.Compute should try to return any data that it can even if an error is found. However, you have a bunch of errors in that console output, which means that likely no data is winding up at the end of your definition to be returned by Rhino.Compute. I think you will need to figure out why those errors are occurring. Most of them look like they have “failed to collect data” errors which can sometimes occur if you are trying to reference some geometry from a document. Remember, Rhino.Compute is a headless environment which means there is no document to get data from… So you would likely need to pass any referenced geometry in as a parameter, or internalize the geometry for those references.

Hi @AndyPayne,
Thanks for your replies. I’ll try to answer each one of your questions separately.


  1. About the logs

This is not exactly the same: i get templates about the launch of Grasshopper

While i’m looking for something the logs both the launch and specific events, as seen here on my local compute server. Do i miss something?


  1. Different behaviours.

I’ll let you know when i get some more, but i already have a simple example of a component acting differently with or without the GUI here with the issue of a panel not being able to be converted to a float in compute.


  1. Rhino compute returning nothing

Except if i miss something, the compute server doesn’t return anything, and i am well aware of the need to internalize geometries, we are using this on a few models :slightly_smiling_face:. Please see example below: with the GUI, i do have the cubes correspondig to first object appearing.

With the appserver requesting the local server, here’s what i get in the browser (and no “Object” returned as when it works):

This corresponds to this error in the compute cmd interface:

CG  [13:44:03 DBG] Logging to C:\Users\quent\AppData\Local\Temp\Compute\Logs
CG  [13:44:03 INF] Child process started at 03/10/2024 13:44:03
CG  [13:44:05 INF] Compute 8.0.0.0, Rhino 8.9.24194.18121
CG  [13:44:05 DBG] Rhino system directory: C:\Program Files\Rhino 8\System
CG  [13:44:10 DBG] Hosting starting
CG  [13:44:25 INF] (1/3) Loading rhino scripting plugin
CG  [13:44:25 INF] Successfully loaded scripting plugin
CG  [13:44:25 INF] Configured scripting plugin for compute
CG  [13:44:25 INF] (2/3) Loading grasshopper
CG  [13:44:46 INF] (3/3) Loading compute plug-ins
CG  [13:44:46 DBG] Found module compute.geometry.FixedEndPointsModule
CG  [13:44:46 DBG] Found module compute.geometry.RhinoGetModule
CG  [13:44:46 DBG] Found module compute.geometry.RhinoPostModule
CG  [13:44:46 DBG] Found module compute.geometry.ResthopperEndpointsModule
CG  [13:44:47 INF] Now listening on: http://localhost:5000
CG  [13:44:47 INF] Application started. Press Ctrl+C to shut down.
CG  [13:44:47 INF] Hosting environment: Production
CG  [13:44:47 INF] Content root path: C:\Users\quent\Documents\Git\compute.rhino3d\src\bin\Debug\compute.geometry
CG  [13:44:47 DBG] Hosting started
CG  [13:44:54 DBG] Using cached definition
CG  [13:44:56 ERR] Data conversion failed from Text to Number: component "Center Box" (ec268e8b-f7cb-4c34-8cc0-bf5f6504689d)

And to this one in the local instance of webapp (VS Code debug terminal)

GET /view/Tests%3Enon_working_component.gh 200 3515.476 ms - -
GET /solve/Tests%3Enon_working_component.gh?number_of_cubes=10 400 2252.916 ms - -

Please find sample model here:
non_working_component.gh (9.8 KB)


Hope my answers are clear, feel free to ask for any precision, this is a big topic for us.

Thanks in advance, best

Quentin

Hey guys,

Bouncing back on the subject, I understand that the behavior for red errors is to block the output on Compute, but I noticed that when the red error is inside a cluster, the solution is computed flawlessly. Any insights on this ? Bug turned feature maybe :smiley: ? Can this behavior be generalized ?

GH file representing this:
first_cube_ghuser_red_clustered.gh (18.1 KB)

Screenshots of the clustered error:



Screenshots when the same error is on the main canvas:


Cheers,
Abdo

1 Like

To my knowledge, Rhino.Compute doesn’t stop if it encounters an error. It should return all of the values that it can, and add any errors that it finds on components to an array or error messages that get included in the response back to the client. Let’s look at an example.


Here you can see I’m simply going to add two input numbers and return the result. However, I’m also passing the input number from B into the Boundary Surfaces component which will thrown an error because it’s looking for a curve and I’m passing it a number. Now let’s look at the result.

You can see that the output is still giving me a value of 0.5 (which is correct), but it is also giving me an error message that says:

Data conversion failed from Number to Curve: component "Boundary Surfaces" (add417ee-df1c-42c5-ad2d-3281298284a3)

This all makes sense.

Not sure if there is a misunderstanding, but if we take @Quentin1 's example, and run it locally, the red error is clearly blocking the solution (screenshot below). Of course in the GUI, you would have both outputs showing up, one correctly, the second one with an error.
image

Here is the log when computing a working solution:
image

Hi there,

I totally agree with @abdoey96’s observation, that i tried to describe here:

From what i see,

  • Only orange errors in the GUI → Logged in the compute terminal but the solution is computed nontheless
  • Red errors in the GUI → Logged in the compute terminal with a red ERR, solution is not computed and compute returns a 400 status code.

I believe the error about the failed number conversion coming into the Center Box component is solely because Rhino.Compute isn’t properly deserializing the nested Hops definition coming from a URL path on a remote github server. If this was set to a local path, then I believe this would work and you would not get any errors. I am trying to work on a fix for this, but it is tricky to debug as I was able to replicate the error locally and then fix it… but when I deployed this to a production environment, it still failed and I’m still looking into why this is occurring.

Hi Andy,

I think there are two different topics.

  1. The one discussed here (that we are also discussing privately) about hosting a Hops definition on a remote server, and it not being properly deserialized
  2. The one discussed on this exact thread about ERR issues: when we have a “RED” error with the GUI, it prevents compute.rhino from returning anything.

Maybe the issues are linked but to my understanding those are two separate topics. What @abdoey96 and i have noticed is that, even with a vanilla compute.rhino, a vanilla appserver, and the non_working_definition being stored in the local “files” folder of the appserver, compute.rhino doesn’t return anything (see vs code’s console, vs’s console and webpage below)

Hope this clarifies the two points.

Best