Seafile Professional Server Upgrade 7.1.4 --> 7.1.6 breaks installation

Hello seafile-community,

I am running Seafile Professional Server 7.1.4 on Ubuntu in our corporate environment.

Unfortunately I have a problem upgrading the software beyond 7.1.4.

I always used this document in order to perform upgrades:
seafile-server-manual/deploying-seafile-under-linux/upgrade-seafile-server

When I run the minor-upgrade.sh script from the software .tar.gz package as seafile user the script will hang at “migrating avatars” and nothing more happens.

When I run the script as root it finishes within seconds without any errors but it leaves my installation broken (white page when trying to open seafile in browser) and I have to restore the virtual machine’s snapshot in order to repair the installation.

What can I do in order to do a successful upgrade? I had zero problems with upgrading in the past.
Are the new software packages broken?

Any help is greatly appreciated.

Thanks in advance.

Best regards
Philipp Albrecht

Had on previous upgrade similar problem where a user helped me: It’s all about file permissions and ownership. So when you extract the 7.1.6 version ensure the ownership is that of your seafile user, not root. And same for the script, do not run as root.

Thanks for your response.

I tried the upgrade again and made sure that I extract the .tar.gz as seafile user (ownership of all setup files is seafile).
Because you mentioned that the problem can be permission/ownership I also checked all directories before running the script. There were 2 files in avatars folder which were owned by root.
Changing that caused the script to run without errors using the seafile user.

Unfortunately it still results in a broken installation.

Now I am getting a login page with only the background image and no login form.

I checked the files and the ownership seems to be right for all of them. (No files owned by root).

Plus: when my installation is working perfectly fine on 7.1.4 the ownership/permissions have to be correct, right?
So it would be a strange thing if running 7.1.6 upgrade as seafile user breaks permissions/ownership.

I think the problem lies somewhere else.

Kindly asking for some more advices / hints if somebody can help.

Best regards

//EDIT: here is a screenshot showing the problem which the upgrade produces:


[login-form-missing-screenshot.jpg]

As you are running Ubuntu: If you use systemd to start seafile make sure you have updated the services files to link to the new location 7.1.6 (symbolic links don’t work with system files)?
And as an other step is to check the seafile logfiles on the server.

Thanks for your reply!

I checked the service file and that one does not seem to be the problem as it always points to the current seafile folder:
ExecStart=/home/seafile/seafile/seafile-server-latest/seafile.sh start
ExecStop=/home/seafile/seafile/seafile-server-latest/seafile.sh stop

The script seem to have updated the symbolic link correctly:
seafile@seafile:~/seafile$ ls -al | grep ‘seafile-server-latest’
lrwxrwxrwx 1 seafile seafile 24 Aug 10 16:15 seafile-server-latest -> seafile-pro-server-7.1.6

I then checked the log files and I found some errors in the seahub.log file indeed:

