Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit to Smartgroup computer objects when JSSImporter runs verification #186

Open
Will-l88 opened this issue Oct 15, 2020 · 5 comments
Open

Comments

@Will-l88
Copy link

Hi,
When running JSSImporter with the switch --key STOP_IF_NO_JSS_UPLOAD=False to update an existing smartgroup/policy/package

I am getting the following error:

JSSImporter: Looking for ComputerGroup template file SmartGroupTemplatel.xml...
JSSImporter: Found file: /Users//Library/AutoPkg/RecipeOverrides/SmartGroupTemplate.xml
Response Code: 504 Response: https://
**.jamfcloud.com/JSSResource/computergroups/id/562.
Failed.

However if I delete the smartgroup it works perfectly fine.
If I manually change the smartgroup first to have less computer object it also works.

When it works FYI:

JSSImporter: Looking for ComputerGroup template file SmartGroupTemplate.xml...
JSSImporter: Found file: /Users/****/Library/AutoPkg/RecipeOverrides/SmartGroupTemplate.xml
JSSImporter: ComputerGroup ID '562' verified on server
JSSImporter: ComputerGroup 'Software Not Installed - ******' updated.

I believe the issue may be a limit set on the number of computer objects in the smart group the script has to verify, is this the case ? Currently in the smart group there are around 2500 computers.

Thanks very much,

@grahampugh
Copy link
Member

Hi, that's an interesting theory. Many users have reported this and I produced a patch which ignores the 504 error. If you use the package here, you should not get the error:

https://github.com/jssimporter/JSSImporter/releases/tag/v1.1.2-patch

@Will-l88
Copy link
Author

Hi, thanks very much for the quick response. I've checked the Jamf thread (https://www.jamf.com/jamf-nation/discussions/36631/classic-api-problem-uploading-computer-groups) and it does seem to be very similar issue but I'm getting 504 but the fix mentions 502.

Before I try it, do you happen to know if its related, just want to be sure as the patch will be potentially installed on our production / live system.

@grahampugh
Copy link
Member

Ah, yes you are right, this patch only works around 502 errors, not 504. I'm not sure there is anything that can be done about 504 as it is a genuine timeout error. We usually only see this with the package upload. I did some testing about trying to increase timeout limits but the Jamf servers do not seem to allow it.

You could try ignoring all 504 errors as well as 502 I suppose and see if that works. To do this you need to edit the following file:

/Library/AutoPkg/JSSImporter/jss/jamf_software_server.py

Change line 440 to:

        elif response.status_code == 502 or response.status_code == 504:

@Will-l88
Copy link
Author

Perfect, that seems to have done the trick.

So potentially this may get resolved when/if Jamf do an update on their end ?

@grahampugh
Copy link
Member

I think 504 is a more fundamental issue, that I would be surprised if got fixed soon. I've asked for feedback on the 502 a couple of times and got tumbleweed. I think I'll roll this change into a new release... watch this space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants