haiwen / seafile-rpi

Seafile server package for Raspberry Pi.
Other
559 stars 89 forks source link

Seafile does not start after update to 9.0.2 #107

Closed Xalendis closed 2 years ago

Xalendis commented 2 years ago

Error after update states seafile.service - Seafile Loaded: loaded (/etc/systemd/system/seafile.service; enabled; vendor preset: Active: failed (Result: exit-code) since Thu 2022-01-06 12:09:48 CET; 10min a Process: 19758 ExecStart=/home/seafile/seafile-server-latest/seafile.sh start

Jan 06 12:09:45 raspberrypi systemd[1]: Starting Seafile... Jan 06 12:09:45 raspberrypi seafile.sh[19758]: Starting seafile server, please w Jan 06 12:09:45 raspberrypi seafile.sh[19758]: /home/seafile/seafile-server-late Jan 06 12:09:48 raspberrypi seafile.sh[19758]: Failed to start seafile server Jan 06 12:09:48 raspberrypi systemd[1]: seafile.service: Control process exited, Jan 06 12:09:48 raspberrypi systemd[1]: seafile.service: Failed with result 'exi Jan 06 12:09:48 raspberrypi systemd[1]: Failed to start Seafile. lines 1-12/12 (END)...skipping... ● seafile.service - Seafile Loaded: loaded (/etc/systemd/system/seafile.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2022-01-06 12:09:48 CET; 10min ago Process: 19758 ExecStart=/home/seafile/seafile-server-latest/seafile.sh start (code=exited, status=1/FAILURE)

Jan 06 12:09:45 raspberrypi systemd[1]: Starting Seafile... Jan 06 12:09:45 raspberrypi seafile.sh[19758]: Starting seafile server, please wait ... Jan 06 12:09:45 raspberrypi seafile.sh[19758]: /home/seafile/seafile-server-latest/seafile.sh: Zeile 143: /home/seafile/seafile-server-9.0.2/seafile/bin/seafile-controller: Kann die Binärdatei nicht ausführen: Fehler im Format der Program Jan 06 12:09:48 raspberrypi seafile.sh[19758]: Failed to start seafile server Jan 06 12:09:48 raspberrypi systemd[1]: seafile.service: Control process exited, code=exited, status=1/FAILURE Jan 06 12:09:48 raspberrypi systemd[1]: seafile.service: Failed with result 'exit-code'. Jan 06 12:09:48 raspberrypi systemd[1]: Failed to start Seafile.

nihilistaX commented 2 years ago

I never started seafile with systemd, did you try to start seafile + seahub manually? Checked permissions?

jobenvil commented 2 years ago

Jan 06 12:09:45 raspberrypi seafile.sh[19758]: /home/seafile/seafile-server-latest/seafile.sh: Zeile 143: /home/seafile/seafile-server-9.0.2/seafile/bin/seafile-controller: Kann die Binärdatei nicht ausführen: Fehler im Format der Program

For me looks like you choosed the wrong version (armv64 instead arm or viceversa)

Xalendis commented 2 years ago

Jan 06 12:09:45 raspberrypi seafile.sh[19758]: /home/seafile/seafile-server-latest/seafile.sh: Zeile 143: /home/seafile/seafile-server-9.0.2/seafile/bin/seafile-controller: Kann die Binärdatei nicht ausführen: Fehler im Format der Program

For me looks like you choosed the wrong version (armv64 instead arm or viceversa)

Damnit I really installed the wrong version. Is there an easy way to undo it?

Xalendis commented 2 years ago

I ran a minor update from 8.0.7 and i runs now i try the correct arm version

Xalendis commented 2 years ago

Now Seafile is running but i get a bad Gateway when i try to connect to my website

Xalendis commented 2 years ago

seahub.service - Seafile hub Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2022-01-06 13:22:31 CET; 6min ago Process: 1091 ExecStart=/home/seafile/seafile-server-latest/seahub.sh start (code=exited, status=1/FAILURE)

Jan 06 13:22:24 raspberrypi systemd[1]: Starting Seafile hub... Jan 06 13:22:24 raspberrypi seahub.sh[1091]: Starting seahub at port 8000 ... Jan 06 13:22:24 raspberrypi seahub.sh[1091]: Error happened during creating seafile admin. Jan 06 13:22:31 raspberrypi seahub.sh[1091]: Error:Seahub failed to start. Jan 06 13:22:31 raspberrypi seahub.sh[1091]: Please try to run "./seahub.sh start" again Jan 06 13:22:31 raspberrypi systemd[1]: seahub.service: Control process exited, code=exited, status=1/FAILURE Jan 06 13:22:31 raspberrypi systemd[1]: seahub.service: Failed with result 'exit-code'. Jan 06 13:22:31 raspberrypi systemd[1]: Failed to start Seafile hub.

This is the new error

Xalendis commented 2 years ago

./reset-admin.sh Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py", line 18, in from . import _mysql ImportError: cannot import name '_mysql' from 'MySQLdb' (/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/management/init.py", line 395, in execute django.setup() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/apps/registry.py", line 114, in populate app_config.import_models() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/apps/config.py", line 301, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/contrib/sessions/models.py", line 1, in from django.contrib.sessions.base_session import ( File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/contrib/sessions/base_session.py", line 26, in class AbstractBaseSession(models.Model): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/base.py", line 122, in new new_class.add_to_class('_meta', Options(meta, app_label)) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/base.py", line 326, in add_to_class value.contribute_to_class(cls, name) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/options.py", line 207, in contribute_to_class self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/connection.py", line 15, in getattr return getattr(self._connections[self._alias], item) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/connection.py", line 62, in getitem conn = self.create_connection(alias) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/utils.py", line 204, in create_connection backend = load_backend(db['ENGINE']) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/utils.py", line 111, in load_backend return import_module('%s.base' % backend_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/backends/mysql/base.py", line 15, in import MySQLdb as Database File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py", line 24, in version_info, _mysql.version_info, _mysql.file NameError: name '_mysql' is not defined

jobenvil commented 2 years ago

Why you executed ./reset-admin.sh, can you check apt install python3-pymysql?

Xalendis commented 2 years ago

Pymysql is already up to date

jobenvil commented 2 years ago

Try this https://manual.seafile.com/faq/#website-displays-page-unavailable-what-can-i-do to see why seahub is not able to start. Short question, which distro did you choosed?

Xalendis commented 2 years ago

I chose Raspberry OS Buster

Debug mode didn´t help because i cant start seahub. Seahub log states as follow:

2022-01-06 01:49:57,020 [WARNING] django.request:228 log_response Not Found: /.env 2022-01-06 02:30:25,447 [WARNING] django.request:228 log_response Not Found: /mifs/.;/services/LogService 2022-01-06 02:51:05,368 [WARNING] django.security.csrf:228 log_response Forbidden (Referer checking failed - no Referer.): / 2022-01-06 02:51:06,068 [WARNING] django.request:228 log_response Not Found: /.env 2022-01-06 03:26:21,790 [WARNING] django.request:228 log_response Not Found: /owa/auth/logon.aspx 2022-01-06 04:04:22,396 [WARNING] django.request:228 log_response Not Found: /console/ 2022-01-06 04:09:12,424 [WARNING] django.security.csrf:228 log_response Forbidden (Referer checking failed - no Referer.): / 2022-01-06 04:09:13,180 [WARNING] django.request:228 log_response Not Found: /.env 2022-01-06 04:48:24,023 [WARNING] django.request:228 log_response Not Found: /Autodiscover/Autodiscover.xml 2022-01-06 05:44:52,025 [WARNING] django.request:228 log_response Not Found: /owa/auth/x.js 2022-01-06 05:49:22,755 [WARNING] django.request:228 log_response Not Found: /owa/auth/logon.aspx 2022-01-06 05:49:38,185 [WARNING] django.request:228 log_response Not Found: /ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application 2022-01-06 06:06:13,667 [WARNING] django.request:228 log_response Not Found: /_ignition/execute-solution 2022-01-06 09:21:59,165 [WARNING] django.request:228 log_response Not Found: /ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application 2022-01-06 09:34:59,461 [WARNING] django.request:228 log_response Not Found: /owa/auth/logon.aspx

jobenvil commented 2 years ago

Debug mode didn´t help because i cant start seahub.

The debug mode will print in the terminal the problem that seahub has after you execute ./seahub.sh start

Xalendis commented 2 years ago

It prints the same as before

jobenvil commented 2 years ago

Not possible, what you posted is the body of the seahub.log

The debug log printed on the screen after running ./seahub start looks like similar to the following error:

2021-12-28 21:39:32,218 [ERROR] django.request:224 log_response Internal Server Error: /library/dc2249b3-2d93-4d39-acce-704b769a0183/Personal/Computer/Seafile
Traceback (most recent call last):
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/seahub/auth/decorators.py", line 26, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/seahub/views/__init__.py", line 1171, in react_fake_view
    return render(request, "react_app.html", {
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 170, in render
    return self._render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 162, in _render
    return self.nodelist.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 162, in _render
    return self.nodelist.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/library.py", line 192, in render
    output = self.func(*resolved_args, **resolved_kwargs)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/templatetags/webpack_loader.py", line 20, in render_bundle
    tags = utils.get_as_tags(
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/utils.py", line 61, in get_as_tags
    bundle = _get_bundle(bundle_name, extension, config)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/utils.py", line 39, in _get_bundle
    bundle = get_loader(config).get_bundle(bundle_name)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/loader.py", line 97, in get_bundle
    filtered_chunks = self.filter_chunks(chunks)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/loader.py", line 45, in filter_chunks
    ignore = any(regex.match(chunk)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/loader.py", line 45, in <genexpr>
    ignore = any(regex.match(chunk)
TypeError: expected string or bytes-like object
Xalendis commented 2 years ago

This is what i get

sudo -u seafile bash seahub.sh start

Starting seahub at port 8000 ...

Error happened during creating seafile admin.

Error:Seahub failed to start. Please try to run "./seahub.sh start" again

The website does not say anything and the seahub log states as i put in my comment above

Xalendis commented 2 years ago

Not possible, what you posted is the body of the seahub.log

The debug log printed on the screen after running ./seahub start looks like similar to the following error:

2021-12-28 21:39:32,218 [ERROR] django.request:224 log_response Internal Server Error: /library/dc2249b3-2d93-4d39-acce-704b769a0183/Personal/Computer/Seafile
Traceback (most recent call last):
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/seahub/auth/decorators.py", line 26, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/seahub/views/__init__.py", line 1171, in react_fake_view
    return render(request, "react_app.html", {
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 170, in render
    return self._render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 162, in _render
    return self.nodelist.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 162, in _render
    return self.nodelist.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/django/template/library.py", line 192, in render
    output = self.func(*resolved_args, **resolved_kwargs)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/templatetags/webpack_loader.py", line 20, in render_bundle
    tags = utils.get_as_tags(
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/utils.py", line 61, in get_as_tags
    bundle = _get_bundle(bundle_name, extension, config)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/utils.py", line 39, in _get_bundle
    bundle = get_loader(config).get_bundle(bundle_name)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/loader.py", line 97, in get_bundle
    filtered_chunks = self.filter_chunks(chunks)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/loader.py", line 45, in filter_chunks
    ignore = any(regex.match(chunk)
  File "/media/sda/seafile/seafile-server-9.0.2/seahub/thirdpart/webpack_loader/loader.py", line 45, in <genexpr>
    ignore = any(regex.match(chunk)
TypeError: expected string or bytes-like object

I only have this for 8.0.7 If it helps we can talk in german 2021-08-28 01:34:34,506 [ERROR] django.request:228 log_response Internal Server Error: /accounts/login/ Traceback (most recent call last): File "/home/seafile/seafile-server-8.0.7/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 29, 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-server-8.0.7/seahub/thirdpart/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/utils/decorators.py", line 142, in _wrapped_view response = view_func(request, *args, *kwargs) File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/views/decorators/cache.py", line 44, in _wrapped_view_func response = view_func(request, args, kwargs) File "/home/seafile/seafile-server-8.0.7/seahub/seahub/auth/views.py", line 121, in login if form.is_valid(): File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/forms/forms.py", line 185, in is_valid return self.is_bound and not self.errors File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/forms/forms.py", line 180, in errors self.full_clean() File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/forms/forms.py", line 382, in full_clean self._clean_form() File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/forms/forms.py", line 409, in _clean_form cleaned_data = self.clean() File "/home/seafile/seafile-server-8.0.7/seahub/seahub/auth/forms.py", line 61, in clean password=password) File "/home/seafile/seafile-server-8.0.7/seahub/seahub/auth/init.py", line 56, in authenticate user = backend.authenticate(**credentials) File "/home/seafile/seafile-server-8.0.7/seahub/seahub/base/accounts.py", line 579, in authenticate user = self.get_user(username) File "/home/seafile/seafile-server-8.0.7/seahub/seahub/base/accounts.py", line 573, in get_user user = self.get_user_with_import(username) File "/home/seafile/seafile-server-8.0.7/seahub/seahub/base/accounts.py", line 544, in get_user_with_import emailuser = ccnet_api.get_emailuser_with_import(username) File "/home/seafile/seafile-server-8.0.7/seafile/lib/python3.6/site-packages/seaserv/api.py", line 896, in get_emailuser_with_import return ccnet_threaded_rpc.get_emailuser_with_import(email) File "/home/seafile/seafile-server-8.0.7/seafile/lib/python3.6/site-packages/pysearpc/client.py", line 125, in newfunc ret_str = self.call_remote_func_sync(fcall_str) File "/home/seafile/seafile-server-8.0.7/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 98, in call_remote_func_sync ret_str = transport.send(self.service_name, fcall_str) File "/home/seafile/seafile-server-8.0.7/seafile/lib/python3.6/site-packages/pysearpc/named_pipe.py", line 59, in send sendall(self.pipe, header) File "/home/seafile/seafile-server-8.0.7/seafile/lib/python3.6/site-packages/pysearpc/utils.py", line 31, in sendall raise NetworkError('Failed to write to socket: %s' % e) pysearpc.errors.NetworkError: Failed to write to socket: [Errno 32] Broken pipe 2021-08-28 02:17:37,131 [WARNING] django.request:228 log_response Not Found: /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php

jobenvil commented 2 years ago

This is what i get

sudo -u seafile bash seahub.sh start

Starting seahub at port 8000 ...

Error happened during creating seafile admin.

Error:Seahub failed to start. Please try to run "./seahub.sh start" again

The website does not say anything and the seahub log states as i put in my comment above

Oh, I see. Try this : https://forum.seafile.com/t/need-help-with-rollback-to-7-0-5/11707/5

And here another hint that assumes that you have missconfigured rights of the seafile-server directory:

https://forum.seafile.com/t/resolved-seahub-does-not-start-after-upgrade-from-7-1-5-to-8-0-3/13910

Normally Seahub needs to create a new seafile admin the first time it runs, but not on every start. Probably you messed it up after you run the ./reset-admin.sh script earlier.

Xalendis commented 2 years ago

Ok now there are at least Error messages, another thign i remembered i should say is that i cant install ElasticSearch because there is no armv7 version

+++++++++++ VARIABLES SEAHUB +++++++++++++++++++++++++++++++++++++++++++++++++++ CCNET_CONF_DIR = /home/seafile/ccnet SEAFILE_CONF_DIR = /home/seafile/seafile-data SEAFILE_CENTRAL_CONF_DIR = /home/seafile/conf SEAFILE_RPC_PIPE_PATH = /home/seafile/seafile-server-9.0.2/runtime PYTHONPATH = /home/seafile/seafile-server-9.0.2/seafile/lib/python3/site-packages:/home/seafile/seafile-server-9.0.2/seafile/lib64/python3/site-packages:/home/seafile/seafile-server-9.0.2/seahub:/home/seafile/seafile-server-9.0.2/seahub/thirdpart: PYTHON CALL = python3 PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +++++++++++ VARIABLES SEAHUB +++++++++++++++++++++++++++++++++++++++++++++++++++

Starting seahub at port 8000 ...

Error happened during creating seafile admin.

Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py", line 18, in from . import _mysql ImportError: cannot import name '_mysql' from 'MySQLdb' (/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/bin/gunicorn", line 8, in sys.exit(run()) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 67, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/base.py", line 231, in run super().run() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/arbiter.py", line 58, in init self.setup(app) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/arbiter.py", line 118, in setup self.app.wsgi() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/gunicorn/util.py", line 359, in import_app mod = importlib.import_module(module) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/seafile/seafile-server-9.0.2/seahub/seahub/wsgi.py", line 25, in application = get_wsgi_application() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/apps/registry.py", line 114, in populate app_config.import_models() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/apps/config.py", line 301, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/contrib/sessions/models.py", line 1, in from django.contrib.sessions.base_session import ( File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/contrib/sessions/base_session.py", line 26, in class AbstractBaseSession(models.Model): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/base.py", line 122, in new new_class.add_to_class('_meta', Options(meta, app_label)) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/base.py", line 326, in add_to_class value.contribute_to_class(cls, name) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/options.py", line 207, in contribute_to_class self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/connection.py", line 15, in getattr return getattr(self._connections[self._alias], item) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/connection.py", line 62, in getitem conn = self.create_connection(alias) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/utils.py", line 204, in create_connection backend = load_backend(db['ENGINE']) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/utils.py", line 111, in load_backend return import_module('%s.base' % backend_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/backends/mysql/base.py", line 15, in import MySQLdb as Database File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py", line 24, in version_info, _mysql.version_info, _mysql.file NameError: name '_mysql' is not defined Error:Seahub failed to start.

Xalendis commented 2 years ago

This is what i get if i try to reset the admin. Maybe it helps

./reset-admin.sh Traceback (most recent call last): File "/usr/lib/python3.7/logging/config.py", line 562, in configure handler = self.configure_handler(handlers[name]) File "/usr/lib/python3.7/logging/config.py", line 735, in configure_handler result = factory(**kwargs) File "/usr/lib/python3.7/logging/handlers.py", line 147, in init BaseRotatingHandler.init(self, filename, mode, encoding, delay) File "/usr/lib/python3.7/logging/handlers.py", line 54, in init logging.FileHandler.init(self, filename, mode, encoding, delay) File "/usr/lib/python3.7/logging/init.py", line 1092, in init StreamHandler.init(self, self._open()) File "/usr/lib/python3.7/logging/init.py", line 1121, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) PermissionError: [Errno 13] Permission denied: '/home/seafile/logs/seahub.log'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/management/init.py", line 395, in execute django.setup() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/init.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/log.py", line 75, in configure_logging logging_config_func(logging_settings) File "/usr/lib/python3.7/logging/config.py", line 799, in dictConfig dictConfigClass(config).configure() File "/usr/lib/python3.7/logging/config.py", line 570, in configure '%r' % name) from e ValueError: Unable to configure handler 'default'

jobenvil commented 2 years ago

Try apt install libmariadbclient-dev, from here.

Elasticsearch is just for the Professional Version, not the community edition, which you already downloaded. Therefore you cannot use ElasticSearch (independent of arm architecture)

Xalendis commented 2 years ago

Try apt install libmariadbclient-dev, from here.

Elasticsearch is just for the Professional Version, not the community edition, which you already downloaded. Therefore you cannot use ElasticSearch (independent of arm architecture)

I already did that and nothing changed sadly. Even after a reboot.

jobenvil commented 2 years ago

PermissionError: [Errno 13] Permission denied: '/home/seafile/logs/seahub.log'

Have you checked the directory rights? Best is to use chown -R seafile:seafile /home/seafile/

Xalendis commented 2 years ago

I set it on 777 and now this is the error log

sudo -u seafile bash reset-admin.sh Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py", line 18, in from . import _mysql ImportError: cannot import name '_mysql' from 'MySQLdb' (/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/seafile/seafile-server-9.0.2/seahub/manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/core/management/init.py", line 395, in execute django.setup() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/apps/registry.py", line 114, in populate app_config.import_models() File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/apps/config.py", line 301, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/contrib/sessions/models.py", line 1, in from django.contrib.sessions.base_session import ( File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/contrib/sessions/base_session.py", line 26, in class AbstractBaseSession(models.Model): File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/base.py", line 122, in new new_class.add_to_class('_meta', Options(meta, app_label)) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/base.py", line 326, in add_to_class value.contribute_to_class(cls, name) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/models/options.py", line 207, in contribute_to_class self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/connection.py", line 15, in getattr return getattr(self._connections[self._alias], item) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/utils/connection.py", line 62, in getitem conn = self.create_connection(alias) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/utils.py", line 204, in create_connection backend = load_backend(db['ENGINE']) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/utils.py", line 111, in load_backend return import_module('%s.base' % backend_name) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/django/db/backends/mysql/base.py", line 15, in import MySQLdb as Database File "/home/seafile/seafile-server-9.0.2/seahub/thirdpart/MySQLdb/init.py", line 24, in version_info, _mysql.version_info, _mysql.file NameError: name '_mysql' is not defined

jobenvil commented 2 years ago

Try to chown instead of chmod 777. Can you post the output for :

python3 --version
uname -a
mysql --version
cat /etc/os-release

Have you check that your mysql service works fine? Maybe is not.

Xalendis commented 2 years ago

pi@raspberrypi:/home/seafile $ python3 --version Python 3.7.3 pi@raspberrypi:/home/seafile $ uname -a Linux raspberrypi 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux pi@raspberrypi:/home/seafile $ mysql --version mysql Ver 15.1 Distrib 10.0.28-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2 pi@raspberrypi:/home/seafile $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" pi@raspberrypi:/home/seafile $ pip3 list Package Version


asgiref 3.4.1
asn1crypto 0.24.0
astroid 2.1.0
asttokens 1.1.13
automationhat 0.2.0
beautifulsoup4 4.7.1
blinker 1.4
blinkt 0.1.2
buttonshim 0.0.2
Cap1xxx 0.1.3
captcha 0.3
cffi 1.14.0
chardet 3.0.4
Click 7.0
colorama 0.3.7
colorzero 1.1
ConfigArgParse 0.13.0
configobj 5.0.6
cookies 2.2.1
cryptography 2.6.1
distro-info 0.21
Django 3.2.6
django-pylibmc 0.6.1
django-ranged-response 0.2.0
django-simple-captcha 0.5.14
docutils 0.14
drumhat 0.1.0
entrypoints 0.3
envirophat 1.0.0
ExplorerHAT 0.4.2
fail2ban 0.10.2
Flask 1.0.2
fourletterphat 0.1.0
future 0.16.0
gpiozero 1.6.2
html5lib 1.0.1
idna 2.6
importlib-metadata 4.7.1
isort 4.3.4
itsdangerous 0.24
jedi 0.13.2
Jinja2 2.10
josepy 1.1.0
keyring 17.1.1
keyrings.alt 3.1.1
lazy-object-proxy 1.3.1
logilab-common 1.4.2
lxml 4.3.2
MarkupSafe 1.1.0
mccabe 0.6.1
microdotphat 0.2.1
mock 2.0.0
mote 0.0.4
motephat 0.0.3
mypy 0.670
mypy-extensions 0.4.1
numpy 1.16.2
oauthlib 2.1.0
olefile 0.46
pantilthat 0.0.7
parsedatetime 2.4
parso 0.3.1
pbr 4.2.0
pexpect 4.6.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
piglow 1.2.5
pigpio 1.78
Pillow 5.4.1
pip 18.1
psutil 5.5.1
pyasn1 0.4.8
pycairo 1.16.2
pycparser 2.21
pycrypto 2.6.1
pycryptodome 3.12.0
pycups 1.9.73
pycurl 7.43.0.2
pygame 1.9.4.post1 Pygments 2.3.1
PyGObject 3.30.4
pyinotify 0.9.6
PyJWT 1.7.0
pylibmc 1.6.1
pylint 2.2.2
PyMySQL 0.9.3
pyOpenSSL 19.0.0
pyparsing 2.2.0
pyRFC3339 1.1
pyserial 3.4
pysmbc 1.0.15.6
python-apt 1.8.4.3
python3-ldap 0.9.8.4
pytz 2021.1
pyxdg 0.25
rainbowhat 0.1.0
reportlab 3.5.13
roman 2.0.0
RPi.GPIO 0.7.0
RTIMULib 7.2.1
scrollphat 0.0.7
scrollphathd 1.2.1
SecretStorage 2.3.1
Send2Trash 1.5.0
sense-hat 2.2.0
setuptools 40.8.0
simplejson 3.16.0
six 1.12.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 1.8
spidev 3.5
SQLAlchemy 1.4.23
sqlparse 0.4.1
systemd-python 234
touchphat 0.0.1
typed-ast 1.3.1
typing-extensions 3.10.0.0
unattended-upgrades 0.1
unicornhathd 0.0.4
urllib3 1.24.1
webencodings 0.5.1
Werkzeug 0.14.1
wheel 0.32.3
wrapt 1.10.11
zipp 3.5.0
zope.component 4.3.0
zope.event 4.2.0
zope.hookable 4.0.4
zope.interface 4.3.2

jobenvil commented 2 years ago

I think you miss the module mysqlclient do sudo pip3 install mysqlclient

Xalendis commented 2 years ago

OK i realy missed mysqlclient and it seems my phone did not copy the correct link of the seafile archive which means i didnt download buster but focal -_- Sometimes I hate this job. Thanks for the great help and it works as intended now.