ADFS - Internal Server Error: /api2/account/info/

Hi all,

I have some problems with ADFS after following this guide on my test-machine with Seafile Pro.
https://manual.seafile.com/deploy_pro/adfs.html

https://myurl/saml2/metadata/ doesnt work. (Error 500) and results in:
Sorry, but the requested page is unavailable due to a server hiccup.

OS: Ubuntu 16.04 with Seafile Pro Ubuntu 6.3.6.

2018-10-19 15:19:12,986 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/seahub/api2/base.py", line 23, in dispatch
    response = super(APIView, self).dispatch(*a, **kw)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/views.py", line 466, in dispatch
    response = self.handle_exception(exc)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/seahub/api2/base.py", line 20, in handle_exception
    return super(APIView, self).handle_exception(exc)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/views.py", line 454, in dispatch
    self.initial(request, *args, **kwargs)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/views.py", line 376, in initial
    self.perform_authentication(request)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/views.py", line 310, in perform_authentication
    request.user
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/request.py", line 353, in __getattribute__
    return super(Request, self).__getattribute__(attr)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/request.py", line 193, in user
    self._authenticate()
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/rest_framework/request.py", line 316, in _authenticate
    user_auth_tuple = authenticator.authenticate(self)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/seahub/api2/authentication.py", line 62, in authenticate
    ret = self.authenticate_v2(request, key)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/seahub/api2/authentication.py", line 89, in authenticate_v2
    token = TokenV2.objects.get(key=key)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/db/models/query.py", line 374, in get
    num = len(clone)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/db/models/query.py", line 232, in __len__
    self._fetch_all()
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/db/models/query.py", line 1118, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
  File "/home/seafile/seafile-pro-server-6.3.6/seahub/thirdpart/django/db/models/sql/compiler.py", line 899, in execute_sql
    raise original_exception
OperationalError: no such table: api2_tokenv2

What am i doing wrong?

Ok, found it:
‘cert_file’: path.join(CERTS_DIR, ‘certs/idp.crt’), # from IdP
= without certs/ :frowning:
‘cert_file’: path.join(CERTS_DIR, ‘idp.crt’), # from IdP

It works. Install libxmlsec1 AND install xmlsec1:
Binary in ubuntu 16.04: XMLSEC_BINARY = ‘/usr/bin/xmlsec1’