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

Issues after moving to new server: only hitting a certain number of items #134

Open
ctsamuraix opened this issue Jan 30, 2025 · 5 comments

Comments

@ctsamuraix
Copy link

ctsamuraix commented Jan 30, 2025

We recently moved our snipe-it server to a new server and I was able to copy everything over but when I run the script to check our jamf instance, it will query a few items then when it hits the first new one, throws the following error. Subsequent runs will successfully pass that item then do the same for the next it seems. The original server still works fine without errors. Matching config file, just adjusted the url for the new server.

Image

@ctsamuraix
Copy link
Author

Initially I had just copied the directory from the old to the new, and just in case redownloaded a fresh version to see if that made a difference, but no luck.

@ParadoxGuitarist
Copy link
Collaborator

Are you running the script from the same host?

The real issue is that there's a key that's getting injected on this line from the payload you're trying to upload:

for key in payload:

Which sounds like a config issue somewhere around line 950. I'd run this in debug and find out where that snipeit inventory script 12 is coming from.

@ctsamuraix
Copy link
Author

Looks like that field is a custom one I had pulling. I commented it out just to narrow out why that would be causing an issue, and it seems to run through more of the items in the list, but still ends up failing on other ones eventually.

@mcarras8
Copy link

mcarras8 commented Feb 5, 2025

We suddenly started receiving the same fatal error in our daily syncs, starting on 2/1.

Like @ctsamuraix's case it didn't look like the same item was erroring each time. A few times it was able to sync without issue.

Commenting out all the custom field mappings referenced in the errors seems to allow the sync to function otherwise normally for now.

We haven't made any recent changes to our setup. We are using JAMF Pro Cloud if that helps.

@ParadoxGuitarist
Copy link
Collaborator

That code block probably needs to get wrapped in a try/except to continue, but it's hard to tell without some sort of logs/output for exactly what's gonna be helpful. If either @mcarras8 or @ctsamuraix are up for providing those logs/details, (probably from --debug) it would be helpful.

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

3 participants