jojo243 / seafile-docker-arm64

Dockerized Seafile Setup for ARM64
MIT License
20 stars 12 forks source link

Seahub fails to start #6

Closed tharkimaa closed 3 years ago

tharkimaa commented 3 years ago

Hi,

Thanks for compiling this image. I'm trying to run sea file on my rPi 4 on Ubuntu Server 20.but I'm getting the following error-

Starting seafile_base  ... done
Starting seafile_mysql ... done
Starting seafile_seafile ... done
Starting seafile_nginx   ... done
Attaching to seafile_base, seafile_mysql, seafile_seafile, seafile_nginx
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] mysqld (mysqld 10.1.48-MariaDB-0+deb9u2) starting as process 1 ...
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
seafile_mysql | 
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Using mutexes to ref count buffer pool pages
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: The InnoDB memory heap is disabled
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Compressed tables use zlib 1.2.8
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Using Linux native AIO
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Using generic crc32 instructions
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Initializing buffer pool, size = 128.0M
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Completed initialization of buffer pool
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Highest supported file format is Barracuda.
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: 128 rollback segment(s) are active.
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB: Waiting for purge to start
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 2999789
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] Plugin 'FEEDBACK' is disabled.
seafile_mysql | 2021-05-15 13:44:28 281472355266608 [Note] InnoDB: Dumping buffer pool(s) not yet started
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] Server socket created on IP: '::'.
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Warning] 'user' entry 'root@d52461e9f0c5' ignored in --skip-name-resolve mode.
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Warning] 'user' entry '@d52461e9f0c5' ignored in --skip-name-resolve mode.
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Warning] 'proxies_priv' entry '@% root@d52461e9f0c5' ignored in --skip-name-resolve mode.
seafile_mysql | 2021-05-15 13:44:28 281472967389184 [Note] mysqld: ready for connections.
seafile_mysql | Version: '10.1.48-MariaDB-0+deb9u2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.13
seafile_seafile | 
seafile_seafile | [05/15/21 13:45:18] ../common/session.c(132): using config file /haiwen/conf/ccnet.conf
seafile_seafile | Starting seafile server, please wait ...
seafile_seafile | ** Message: seafile-controller.c(718): No seafevents.
seafile_seafile | 
seafile_seafile | Seafile server started
seafile_seafile | 
seafile_seafile | Done.
seafile_seafile | 
seafile_seafile | Starting seahub at port 8000 ...
seafile_seafile | Traceback (most recent call last):
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 65, in <module>
seafile_seafile |     run()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 61, in run
seafile_seafile |     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/base.py", line 223, in run
seafile_seafile |     super(Application, self).run()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/base.py", line 72, in run
seafile_seafile |     Arbiter(self).run()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/arbiter.py", line 60, in __init__
seafile_seafile |     self.setup(app)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/arbiter.py", line 120, in setup
seafile_seafile |     self.app.wsgi()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/base.py", line 67, in wsgi
seafile_seafile |     self.callable = self.load()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 52, in load
seafile_seafile |     return self.load_wsgiapp()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
seafile_seafile |     return util.import_app(self.app_uri)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/gunicorn/util.py", line 350, in import_app
seafile_seafile |     __import__(module)
seafile_seafile |   File "/haiwen/seafile-server/seahub/seahub/wsgi.py", line 25, in <module>
seafile_seafile |     application = get_wsgi_application()
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/django/core/wsgi.py", line 13, in get_wsgi_application
seafile_seafile |     django.setup(set_prefix=False)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/django/__init__.py", line 27, in setup
seafile_seafile |     apps.populate(settings.INSTALLED_APPS)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/django/apps/registry.py", line 85, in populate
seafile_seafile |     app_config = AppConfig.create(entry)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/django/apps/config.py", line 94, in create
seafile_seafile |     module = import_module(entry)
seafile_seafile |   File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
seafile_seafile |     __import__(name)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/post_office/__init__.py", line 3, in <module>
seafile_seafile |     from .backends import EmailBackend
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/post_office/backends.py", line 4, in <module>
seafile_seafile |     from .settings import get_default_priority
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/post_office/settings.py", line 95, in <module>
seafile_seafile |     context_field_class = import_attribute(CONTEXT_FIELD_CLASS)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/post_office/compat.py", line 45, in import_attribute
seafile_seafile |     module = importlib.import_module(module_name)
seafile_seafile |   File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
seafile_seafile |     __import__(name)
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/jsonfield/__init__.py", line 1, in <module>
seafile_seafile |     from .fields import JSONCharField, JSONField
seafile_seafile |   File "/haiwen/seafile-server/seahub/thirdpart/jsonfield/fields.py", line 22
seafile_seafile |     def __init__(self, *args, dump_kwargs=None, load_kwargs=None, **kwargs):
seafile_seafile |                                         ^
seafile_seafile | SyntaxError: invalid syntax
seafile_seafile | Error:Seahub failed to start.
seafile_seafile | Please try to run "./seahub.sh start" again
seafile_base exited with code 0

Do you have any ideas here?

jojo243 commented 3 years ago

Hi @tharkimaa,

my guess is that this is a python3-vs-python2-related error. This is because my seafile image is actually based on python2 (shame on me). I am actually working on a more long-lasting solution to get rid of python2 throughout the project. In the meantime, a (hopefully working) quickfix would be to change this line

FROM        arm64v8/python:2-slim-stretch

to

FROM        arm64v8/python:3.7-slim-stretch

inside seafile/Dockerfile. Afterwards, you should rebuild the seafile image with

docker-compose build seafile

If you haven't done anything in seafile yet, it is safe (and probably useful) to clean your previous attemps with

make clean

Let me know if that works.

jojo243 commented 3 years ago

I did some reworking, using the latest commit (also tagged 7.1.5, https://github.com/jojo243/seafile-docker-arm64/releases/tag/7.1.5) you should now get version 7.1.5 of seafile up and running. Note that the configuration file is no longer the docker-compose.yml, but a separate .env file. You need to rename the docker-compose.yml file before you pull and essentially copy your envionment variables from there to the new .env file (The prodedure is also described here).