No access to seafile-server after upgrade to 6.2.2

Yes, sorry, I mean exactly what you have done.

Try one time incrementing the sleep time (around line 164) in seahub.sh to 10 and see if you get the Error:Seahub failed to start and Please try to run ./seahub.sh start again or you don’t get any error.

Insert the pdb -m code at the python execution line in seahub.sh script:

$PYTHON -m pdb $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" -b "0.0.0.0:${port}" --preload

then press “n” and compare with my output:

seafile@hiperborea:~/seafile-server-6.2.2$ ./seahub.sh start

Starting seahub at port 8000 ...
python2.7 /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn seahub.wsgi:application -c /media/sda/seafile/seafile-server-6.2.2/runtime/seahub.conf -b 0.0.0.0:8000 --preload
> /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(3)<module>()
-> __requires__ = 'gunicorn==19.4.5'
(Pdb) n
> /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(4)<module>()
-> import sys
(Pdb) n
> /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(5)<module>()
-> from pkg_resources import load_entry_point
(Pdb) n
> /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(7)<module>()
-> if __name__ == '__main__':
(Pdb) n
> /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(8)<module>()
-> sys.exit(
(Pdb) n
> /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(9)<module>()
-> load_entry_point('gunicorn==19.4.5', 'console_scripts', 'gunicorn')()
(Pdb) n

Seahub is started

Done.

Incrementing the sleep value to 10 didn´t change the outcome.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 210: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...
python2.7 /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn seahub.wsgi:application -c /mnt/pidrive/seafile/seafile-server-6.2.2/runtime/seahub.conf -b 0.0.0.0:8000 --preload
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

Changing the python-line in the script prevented the error output. Still I get a non-satisfying outcome:

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 211: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...
python2.7 /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn seahub.wsgi:application -c /mnt/pidrive/seafile/seafile-server-6.2.2/runtime/seahub.conf -b 0.0.0.0:8000 --preload
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(3)<module>()
-> __requires__ = 'gunicorn==19.4.5'
(Pdb) n
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(4)<module>()
-> import sys
(Pdb) n
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(5)<module>()
-> from pkg_resources import load_entry_point
(Pdb) n
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(7)<module>()
-> if __name__ == '__main__':
(Pdb) n
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(8)<module>()
-> sys.exit(
(Pdb) n
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(9)<module>()
-> load_entry_point('gunicorn==19.4.5', 'console_scripts', 'gunicorn')()
(Pdb) n

Seahub is started

Done.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ netstat -tulpen | grep sea
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      1000       134004      9034/seaf-server
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ nmap -p 8000 localhost
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00026s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE  SERVICE
8000/tcp closed http-alt

Nmap done: 1 IP address (1 host up) scanned in 0.36 seconds
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh stop

Seahub is not running
Done.

use ps -ef| grep seahub.wsgi:application
instead netstat, is more quick.

Try instead with “n” with “s”, to see which python modules we use.

Check these:

root@hiperborea ~ # pip list --format=columns
Package          Version
---------------- -----------
attrs            15.2.0
chardet          2.3.0
configobj        5.0.6
cryptography     1.2.3
decorator        4.0.11
dnspython        1.12.0
docopt           0.6.2
enum34           1.1.2
gyp              0.1
idna             2.0
imageio          2.1.2
ipaddress        1.0.16
Landscape-Client 16.3+bzr834
moviepy          0.2.3.2
mysqlclient      1.3.7
ndg-httpsclient  0.4.0
ngxtop           0.0.2
numpy            1.12.1
olefile          0.44
PAM              0.4.2
Pillow           4.1.1
pip              9.0.1
pyasn1           0.1.9
pyasn1-modules   0.0.7
pycrypto         2.6.1
pyOpenSSL        0.15.1
pyparsing        2.1.1
pyserial         3.0.1
python-apt       1.1.0b1
python-debian    0.1.27
python-memcached 1.53
requests         2.9.1
service-identity 16.0.0
setuptools       20.7.0
simplejson       3.8.1
six              1.10.0
tabulate         0.7.5
tqdm             4.11.2
Twisted          16.0.0
urllib3          1.13.1
wheel            0.29.0
zope.interface   4.1.3

With a ‘s’ instead of a ‘n’ to every python prompt I get a lot of input lines. I´ve stopped the start-script after approx. 50 requests from python. Here´s the output:

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 213: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...
python2.7 /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn seahub.wsgi:application -c /mnt/pidrive/seafile/seafile-server-6.2.2/runtime/seahub.conf -b 0.0.0.0:8000 --preload
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(3)<module>()
-> __requires__ = 'gunicorn==19.4.5'
(Pdb) s
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(4)<module>()
-> import sys
(Pdb) s
> /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn(5)<module>()
-> from pkg_resources import load_entry_point
(Pdb) s
--Call--
> /usr/lib/python2.7/dist-packages/pkg_resources.py(15)<module>()
-> """
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(15)<module>()
-> """
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(17)<module>()
-> import sys
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(18)<module>()
-> import os
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(19)<module>()
-> import time
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(20)<module>()
-> import re
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(21)<module>()
-> import imp
(Pdb) s
> /usr/lib/python2.7/dist-packages/pkg_resources.py(22)<module>()
-> import zipfile
(Pdb) s
--Call--
> /usr/lib/python2.7/zipfile.py(3)<module>()
-> """
(Pdb) s
> /usr/lib/python2.7/zipfile.py(3)<module>()
-> """
(Pdb) s
> /usr/lib/python2.7/zipfile.py(4)<module>()
-> import struct, os, time, sys, shutil
(Pdb) s
--Call--
> /usr/lib/python2.7/struct.py(1)<module>()
-> from _struct import *
(Pdb) s
> /usr/lib/python2.7/struct.py(1)<module>()
-> from _struct import *
(Pdb) s
> /usr/lib/python2.7/struct.py(2)<module>()
-> from _struct import _clearcache
(Pdb) s
> /usr/lib/python2.7/struct.py(3)<module>()
-> from _struct import __doc__
(Pdb) s
--Return--
> /usr/lib/python2.7/struct.py(3)<module>()->None
-> from _struct import __doc__
(Pdb) s
--Call--
> /usr/lib/python2.7/shutil.py(5)<module>()
-> """
(Pdb) s
> /usr/lib/python2.7/shutil.py(5)<module>()
-> """
(Pdb) s
> /usr/lib/python2.7/shutil.py(7)<module>()
-> import os
(Pdb) s
> /usr/lib/python2.7/shutil.py(8)<module>()
-> import sys
(Pdb) s
> /usr/lib/python2.7/shutil.py(9)<module>()
-> import stat
(Pdb) s
> /usr/lib/python2.7/shutil.py(10)<module>()
-> from os.path import abspath
(Pdb) s
> /usr/lib/python2.7/shutil.py(11)<module>()
-> import fnmatch
(Pdb) s
> /usr/lib/python2.7/shutil.py(12)<module>()
-> import collections
(Pdb) s
--Call--
> /usr/lib/python2.7/collections.py(1)<module>()
-> __all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict']
(Pdb) s
> /usr/lib/python2.7/collections.py(1)<module>()
-> __all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict']
(Pdb)

and here my pip output:

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ pip list
argparse (1.2.1)
chardet (2.3.0)
colorama (0.3.2)
html5lib (0.999)
iotop (0.6)
lxml (3.4.0)
MySQL-python (1.2.3)
ndg-httpsclient (0.3.2)
Pillow (2.6.1)
pip (1.5.6)
pyasn1 (0.1.7)
pyinotify (0.9.4)
pyOpenSSL (0.13.1)
python-apt (0.9.3.12)
python-ldap (2.4.10)
python-memcached (1.53)
requests (2.4.3)
RPi.GPIO (0.6.3)
setuptools (5.5.1)
six (1.8.0)
urllib3 (1.9.1)
virtualenv (1.11.6)
wheel (0.24.0)
wsgiref (0.1.2)

try to update pip, but here is not our problem. I checked for requests and urllib3. You have both. Runned out of ideas :frowning:
Try with 6.1.2 and with wsgi. WSGI is working for me already in 6.1.2. You can let your nginx config as it is. Tell me if it does work wsgi with 6.1.2.

Have you installed wsgiref?

Looks like wsgiref is installed:

pi@pi31:/mnt/pidrive/seafile $ sudo pip install wsgiref
Requirement already satisfied (use --upgrade to upgrade): wsgiref in /usr/lib/python2.7
Cleaning up...

Switching to 6.1.2 also didn´t do the trick :frowning:

pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ sudo service seafile stop
pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ ../seafile-server-6.2.2/seafile.sh stop

Stopping seafile server ...
Done.
pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ ../seafile-server-6.2.2/seahub.sh stop

Seahub is not running
Done.

pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ ./seafile.sh start

[10/06/17 13:09:11] ../common/session.c(132): using config file /mnt/pidrive/seafile/conf/ccnet.conf
Starting seafile server, please wait ...
Seafile server started

Done.
pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 209: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...

Seahub is started

Done.

pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ ps -ef| grep seahub.wsgi:application
pi       12774 12562  0 13:09 pts/0    00:00:00 grep --color=auto seahub.wsgi:application
pi@pi31:/mnt/pidrive/seafile/seafile-server-6.1.2 $ netstat -tulpen
(Es konnten nicht alle Prozesse identifiziert werden; Informationen über
nicht-eigene Processe werden nicht angezeigt; Root kann sie anzeigen.)
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 0.0.0.0:4200            0.0.0.0:*               LISTEN      0          11347       -
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      109        13353       -
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      110        11325       -
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      0          11503       -
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      1000       193125      12693/seaf-server
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          10269       -
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      0          11504       -
tcp6       0      0 :::22                   :::*                    LISTEN      0          10271       -
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           105        5825        -
udp        0      0 0.0.0.0:56231           0.0.0.0:*                           105        5827        -
udp        0      0 127.0.0.1:11211         0.0.0.0:*                           110        11326       -
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          7846        -
udp        0      0 192.168.2.220:123       0.0.0.0:*                           0          8134        -
udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          8133        -
udp        0      0 0.0.0.0:123             0.0.0.0:*                           0          10216       -
udp6       0      0 :::5353                 :::*                                105        5826        -
udp6       0      0 :::48471                :::*                                105        5828        -
udp6       0      0 2003:c8:2bc6:1c00:c:123 :::*                                106        11575       -
udp6       0      0 fe80::d617:fa0:e57a:123 :::*                                0          8136        -
udp6       0      0 ::1:123                 :::*                                0          8135        -
udp6       0      0 :::123                  :::*                                0          10217       -

Again it ‘starts’ but somehow dies instantly without even reporting an error.

Try uninstalling wsgiref. Update pip.

Looks like python doesn´t let me remove wsgiref.

pi@pi31:~ $ sudo pip uninstall wsgiref
Not uninstalling wsgiref at /usr/lib/python2.7, owned by OS
pi@pi31:~ $ sudo pip install --upgrade pip
Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.6
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...

Tested the start of seahub again

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

@lins05 is possible you take a look at this issue? Thanks in advance

While trying to go back to 6.1.1 I´ve finally found the mistake which let the seahub crash.

Here @Jack_Miller suggested to change the BACKEND value to 'BACKEND': 'django_pylibmc.memcached.PyLibMCCache' which I did a week ago.

An hour ago I´ve changed it back to my previous value: 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache' and everything works fine (in version 6.1.1, 6.1.2 and 6.2.2).

Looks like the answer was there all time time :relaxed:
Thanks a lot guys for your assistance

Lol, der Teufel steckt im Detail. Minor changes should be evaluated without the influence of major changes.

Hmm, OK. So for MikeMeyers reverting back the “Backend changes” fixed it for him. I seem to have the same issue with Seahub not running although not using any of the memcached stuff :frowning:

What can I provide you guys to support me on my problem?

Please post more details, or create a new thread with exactly what you have done

I think that their is any issue arise in its supporting software. So it is need to check and update properly or check Os of server and configure again.