Package Details: seahub 11.0.13-1

Git Clone URL: https://aur.archlinux.org/seahub.git (read-only, click to copy)
Package Base: seahub
Description: The web frontend for seafile server
Upstream URL: https://github.com/haiwen/seahub
Licenses: Apache
Submitter: eolianoe
Maintainer: Joffrey
Last Packager: Joffrey
Votes: 7
Popularity: 0.000000
First Submitted: 2017-07-03 09:48 (UTC)
Last Updated: 2024-11-14 17:03 (UTC)

Pinned Comments

Latest Comments

« First ‹ Previous 1 .. 7 8 9 10 11 12 13 14 Next › Last »

Captain_Rage commented on 2018-02-09 22:54 (UTC) (edited on 2018-02-09 23:11 (UTC) by Captain_Rage)

Gunicorn and wsgi seem to be running. When running 'ps aux | grep gunicorn':

[root@Computer bin]# ps aux | grep gunicorn
seafile  24972  0.3  2.6  18336 12752 ?        S    Feb05  16:51 python2.7 /usr/lib/seahub/bin/gunicorn seahub.wsgi:application -c /home/seafile/longboat/seafile-server/runtime/seahub.conf -b 0.0.0.0:8000
seafile  29062 31.9  3.8  24996 18752 ?        R    15:49   0:04 python2.7 /usr/lib/seahub/bin/gunicorn seahub.wsgi:application -c /home/seafile/longboat/seafile-server/runtime/seahub.conf -b 0.0.0.0:8000
seafile  29063 31.0  3.7  24600 18468 ?        R    15:49   0:04 python2.7 /usr/lib/seahub/bin/gunicorn seahub.wsgi:application -c /home/seafile/longboat/seafile-server/runtime/seahub.conf -b 0.0.0.0:8000
seafile  29064 30.9  3.8  24996 18752 ?        R    15:49   0:04 python2.7 /usr/lib/seahub/bin/gunicorn seahub.wsgi:application -c /home/seafile/longboat/seafile-server/runtime/seahub.conf -b 0.0.0.0:8000
root     29069  0.0  0.1   2520   516 pts/0    S+   15:49   0:00 grep gunicorn

Seahub used to work fine when using FastCGI through nginx. This was also a while ago before you made a proper package for Seahub. I suppose it was running from files that got downloaded using seahub-preupgrade and upgrade scirpts that followed.

Meanwhile, /home/seafile/longboat/seafile-server/runtime/seahub.conf is spewing out stuff like:

[2018-02-09 23:46:33 +0000] [2844] [INFO] Booting worker with pid: 2844
[2018-02-09 23:47:03 +0000] [24972] [CRITICAL] WORKER TIMEOUT (pid:2842)
[2018-02-09 23:47:03 +0000] [24972] [CRITICAL] WORKER TIMEOUT (pid:2843)
[2018-02-09 23:47:03 +0000] [24972] [CRITICAL] WORKER TIMEOUT (pid:2844)
[2018-02-09 23:47:03 +0000] [2843] [INFO] Worker exiting (pid: 2843)
[2018-02-09 23:47:03 +0000] [2844] [INFO] Worker exiting (pid: 2844)
[2018-02-09 23:47:03 +0000] [2842] [INFO] Worker exiting (pid: 2842)
[2018-02-09 23:47:04 +0000] [2848] [INFO] Booting worker with pid: 2848
[2018-02-09 23:47:04 +0000] [2849] [INFO] Booting worker with pid: 2849
[2018-02-09 23:47:04 +0000] [2850] [INFO] Booting worker with pid: 2850

Older entries, from when it used to work (using FastCGI), looked like this:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/commands/runfcgi.py", line 28, in handle
    runfastcgi(args)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/servers/fastcgi.py", line 184, in runfastcgi
    WSGIServer(get_internal_wsgi_application(), **wsgi_opts).run()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_fork.py", line 133, in run
    ret = PreforkServer.run(self, sock)
  File "/usr/lib/python2.7/site-packages/flup/server/preforkserver.py", line 123, in run
    if not self._spawnChild(sock): break
  File "/usr/lib/python2.7/site-packages/flup/server/preforkserver.py", line 296, in _spawnChild
    self._child(sock, parent)
  File "/usr/lib/python2.7/site-packages/flup/server/preforkserver.py", line 374, in _child
    self._jobClass(clientSock, addr, *self._jobArgs).run()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 646, in run
    self.process_input()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 682, in process_input
    self._do_params(rec)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 781, in _do_params
    self._start_request(req)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 765, in _start_request
    req.run()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 561, in run
    self.stderr.flush()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 328, in flush
    self._write(data)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 299, in _write
    self._conn.writeRecord(rec)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 697, in writeRecord
    rec.write(self._sock)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 532, in write
    self._sendall(sock, self.contentData)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 507, in _sendall
    sent = sock.send(data)
