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

Expecting value - Error on import #17

Open
metalcated opened this issue Feb 6, 2021 · 1 comment
Open

Expecting value - Error on import #17

metalcated opened this issue Feb 6, 2021 · 1 comment

Comments

@metalcated
Copy link

metalcated commented Feb 6, 2021

2021-02-06 08:06:19,956 :: DEBUG :: https://foreman.domain.com:443 "GET /katello/api/v2/errata?per_page=99999 HTTP/1.1" 200 115
2021-02-06 08:06:19,963 :: DEBUG :: Starting new HTTPS connection (1): foreman.domain.com:443
2021-02-06 08:07:20,066 :: DEBUG :: https://foreman.domain.com:443 "GET /katello/api/v2/packages?per_page=99999 HTTP/1.1" 502 425
Traceback (most recent call last):
  File "./centos-errata-katello-importer.py", line 117, in <module>
    rpms = katello.get_repository_packages(all_repositories[repo_release][repo]['id'])
  File "/usr/scripts/katello-centos-errata-import/modules/katelloerrata/katello.py", line 97, in get_repository_packages
    return(self._get_json('packages', data, None))
  File "/usr/scripts/katello-centos-errata-import/modules/katelloerrata/katello.py", line 61, in _get_json
    return r.json()
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from Nonejson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@steve--d
Copy link

steve--d commented Jul 9, 2021

Similar issue on Katello 3.17, we were a few versions behind and got up to 3.17 and noticed new security updates were not available for the last week - did you find a solution @metalcated ?

Edit: the underlying issue was the apache proxy was timing out the request, default is 60 seconds and first run after an update was ~8.5 minutes to retrieve /katello/api/v2/errata?per_page=99999 on our system.

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