Seahub Page Unavailable 7.0.5

Hello all,

I’ve been using Seafile for more than 4 years without major incident.

I attempted to upgrade from 6.3.4 to 7.0.5, then to 7.1.5 on Ubuntu Server 16.04 in preparation for migrating to 20.04. The first step appeared OK according to the major revision upgrade steps. The second step failed after attempting to do the prerequisite python upgrades. I likely have conflicting packages in Python based on other reading (error in doing the required pip install), but there is no matching pip list for each version of Seafile to verify against.

Attempting to roll back to 7.0.5 or 6.3.4 both cause the same failure. seahub.service will start, but I get Page Unavailable and no connection at all to the data through the web interface or clients.

The traceback in seahub.log:

2021-02-08 05:11:05,667 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/auth/ping/
Traceback (most recent call last):
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/base.py”, line 244, in _legacy_get_response
response = middleware_method(request)
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/termsandconditions/middleware.py”, line 23, in process_request
if not config.ENABLE_TERMS_AND_CONDITIONS:
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/django/utils/functional.py”, line 238, in inner
self._setup()
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/constance/init.py”, line 11, in _setup
self._wrapped = Config()
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/constance/base.py”, line 10, in init
utils.import_module_attr(settings.BACKEND)())
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/constance/backends/database/init.py”, line 34, in init
self.autofill()
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/constance/backends/database/init.py”, line 45, in autofill
if self._cache.get(full_cachekey):
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/django/core/cache/backends/filebased.py”, line 40, in get
if not self._is_expired(f):
File “/opt/seafile/seafile-server-7.0.5/seahub/thirdpart/django/core/cache/backends/filebased.py”, line 137, in _is_expired
exp = pickle.load(f)
ValueError: unsupported pickle protocol: 4

My Seafile instance is basically dead in the water because of this. Any assistance is appreciated. I would prefer to fix this instance first rather than stand up my Ubuntu 20.04 installation and restore the server and database to that since I have not tested 20.04 yet in a production environment. I thought upgrading first on an existing installation (which I have done previously) would be safe!

A follow-up:
While performing unrelated maintenance on the machine hosting this Seafile instance, over the course of several reboots, the error seems to have disappeared. While I was performing this other maintenance, I did not prevent the seafile and seahub services from automatically starting and had intended to go back and shut them off when complete. However, I discovered by accident that clients on other machines connected fine, and a quick test revealed that the web interface was also fine. Checking seahub’s log confirmed the error was gone.

I don’t know if the reboots somehow helped to resolve my suspected Python confusion, but I no longer have this problem. I don’t like the fact that it fixed itself and I do not understand why, but now I know not to try to move on to 7.1 without first upgrading to Ubuntu 20.04 or later.

If anyone has insight into how the errors could have cleared up, I would appreciate it.

Also, relatedly, is there a good step-by-step guide in how to migrate a Seafile instance to a new OS/machine/installation? The general Restore guide in the Seafile manual appears to be the likely solution, but a clearer guide in the form of a how-to might be in order.

Asking a question in a solved thread is somewhat risky. :wink:

I’ve been able to successfully restore seafile on the same machine after a new installation by just copying everything to its original place. Make sure all dependencies are met and you copy everything - especially if you have a different storage location (symlink from seafile-data to some other place on your machine), don’t forget to copy that storage as well.

Good point, but thanks for chiming in anyway!

I have seafile-data pointing at a RAID array mounted in a different location, so I know to be careful with that. It’s something of a testament to the stability of Seafile and the underlying OS that I haven’t had to move my installation to a new OS once in 4 years, so this is the first time really trying.