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

400 Error when trying to poll API for systems #34

Open
mdvickst opened this issue Aug 1, 2017 · 6 comments
Open

400 Error when trying to poll API for systems #34

mdvickst opened this issue Aug 1, 2017 · 6 comments

Comments

@mdvickst
Copy link
Contributor

mdvickst commented Aug 1, 2017

Customer is running the sat6Inventory against a satellite 6.1.7 server and keeps hitting 404 errors. Have tried with supplying orgid and with supplying no org info. Always fails in first step in gathering hosts/systems.

[sat6Inventory-master]# ./sat6Inventory.py -s satellite.corp.com -l admin --orgid=1 -d
admin's password:
[DEBUG] LOGIN -> admin
[DEBUG] SATELLITE -> satellite.corp.com
[DEBUG] ORG ID -> 1
[DEBUG] ORG NAME -> None
================================================================================
[VERBOSE] Connecting to -> https://satellite.corp.com/api/status
================================================================================
[VERBOSE] API Version -> 1
Fetching systems for org 'ORG' (id: 1)
================================================================================
[VERBOSE] Connecting to -> https://satellite.corp.com/katello/api/v2/organizations/1/systems?page=1&per_page=100
Error: cannot connect to the API: HTTP Error 400: Bad Request
Check your URL & try to login using the same user/pass via the WebUI and check the error!
@evgeni
Copy link
Member

evgeni commented Aug 1, 2017

That's not a 404, that's a 400. Can we have a slice of production.log when the issue is happening?

@evgeni
Copy link
Member

evgeni commented Aug 2, 2017

I got the logs via private mail, but could not find anything interesting intere :(

@evgeni
Copy link
Member

evgeni commented Aug 3, 2017

Got more logs, had a hunch, but could not reproduce on my local 6.1.11 (that's the only 6.1 I have).

Could you check in your setup please, that the user that you are using (admin) has a default location and a default organisation set in the preferences?

@mdvickst
Copy link
Contributor Author

mdvickst commented Aug 8, 2017

Is your theory that the admin user does not have a default location and organisation set which might be causing the issue?

@evgeni
Copy link
Member

evgeni commented Aug 9, 2017

Yes that's my theory.

@mdvickst mdvickst changed the title 404 Error when trying to poll API for systems 400 Error when trying to poll API for systems Aug 14, 2017
@mdvickst
Copy link
Contributor Author

@evgeni The default organization has been set for the admin user. For locations, 2 have been assigned but no default location was specified.

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