epacke / BigIPReport

Overview of your loadbalancer configuration
https://loadbalancing.se
8 stars 2 forks source link

Rest-Api Receive-Job (device name) error message #168

Closed sloanster4000 closed 3 years ago

sloanster4000 commented 4 years ago

The following handled errors was thrown during the execution

Category Linenumber Line Stacktrace
PropertyNotFoundException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at Get-LTMInformation, : line 1011 at GetDeviceInfo, : line 1712 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1682 at , : line 1745
PropertyNotFoundException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1632 at , : line 1745
PropertyNotFoundException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at Get-LTMInformation, : line 1011 at GetDeviceInfo, : line 1712 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1630 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1622 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1622 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1622 at , : line 1745
PropertyNotFoundException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at Get-LTMInformation, : line 1011 at GetDeviceInfo, : line 1712 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1682 at , : line 1745
HttpResponseException 1771 At C:\inetpub\bigipreport\bigipreport.ps1:1771 char:17 + $lines=Receive-Job -Job $job + ~~~~~~~~ at GetDeviceInfo, : line 1622 at , : line 1745
sloanster4000 commented 4 years ago

As a note I switched from IP's to hostnames

timriker commented 4 years ago

can you try running against the one machine? ./bigipreport.ps1 example.xml loadbalancer.example.com

sloanster4000 commented 4 years ago

When I run it with just one listed no issues. By introducing a second I see the issue. You thinking we have a race condition going on here?

timriker commented 4 years ago

I'm trying to expose the errors from the child to the parent process, but it's not working so far. You see the child errors reported when the parent tries a Receive-Job call. The error gets reported on that line, and not on the original line. Kind of a pain. :(

sloanster4000 commented 4 years ago

In the current state when these errors happen, it generates an email error notification and the end user would be unsure how to resolve. == not useful error message.

timriker commented 4 years ago

I agree. The forked model does not effectively capture the errors/warnings in the child processes. I've tried a number of things, but still not really happy with it. :(

timriker commented 4 years ago

I'm handling some errors explicitly now. It's better, but we likely still have a ways to go.