microsoft / DSCEA

DSC Environment Analyzer (DSCEA) is a simple implementation of PowerShell Desired State Configuration that uses the declarative nature of DSC to scan systems in an environment against a defined reference MOF file and generate compliance reports as to whether systems match the desired configuration.
https://microsoft.github.io/DSCEA
Other
197 stars 41 forks source link

DSCEAScans #68

Closed kinkster closed 5 years ago

kinkster commented 6 years ago

I get this error when I have several hosts. Start-DSCEAscan -MofFile C:\w10localhost.mof -InputFile C:\output.txt -Force -OutputPath \server\test\

It works for up to 200 hosts in output.txt and then after that I started to see these errors.
Receive-Job : Cannot bind argument to parameter 'Job' because it is null. At C:\Program Files\WindowsPowerShell\Modules\DSCEA\1.2.0.0\Functions\Start-DSCEAscan.ps1:322 char:37

Attempted to divide by zero. At C:\Program Files\WindowsPowerShell\Modules\DSCEA\1.2.0.0\Functions\Start-DSCEAscan.ps1:364 char:9

kinkster commented 6 years ago

The error happens here. It works without issue for 360 hosts but the next jump to 435 hosts consistently fails. I have played with -scantimeout set to 600 up to 12000 and jobtimeout from 10 up to 75

VERBOSE: DSCEA Scan has started Receive-Job : Cannot bind argument to parameter 'Job' because it is null. At C:\Program Files\WindowsPowerShell\Modules\DSCEA\1.2.0.0\Functions\Start-DSCEAscan.ps1:322 char:37

VERBOSE: Connectivity testing complete

rkyttle commented 6 years ago

Are you using any custom resources in your configuration? Can you provide how many items you are trying to scan?

kinkster commented 6 years ago

Hi Ralph

The actual MOF is quite basic. I am only using the service and registry resources. No custom resources. 9 services 3 registry

From: Ralph Kyttle [mailto:notifications@github.com] Sent: Thursday, June 21, 2018 1:48 PM To: Microsoft/DSCEA DSCEA@noreply.github.com Cc: Kenneth Inkster kinkster@securednet.ca; Author author@noreply.github.com Subject: Re: [Microsoft/DSCEA] DSCEAScans (#68)

Are you using any custom resources in your configuration? Can you provide how many items you are trying to scan?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/DSCEA/issues/68#issuecomment-399221532, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfENPwepW6MSUe_gsqBW5b9deGlaGWlCks5t-_iLgaJpZM4UuRlD.

This electronic message contains information which may be confidential or privileged. The information is intended for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the original sender of this email.

kinkster commented 6 years ago

This was done on a Win7 system. I have moved it to a 2012R2 server and seems to be consistent

rkyttle commented 6 years ago

You mentioned earlier, "The error happens here. It works without issue for 360 hosts but the next jump to 435 hosts consistently fails."

For the 75 systems that you are adding which brings things to 435, are you able to successfully perform a scan against those systems on their own?

kinkster commented 6 years ago

Yes, I could run against a much smaller number and have consistent successful scans. I thought the issue was the amount of systems being scanned. It could still be, I was able to run against 422 hosts no problem.

From: Ralph Kyttle [mailto:notifications@github.com] Sent: Monday, June 25, 2018 10:13 PM To: Microsoft/DSCEA DSCEA@noreply.github.com Cc: Kenneth Inkster kinkster@securednet.ca; Author author@noreply.github.com Subject: Re: [Microsoft/DSCEA] DSCEAScans (#68)

You mentioned earlier, "The error happens here. It works without issue for 360 hosts but the next jump to 435 hosts consistently fails."

For the 75 systems that you are adding which brings things to 435, are you able to successfully perform a scan against those systems on their own?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/DSCEA/issues/68#issuecomment-400172329, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfENP0RzjHxtdpRNmrr2AlW4b59NwLElks5uAbS7gaJpZM4UuRlD.

This electronic message contains information which may be confidential or privileged. The information is intended for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the original sender of this email.

kinkster commented 5 years ago

I moved script to 2012 R2 server. Seemed to work fine for close to 1000 hosts for 5 weeks. Now scan fails with no errors just a scan timeout. Number of hosts varies but around 400. What also is common is that Jobs complete: 398 of 400 (Two jobs are usually unfinished) is where it typically will hang and timeout. Threads go from 28 to 1482.

kinkster commented 5 years ago

So turns out those two jobs were issues with winrm. Previous to the scan I would do a test-wsman. This was not good enough. I had two hosts that would not allow me to winrm. I guess the -timeout option should have worked in this instance.