2020-08-10 14:20:05,279 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 30, in sendall
    n = fd.send(data[offset:])
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 33, in process_request
    if request.user.is_authenticated() and not request.user.is_active:
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 23, in __get__
    request._cached_user = get_user(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/__init__.py", line 120, in get_user
    user = backend.get_user(username) or AnonymousUser()
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub-extra/seahub_extra/django_cas_ng/backends.py", line 26, in get_user
    user = User.objects.get(email=username)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/base/accounts.py", line 95, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/client.py", line 126, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 101, in call_remote_func_sync
    ret_str = transport.send(self.service_name, fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 62, in send
    sendall(self.pipe, header)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 32, in sendall
    raise NetworkError('Failed to write to socket: %s' % e)
pysearpc.errors.NetworkError: Failed to write to socket: [Errno 32] Broken pipe
2020-08-10 14:20:05,535 [WARNING] django.request:152 get_response Not Found: /favicon.ico
2020-08-10 14:20:06,078 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:06,078 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:06,746 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:06,746 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:07,323 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:07,324 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:07,864 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:07,865 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:08,312 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 30, in sendall
    n = fd.send(data[offset:])
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 33, in process_request
    if request.user.is_authenticated() and not request.user.is_active:
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 23, in __get__
    request._cached_user = get_user(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/__init__.py", line 120, in get_user
    user = backend.get_user(username) or AnonymousUser()
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub-extra/seahub_extra/django_cas_ng/backends.py", line 26, in get_user
    user = User.objects.get(email=username)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/base/accounts.py", line 95, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/client.py", line 126, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 101, in call_remote_func_sync
    ret_str = transport.send(self.service_name, fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 62, in send
    sendall(self.pipe, header)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 32, in sendall
    raise NetworkError('Failed to write to socket: %s' % e)
pysearpc.errors.NetworkError: Failed to write to socket: [Errno 32] Broken pipe
2020-08-10 14:20:08,407 [WARNING] django.request:152 get_response Not Found: /favicon.ico
2020-08-10 14:20:09,443 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 30, in sendall
    n = fd.send(data[offset:])
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 33, in process_request
    if request.user.is_authenticated() and not request.user.is_active:
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 23, in __get__
    request._cached_user = get_user(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/__init__.py", line 120, in get_user
    user = backend.get_user(username) or AnonymousUser()
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub-extra/seahub_extra/django_cas_ng/backends.py", line 26, in get_user
    user = User.objects.get(email=username)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/base/accounts.py", line 95, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/client.py", line 126, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 101, in call_remote_func_sync
    ret_str = transport.send(self.service_name, fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 62, in send
    sendall(self.pipe, header)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 32, in sendall
    raise NetworkError('Failed to write to socket: %s' % e)
pysearpc.errors.NetworkError: Failed to write to socket: [Errno 32] Broken pipe
2020-08-10 14:20:09,558 [WARNING] django.request:152 get_response Not Found: /favicon.ico
2020-08-10 14:20:10,109 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:10,109 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:10,678 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:10,679 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:11,201 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 30, in sendall
    n = fd.send(data[offset:])
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 33, in process_request
    if request.user.is_authenticated() and not request.user.is_active:
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 23, in __get__
    request._cached_user = get_user(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/__init__.py", line 120, in get_user
    user = backend.get_user(username) or AnonymousUser()
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub-extra/seahub_extra/django_cas_ng/backends.py", line 26, in get_user
    user = User.objects.get(email=username)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/base/accounts.py", line 95, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/client.py", line 126, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 101, in call_remote_func_sync
    ret_str = transport.send(self.service_name, fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 62, in send
    sendall(self.pipe, header)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 32, in sendall
    raise NetworkError('Failed to write to socket: %s' % e)
pysearpc.errors.NetworkError: Failed to write to socket: [Errno 32] Broken pipe
2020-08-10 14:20:11,282 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /favicon.ico
Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 30, in sendall
    n = fd.send(data[offset:])
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py", line 244, in _legacy_get_response
    response = middleware_method(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 33, in process_request
    if request.user.is_authenticated() and not request.user.is_active:
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/middleware.py", line 23, in __get__
    request._cached_user = get_user(request)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/auth/__init__.py", line 120, in get_user
    user = backend.get_user(username) or AnonymousUser()
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub-extra/seahub_extra/django_cas_ng/backends.py", line 26, in get_user
    user = User.objects.get(email=username)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seahub/seahub/base/accounts.py", line 95, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/client.py", line 126, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 101, in call_remote_func_sync
    ret_str = transport.send(self.service_name, fcall_str)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 62, in send
    sendall(self.pipe, header)
  File "/home/seafile/seafile/seafile-pro-server-7.1.4/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 32, in sendall
    raise NetworkError('Failed to write to socket: %s' % e)
pysearpc.errors.NetworkError: Failed to write to socket: [Errno 32] Broken pipe
2020-08-10 14:20:11,741 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:11,741 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:12,163 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:12,163 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:12,559 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:12,560 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:12,988 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:12,988 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:13,388 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:13,389 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:13,815 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:13,815 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:14,184 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:14,184 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:14,587 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:14,587 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:14,958 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:14,958 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:15,376 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:15,376 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:15,761 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:15,761 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:16,161 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:16,161 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:16,583 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:16,583 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:17,000 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:17,000 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:17,385 [ERROR] seahub.views:1132 react_fake_view [Errno 111] Connection refused
2020-08-10 14:20:17,385 [ERROR] seahub.views:1140 react_fake_view [Errno 111] Connection refused

These errors get written to the log file when the service is started.
There seem to be references to the old version 7.1.4 as in some log file lines “/home/seafile/seafile/seafile-pro-server-7.1.4” is in the file path.
I can’t understand why this is the case because like I said in the original post: updates in the past always succeeded.

Any hints on how to fix the old reference would be greatly appreciated.

Thanks!

Best regards

You can easily check if your service files have an issue by starting seafile manually with

…/seafile-server-latest/seafile.sh start
…/seafile-server-latest/seahub.sh. start

If I remember correctly symbolic links in service files are not well supported with systemd. If the above works I would just edit the service files with the real link and try again. And then play further with them to see which would really work. Don’t forget to “daemon-reload” as you change the files.

Thanks for helping me.

I only looked at the seafile service earlier but the problem in fact was the seahub service.

Best regards