Internal Server Error / Upgrade 9.0 version

Hello, everyone,

I updated my Seafile Server from version 8.07 to version 9.0. The service starts but I get the error “Internal Server Error” when accessing it.

I first had the problem that Python 3.0 was not recognized because Python 2.7 was installed.

apt-get remove python2.7

I uninstalled Python 2.7. In order for seahub.sh to start, python –version must show an output Python 3.xxx. I added a symlink to it:

ln -s /usr/bin/python3 /usr/bin/python

Now the server didn’t start because a crypto library didn’t want to start:

solved with:

pip3 uninstall -y pycrypto
pip3 uninstall -y pycryptodome
pip3 install pycryptodomex

Now the service is hanging on “seafile python_2_unicode_compatible”

Solved with:

1873 sudo apt-get install -y python3 python3-setuptools python3-pip libmysqlclient-dev
1875 sudo pip3 install --timeout=3600 django==3.2.* Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 django-pylibmc django-simple-captcha python3-ldap mysqlclient pycryptodome==3.12.0 cffi==1.14.0

1873 sudo apt-get install -y python3 python3-setuptools python3-pip libmysqlclient-dev
1875 sudo pip3 install --timeout=3600 django==3.2.* Pillo

w pylibmc captcha jinja2 sqlalchemy==1.4.3 django-pylibmc django-simple-captcha python3-ldap mysqlclient pycryptodome==3.12.0 cffi==1.14.0

The service is now starting, but there is an “Internal Sever Error”

root@nginx:/seafile/conf# history | grep python
 1048  python --version
 1049  python3 --version
 1050  ln -s python3.7 python3.6
 1052  rm python3.6 
 1058  ln -s python3.7 python3.6
 1157  rm python3.6 
 1187  sudo apt install python3 python3-setuptools python3-pip -y
 1197  python --version
 1198  python3 --version
 1231  python --version
 1233  apt-get install python3-django-captcha
 1747  python3
 1748  python --version
 1749  python3 --version
 1750  python --version
 1752  dnf remove python2
 1753  apt-get remove python2
 1754  apt-get remove python2.7
 1756  python --version
 1812  apt list --installed | grep python
 1813  apt list --installed | grep python2
 1814  apt-get remove python2
 1815  apt-get remove python2.7
 1817  python
 1833  python 3
 1834  python
 1836  install python3-pip
 1837  apt-get install python3-pip
 1838  python3-pip
 1839  python3
 1848  cat * | grep from django.utils.encoding import python_2_unicode_compatible
 1849  cat * | grep "django.utils.encoding import python_2_unicode_compatible"
 1850  cat *.* | grep "django.utils.encoding import python_2_unicode_compatible"
 1851  cat *.* | grep "python_2_unicode_compatible"
 1873  sudo apt-get install -y python3 python3-setuptools python3-pip libmysqlclient-dev
 1875  sudo pip3 install --timeout=3600 django==3.2.* Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3     django-pylibmc django-simple-captcha python3-ldap mysqlclient pycryptodome==3.12.0 cffi==1.14.0
 1889  python
 1891  apt list --installed | grep python
 1894  apt list --installed | python2
 1895  apt list --installed | grep python2
 1896  apt-get remove python2.7
 1898  python3
 1899  python
 1912  python --version
 1913  python3 --version
 1914  python --version
 1915  python3 --version
 1917  ln -s /usr/bin/python3 /usr/bin/python
 1918  python3 --version
 1919  python --version
 2013  pip3 install --ignore-installed --timeout=3600 Pillow captcha jinja2 sqlalchemy psd-tools django-pylibmc python3-ldap
 2018  history | grep python
 2020  history | grep python

root@nginx:/seafile/conf# history | grep pip
 1187  sudo apt install python3 python3-setuptools python3-pip -y
 1486  sudo pip3 install -U future mysqlclient
 1755  sudo pip3 install pycryptodome==3.12.0 cffi==1.14.0
 1829  pip uninstall -y pycrypto
 1830  pip uninstall -y pycryptodome
 1831  pip install pycryptodomex
 1832  apt-get install pip
 1836  install python3-pip
 1837  apt-get install python3-pip
 1838  python3-pip
 1840  pip3
 1841  pip3 uninstall -y pycrypto
 1842  pip3 uninstall -y pycryptodome
 1843  pip3 install pycryptodomex
 1845  pip3 install six
 1847  pip3 install six
 1864  pip3 uninstall auditlog
 1865  pip3 install auditlog3
 1871  pip3 install django-background-tasks
 1873  sudo apt-get install -y python3 python3-setuptools python3-pip libmysqlclient-dev
 1875  sudo pip3 install --timeout=3600 django==3.2.* Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3     django-pylibmc django-simple-captcha python3-ldap mysqlclient pycryptodome==3.12.0 cffi==1.14.0
 1877  pip3 uninstall -y pycrypto
 1878  pip3 uninstall -y pycryptodome
 1879  pip3 install pycryptodomex
 2013  pip3 install --ignore-installed --timeout=3600 Pillow captcha jinja2 sqlalchemy psd-tools django-pylibmc python3-ldap
 2019  history | grep pip
 2021  history | grep pip