socket.error: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/management/commands/runfcgi.py", line 28, in handle
    runfastcgi(args)
  File "/usr/lib/seafile/seafileenv/lib/python2.7/site-packages/django/core/servers/fastcgi.py", line 184, in runfastcgi
    WSGIServer(get_internal_wsgi_application(), **wsgi_opts).run()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_fork.py", line 133, in run
    ret = PreforkServer.run(self, sock)
  File "/usr/lib/python2.7/site-packages/flup/server/preforkserver.py", line 123, in run
    if not self._spawnChild(sock): break
  File "/usr/lib/python2.7/site-packages/flup/server/preforkserver.py", line 296, in _spawnChild
    self._child(sock, parent)
  File "/usr/lib/python2.7/site-packages/flup/server/preforkserver.py", line 374, in _child
    self._jobClass(clientSock, addr, *self._jobArgs).run()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 646, in run
    self.process_input()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 682, in process_input
    self._do_params(rec)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 781, in _do_params
    self._start_request(req)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 765, in _start_request
    req.run()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 561, in run
    self.stderr.flush()
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 328, in flush
    self._write(data)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 299, in _write
    self._conn.writeRecord(rec)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 697, in writeRecord
    rec.write(self._sock)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 532, in write
    self._sendall(sock, self.contentData)
  File "/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 507, in _sendall
    sent = sock.send(data)
socket.error: [Errno 32] Broken pipe
[2017-09-23 19:26:07 +0000] [298] [INFO] Starting gunicorn 19.7.1
[2017-09-23 19:26:07 +0000] [298] [INFO] Listening at: http://0.0.0.0:8000 (298)
[2017-09-23 19:26:07 +0000] [298] [INFO] Using worker: sync
[2017-09-23 19:26:07 +0000] [302] [INFO] Booting worker with pid: 302
[2017-09-23 19:26:07 +0000] [303] [INFO] Booting worker with pid: 303
[2017-09-23 19:26:07 +0000] [304] [INFO] Booting worker with pid: 304
[2017-09-23 19:26:37 +0000] [298] [CRITICAL] WORKER TIMEOUT (pid:304)
[2017-09-23 19:26:37 +0000] [298] [CRITICAL] WORKER TIMEOUT (pid:302)
[2017-09-23 19:26:37 +0000] [298] [CRITICAL] WORKER TIMEOUT (pid:303)
[2017-09-23 19:26:37 +0000] [304] [INFO] Worker exiting (pid: 304)
[2017-09-23 19:26:37 +0000] [302] [INFO] Worker exiting (pid: 302)
[2017-09-23 19:26:37 +0000] [303] [INFO] Worker exiting (pid: 303)

Maybe this holds a clue...?!

I tried to check if all the pip packages are installed correctly in the virtual environment of Seahub. I did this by changing work directory to /usr/lib/seahub/bin, typing 'source activate' and running:

(seahub) [root@Computer bin]# pip2 list --local --format=columns
Package         Version
--------------- -------
appdirs         1.4.3  
bcrypt          3.1.4  
Beaker          1.8.1  
cffi            1.11.4 
chardet         3.0.4  
decorator       4.0.11 
flup            1.0.2  
imageio         2.1.2  
Mako            1.0.7  
MarkupSafe      1.0    
MySQL-python    1.2.5  
numpy           1.12.1 
packaging       16.8   
pip             9.0.1  
ply             3.10   
pycparser       2.18   
pyparsing       2.2.0  
python-dateutil 2.6.1  
setuptools      38.5.0 
simplejson      3.13.2 
six             1.11.0 
tqdm            4.11.2 
urllib3         1.22   
virtualenv      15.1.0 
web.py          0.37   

This returns the same results as running 'pip2 list --local --format=columns' as root. Does this mean that the virtual environment of Seahub is missing necessary packages?

