Problem: During Import You are Getting a Traceback with Reason "Forbidden"

Problem: During Import you are Getting a Traceback with the Reason “Forbidden”.

Environment

UCS 4.x with ucs@school installed

Interner Server-Fehler in "schoolimport/ping".
Request: schoolimport/ping
 
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 186, in _recv
    self.handle(msg)
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 296, in handle
    self.__handler.init()
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolimport/__init__.py", line 62, in init
    self.client = Client(self.username, self.password, log_level=Client.LOG_RESPONSE)
  File "/usr/lib/pymodules/python2.7/ucsschool/http_api/client.py", line 383, in __init__
    setattr(self, cls_name, kls(self))
  File "/usr/lib/pymodules/python2.7/ucsschool/http_api/client.py", line 475, in __init__
    self.resource_url = self.client.resource_urls[self.resource_name]
  File "/usr/lib/pymodules/python2.7/ucsschool/http_api/client.py", line 393, in resource_urls
    self._resource_urls = self.call_api('get', '.')
  File "/usr/lib/pymodules/python2.7/ucsschool/http_api/client.py", line 466, in call_api
    raise exc(msg, status_code=response.status_code)
PermissionError: Received status_code=403 with reason='Forbidden' for requests.get(**files=None, url=u'https://ucs.multi.ucs/api/v1/', auth=(u'Administrator', u'**********'), headers={u'Accept': u'application/json'}, params=None, data=None).

Solution

Troubleshoot your Kerberos Settings.

Mastodon