Serverstatus:

root@nginx:/seafile/conf# sytemctl status seafile
bash: sytemctl: command not found
root@nginx:/seafile/conf# systemctl status seafile
● seafile.service - Seafile
   Loaded: loaded (/etc/systemd/system/seafile.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2022-04-11 10:13:46 UTC; 33min ago
  Process: 589 ExecStop=/seafile/seafile-server-latest/seahub.sh stop (code=exited, status=0/SUCCESS)
  Process: 577 ExecStop=/seafile/seafile-server-latest/seafile.sh stop (code=exited, status=0/SUCCESS)
  Process: 638 ExecStart=/seafile/seafile-server-latest/seahub.sh start (code=exited, status=0/SUCCESS)
  Process: 599 ExecStart=/seafile/seafile-server-latest/seafile.sh start (code=exited, status=0/SUCCESS)
 Main PID: 638 (code=exited, status=0/SUCCESS)
    Tasks: 24 (limit: 9063)
   CGroup: /system.slice/seafile.service
           ├─619 /seafile/seafile-server-9.0.4/seafile/bin/seafile-controller -c /seafile/ccnet -d /seafile/seafile-data -F /seafile/conf
           ├─621 seaf-server -F /seafile/conf -c /seafile/ccnet -d /seafile/seafile-data -l /seafile/logs/seafile.log -P /seafile/pids/seaf-server.pid -p /seafile/seafile-server-9.0.4/runtime
           ├─651 python3 /seafile/seafile-server-9.0.4/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /seafile/conf/gunicorn.conf.py --preload
           ├─656 python3 /seafile/seafile-server-9.0.4/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /seafile/conf/gunicorn.conf.py --preload
           ├─657 python3 /seafile/seafile-server-9.0.4/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /seafile/conf/gunicorn.conf.py --preload
           ├─658 python3 /seafile/seafile-server-9.0.4/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /seafile/conf/gunicorn.conf.py --preload
           ├─659 python3 /seafile/seafile-server-9.0.4/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /seafile/conf/gunicorn.conf.py --preload
           ├─660 python3 /seafile/seafile-server-9.0.4/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /seafile/conf/gunicorn.conf.py --preload
           ├─662 /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /seafile/logs/seafdav.log --pid /seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
           └─665 /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /seafile/logs/seafdav.log --pid /seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0

Apr 11 10:13:37 nginx systemd[1]: Starting Seafile...
Apr 11 10:13:37 nginx seafile.sh[599]: Starting seafile server, please wait ...
Apr 11 10:13:37 nginx seafile-control[617]: seafile-controller.c(621): No seafevents.
Apr 11 10:13:40 nginx seafile.sh[599]: Seafile server started
Apr 11 10:13:40 nginx seafile.sh[599]: Done.
Apr 11 10:13:40 nginx seahub.sh[638]: LC_ALL is not set in ENV, set to en_US.UTF-8
Apr 11 10:13:40 nginx seahub.sh[638]: Starting seahub at port 8000 ...
Apr 11 10:13:46 nginx seahub.sh[638]: Seahub is started
Apr 11 10:13:46 nginx seahub.sh[638]: Done.
Apr 11 10:13:46 nginx systemd[1]: Started Seafile.
root@nginx:/seafile/conf# 

netstat:

root@nginx:/seafile/conf# netstat -lnutp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      662/python3         
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      621/seaf-server     
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      651/python3         
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      137/php-fpm: master 
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      124/systemd-resolve 
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      246/nginx: master p 
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      152/memcached       
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      246/nginx: master p 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      162/sshd            
tcp6       0      0 :::80                   :::*                    LISTEN      246/nginx: master p 
tcp6       0      0 :::22                   :::*                    LISTEN      162/sshd            
udp        0      0 127.0.0.53:53           0.0.0.0:*                           124/systemd-resolve 
root@nginx:/seafile/conf# 

its a lxc container on a fedora 35 system:
root@nginx:/seafile/conf# uname -a
Linux nginx 5.16.18-200.fc35.x86_64 #1 SMP PREEMPT Mon Mar 28 14:10:07 UTC 2022 i686 i686 i686 GNU/Linux

The logs remain empty!

Best wishes Alex