I swear, I thought that I wasn't completely computer illiterate and/or idiotic before these Seahub problems began. Now I have tried so many iterations of everything and read so much documentation and I have still no bloody clue how this is supposed to work, with all the webserver stuff and different components in obscure virtual environments and outdated configuration files with wrong permissions and whatnot.

EDIT: @Joffrey And to answer your question: yes, nginx is available on 192.168.0.xx and Seahub used to be available on https://192.168.0.xx:8001 but now only shows '502 Bad Gateway nginx' (trying to access it locally doesn't change anything; it's the same problem).

Joffrey commented on 2018-02-08 08:46 (UTC) (edited on 2018-02-08 08:49 (UTC) by Joffrey)

@kuzalj Thank you for your feedback ;)

@Captain_Rage Can you access to the web interface with a local IP example 192.168.***.***:8000 ?

kuzalj commented on 2018-02-07 07:01 (UTC)

@Joffrey great job and thank you for all the help and suggestions. Proud to report after a long (months?) time of downtime with Seahub and Seafile, everything is working smoothly on both the Seahub and Seafile side, with WSGI. Thank you again!

Captain_Rage commented on 2018-02-05 16:12 (UTC) (edited on 2018-02-05 22:24 (UTC) by Captain_Rage)

For some reason seahub yet again doesn't start when invoking systemctl start seafile-server@myinstance (the clients sync but they can't see the libraries and when browsing the website '502 Bad Gateway' is shown). In /var/log/nginx/seafile.error.log messages like these appear:

2018/02/05 16:33:57 [error] 14823#14823: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 121.123.124.128, server: some.thing.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "some.thing.com:8001"

I have no idea how to troubleshoot this. I am doring everything according the the instructions and Seahub was working with FastCGI in the previous version. Can anyone explain what is going on?

EDIT: After changing the permissions recursively to seafile:seafile once again seahub started (but the '502 Bad Gateway' persists). It would be dearly appreciated if somebody with a working setup would post their ccnet.conf, seafile.conf and seahub_settings.py configuration files.

Joffrey commented on 2018-02-04 18:31 (UTC) (edited on 2018-02-04 18:31 (UTC) by Joffrey)

@Captain_Rage nginx.example.conf isn't installed in your system. But you can find it in the git. see: https://aur.archlinux.org/cgit/aur.git/tree/?h=seahub or:

git clone https://aur.archlinux.org/seahub.git

Captain_Rage commented on 2018-02-04 15:08 (UTC) (edited on 2018-02-04 15:09 (UTC) by Captain_Rage)

@Joffrey Heads up for the tip. I tried changing the permissions recursively, and it looks like it worked to make seahub start as the user seafile, but after restarting the seafile-server once more seahub didn't get started for some reason. Still looks like I have to sort out some issues. Now a question regarding v6.2.5-3. pacman -Qc seahub gives * nginx.example.conf: Add nginx configuration example for https and wsgi Where can I find this file? I tried pacman -Ql seahub | grep nginx.example.conf but it is nowhere to be found. Isn't it part of the package?

Joffrey commented on 2018-02-02 13:43 (UTC) (edited on 2018-02-02 13:43 (UTC) by Joffrey)

Major changes for v6.2.5-3 see ChangeLog : pacman -Qc seahub

Joffrey commented on 2018-01-29 13:50 (UTC)

@all: I replace eolianoe as maintain on seafile-server and seahub packages, @eolianoe: A big thank you for the work you did. I have some tests in progress that will be adopted maybe this week.

@Klemens maintain a virtualenv with pip is more ease, because not all dependencies are in AUR or the official repositories.

@kuzalj if you install a pkg with pip in your Arch, you'll corrupt your pacman DB, use pip only in a virtualenv. Yes, if you have installed gunicorn with pip remove it with pip. Seahub use gunicorn installation in virtualenv, you haven't need gunicorn official pkg.

kuzalj commented on 2018-01-29 01:23 (UTC)

@klemens Thank you so much! I wondered where those logs were. I found out it was erroring because I did not have the two factor tables in my sql database, which is odd because those got introduced back in 6.0.0 and i know i executed the upgrade script. I just re-ran the database upgrade and I finally am in Seahub for the first time in a while haha.

@Joffrey If i cleanly uninstall the pip installed Gunicorn and install with pacman, do you think i can use the original PKGBUILD to install/run seahub?

klemens commented on 2018-01-28 21:55 (UTC)

@kuzalj the seahub logs are stored in /tmp/seahub.log and /tmp/seahub_django_request.log (at least in my case).