Seahub startet nicht

Hallo,
nach dem Upgrade von 7.0.4 nach 7.1.4 von Seafile Server für Raspberry erhalte ich folgenden Fehler beim Start von seahub.sh:

Traceback (most recent call last):

File “/home/seafile/seafile-server-7.1.4/check_init_admin.py”, line 351, in
rpc = RPC()
File “/home/seafile/seafile-server-7.1.4/check_init_admin.py”, line 284, in init
import ccnet
ModuleNotFoundError: No module named ‘ccnet’

Was kann das sein?
VG
Uli

Ich hbae den Pi mal neu gestartet.
Nun gibt es eine andere Fehlermeldung beim Start von seahub:
Traceback (most recent call last):
File “/home/seafile/seafile-server-7.1.4/check_init_admin.py”, line 351, in
rpc = RPC()
File “/home/seafile/seafile-server-7.1.4/check_init_admin.py”, line 288, in init
self.rpc_client = ccnet.CcnetThreadedRpcClient(ccnet_named_pipe_path)
AttributeError: module ‘ccnet’ has no attribute ‘CcnetThreadedRpcClient’

UPDATE: Please check this post. Big Thanks to jobenvil!

(ln -s python3.7 python3.6)

My old Message:
Hi,

i get the same error if i try to start seahub.

File "/seafile/seafile-server-7.1.4/check_init_admin.py", line 284, in __init__
import ccnet
ModuleNotFoundError: No module named 'ccnet'

I have taken the following into account:

I have to set the PATH for django-admin and sqlformat with

export PYTHONPATH=...

inside the .bashrc file
maybe that’s the reason?

I tried to install the pip packges. But some errors occured:
Running setup.py bdist_wheel for pylibmc … error
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-k5y279s5/pylibmc/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/pip-wheel-8w45pvoo --python-tag cp37:
/tmp/pip-install-k5y279s5/pylibmc/setup.py:98: DeprecationWarning: ‘U’ mode is deprecated
with open(“README.rst”, “U”, encoding=“utf-8”) as r:
/tmp/pip-install-k5y279s5/pylibmc/setup.py:100: DeprecationWarning: ‘U’ mode is deprecated
with open(“src/pylibmc-version.h”, “U”, encoding=“utf-8”) as r:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/client.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/main.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/pools.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/test.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/autoconf.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/init.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/consts.py -> build/lib.linux-armv7l-3.7/pylibmc
running build_ext
building ‘_pylibmc’ extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/src
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/usr/include/python3.7m -c src/_pylibmcmodule.c -o build/temp.linux-armv7l-3.7/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
In file included from src/_pylibmcmodule.c:34:
src/_pylibmcmodule.h:42:10: fatal error: libmemcached/memcached.h: Datei oder Verzeichnis nicht gefunden
#include <libmemcached/memcached.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1


Failed building wheel for pylibmc
Running setup.py clean for pylibmc
Failed to build pylibmc
Installing collected packages: pylibmc, django-pylibmc, sqlparse, pytz, asgiref, Django, django-ranged-response, django-simple-captcha, pyasn1, python3-ldap
Running setup.py install for pylibmc … error
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-k5y279s5/pylibmc/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-record-6rvogyaw/install-record.txt --single-version-externally-managed --compile:
/tmp/pip-install-k5y279s5/pylibmc/setup.py:98: DeprecationWarning: ‘U’ mode is deprecated
with open(“README.rst”, “U”, encoding=“utf-8”) as r:
/tmp/pip-install-k5y279s5/pylibmc/setup.py:100: DeprecationWarning: ‘U’ mode is deprecated
with open(“src/pylibmc-version.h”, “U”, encoding=“utf-8”) as r:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/client.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/main.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/pools.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/test.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/autoconf.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/init.py -> build/lib.linux-armv7l-3.7/pylibmc
copying src/pylibmc/consts.py -> build/lib.linux-armv7l-3.7/pylibmc
running build_ext
building ‘_pylibmc’ extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/src
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/usr/include/python3.7m -c src/_pylibmcmodule.c -o build/temp.linux-armv7l-3.7/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
In file included from src/_pylibmcmodule.c:34:
src/_pylibmcmodule.h:42:10: fatal error: libmemcached/memcached.h: Datei oder Verzeichnis nicht gefunden
#include <libmemcached/memcached.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1


Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-k5y279s5/pylibmc/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-record-6rvogyaw/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-k5y279s5/pylibmc/

Could you pease explain, what You have done :slight_smile:?

I followed the upgrade-noted several times.
https://download.seafile.com/published/seafile-manual/upgrade/upgrade_notes_for_7.1.x.md
Strangely, it works now.
Thanks for Your help.
Uli

Was mir geholfen hat, war es einen Symlink zu erstellen wie im Post von @jobenvil , verlinkt von @Nogs_Noggy:

If you use the rpi-Buster version, you need to do some hack after you extract the rpi seafile package in your system. The python library path is hardcoded during the compilation to point to
$INSTALLDIR/seafile/lib/python3.6/site-packages in few seafile shell scripts, like seahub.sh, reset-admin.sh, setup-seafile-mysql.sh and upgrade_7.0_7.1.sh. The issue arises if you compile Seafile server with other Python version than Python 3.6. These paths still points to /python3.6/ but since the native Buster version brings Python 3.7, the directory created under
$INSTALLDIR/seafile/lib/ will be /python3.7/ instead of /python3.6/. Therefore it must be created a symbolic soft link from python3.6 to python3.7 inside $INSTALLDIR/seafile/lib/ like “ln -s python3.7 python3.6”.

Außerdem habe ich noch python-pip3, libmemcached-dec, zlib1g-dev, python3-dev und sudo pip3 install Pillow captcha jinja2 sqlalchemy django-simple-captcha python3-ldap pylibmc django-pylibmc installiert (ohne sudo schlägt die Installation der letzten zwei Packete fehl. DeprecationWarning für pylibmc und fatal error: Python.h: nicht gefunden).

Die zwei unterschiedlichen Fehlermeldungen (ModuleNotFoundError: No module named ‘ccnet’ und AttributeError: module ‘ccnet’ has no attribute ‘CcnetThreadedRpcClient’) waren bei mir davon abhängig, von wo aus ich seahub.sh start ausführe. Entweder aus dem seafile-server-7.1.4 Verzeichnis (erste Fehlermeldung) oder aus dem dadrunter (zweite Fehlermeldung). Beide sind nach dem neuen Symlink verschwunden.

(Außerdem muss der Port 10001 für seafile und ccnet offen sein)