Web interface connection problem

Hello,

I’ve got some problem with one user. He can connect to our Seafile server with some differents accounts via web interface. He got a “Page Unvailable” response.

We try :

  • empty browser cache
  • change browser
  • add CONSTANCE_DATABASE_CACHE_BACKEND = None (as mention in https://github.com/haiwen/seafile/issues/1602)
  • restart memcached and restart services to empty server cache
  • Seafile client work for this user and accounts
  • Others accounts can work too, in the same machine/browser
  • we try to delete the involved users from Seafile admin panel and recreate it

The only thing different that I can see, is the avatar of the user, which is a figure with a red “?”.

Any idea of the problem ? It seems that something is not deleted properly, the avatar maybe ? and cause some problems…

This involve a question about : account deleting… what is being deleted when we do “Delete” button in Admin panel ?
There is a way to delete completely a user ?

Some system informations :

  • CentOS 7.3
  • Mariadb 10.1 Galera
  • Cluster memcached
  • Seafile Pro 6.0.4

Some log from seahub_django_request.log :

2017-01-24 14:26:28,326 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: / Traceback (most recent call last): File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/directory/seafile-pro-server-6.0.4/seahub/seahub/auth/decorators.py", line 27, in _wrapped_view return view_func(request, *args, **kwargs) File "/directory/seafile-pro-server-6.0.4/seahub/seahub/base/decorators.py", line 40, in _decorated return func(request, *args, **kwargs) File "/directory/seafile-pro-server-6.0.4/seahub/seahub/views/__init__.py", line 815, in libraries }, context_instance=RequestContext(request)) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/shortcuts.py", line 45, in render_to_response using=using) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/loader.py", line 115, in render_to_string template_name, context, context_instance, dirs, dictionary) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/engine.py", line 221, in render_to_string return t.render(context_instance) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 210, in render return self._render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 202, in _render return self.nodelist.render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 905, in render bit = self.render_node(node, context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 919, in render_node return node.render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/loader_tags.py", line 135, in render return compiled_parent._render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 202, in _render return self.nodelist.render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 905, in render bit = self.render_node(node, context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 919, in render_node return node.render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/loader_tags.py", line 65, in render result = block.nodelist.render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 905, in render bit = self.render_node(node, context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 919, in render_node return node.render(context) File "/directory/seafile-pro-server-6.0.4/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/template/base.py", line 1197, in render return func(*resolved_args, **resolved_kwargs) File "/directory/seafile-pro-server-6.0.4/seahub/seahub/avatar/templatetags/avatar_tags.py", line 27, in avatar_url avatar = get_primary_avatar(user, size=size) File "/directory/seafile-pro-server-6.0.4/seahub/seahub/avatar/util.py", line 113, in get_primary_avatar avatar.create_thumbnail(size) File "/directory/seafile-pro-server-6.0.4/seahub/seahub/avatar/models.py", line 90, in create_thumbnail orig = self.avatar.storage.open(self.avatar.name, 'rb').read() AttributeError: 'NoneType' object has no attribute 'read' 2017-01-24 14:26:28,571 [WARNING] django.request:170 get_response Not Found: /favicon.ico

Hi @Romain, plz log into Seahub database, try delete record with that user in avatar_avatar table.

Is this error log before or after u delete that user in system admin panel ?

Hi,

Thank you for your response, I delete records of avatar_avatar. And now the user can connect properly.
Do you know what happen ? Is there a problem with avatar management ? How can we prevent this from happening again?

I think that’s happen before, but I’m not 100% sure… :confused: