Cannot start seahub

I am having an issue with Seafile, I cannot start Seahub when running ./ restart command I get the following error:

root@seafile:/opt/seafile/seafile-server-8.0.2# ./ restart

Seahub is not running
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./ start" again

The specs of the box are as follows:

OS: Ubuntu 20.04 (all updates installed)
NGiNX: 1.18 (Ubuntu’s Repo)

Seafile does run:

root@seafile:/opt/seafile/seafile-server-latest# ./ start

Seafile controller is already running, pid 16807

But systemctl won’t run it:

root@seafile:/opt/seafile/seafile-server-8.0.2# systemctl start seafile.service
Job for seafile.service failed because the control process exited with error code.
See "systemctl status seafile.service" and "journalctl -xe" for details.
root@seafile:/opt/seafile/seafile-server-8.0.2# systemctl status seafile.service
● seafile.service - Seafile
     Loaded: loaded (/etc/systemd/system/seafile.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-01-11 20:14:19 UTC; 12s ago
    Process: 17073 ExecStart=/opt/seafile/seafile-server-latest/ start (code=exited, status=217/USER)

Jan 11 20:14:18 seafile systemd[1]: Starting Seafile...
Jan 11 20:14:18 seafile systemd[17073]: seafile.service: Failed to determine user credentials: No such process
Jan 11 20:14:18 seafile systemd[17073]: seafile.service: Failed at step USER spawning /opt/seafile/seafile-server-latest/ No such process
Jan 11 20:14:19 seafile systemd[1]: seafile.service: Control process exited, code=exited, status=217/USER
Jan 11 20:14:19 seafile systemd[1]: seafile.service: Failed with result 'exit-code'.
Jan 11 20:14:19 seafile systemd[1]: Failed to start Seafile.

Seahub doesn’t start:

root@seafile:/opt/seafile/seafile-server-latest# ./ start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./ start" again

What can I do to fix this? What am I doing wrong?

Try ./ start-fastcgi. It gives a more verbose output.
(Fastcgi-mode has been discontinued, but the command should still give you information.) There are many different possible reasons why seahub doesn’t start, mostly due to unmet python dependencies.

The issue was the lack of mysqlclient installed via pip3. So the instructions should be updated to install

apt-get install libmysqlclient-dev

and then

pip3 install mysqlclient

How did you determine that was the missing dependency? I’m in a similar boat as you with seahub unable to start, I installed all the pip modules from the instructions plus this mysql client but I’m still stuck, I’d love to be able to figure out the problem but I can’t get any log output or more detailed error message. start-fastcgi just gives me Unknown command: 'runfcgi'.

try pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy django-pylibmc django-simple-captcha python3-ldap future mysqlclient lxml captcha

If you still get start errors, make sure to run start with your seafile user instead of root to catch any permission problems.

I have never had pip3 on my Debian 10 system. I am running mariadb and getting

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Error:Seahub failed to start.

even though I have run the following:
apt-get install default-libmysqlclient-dev python-pip3

pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

when I run sudo pip3 install future mysqlclient, I get:
error: invalid command ‘bdist_wheel’
Failed building wheel for mysqlclient

Reverting back to 7.1.5 until I have more info on how to potentially resolve this.

Thank you, I was missing the lxml python dependency. Now it’s working. The frustrating part is that this dependency is (apparently) not documented, and that the error messages when a python dependency is missing are completely opaque.

Edit: Seahub not actually working, my eyes fooled me.

Sorry, although I was in fact missing the lxml module, installing it didn’t correct my error. I didn’t see the Seahub failed to start message somehow at first, but when I went to pull up seahub in the browser it didn’t work and when I went back to the terminal I saw that dreaded error message. So I’m back at square one, I can’t start seahub and I have zero error output as to why it won’t work.

I had a similar problem. I needed to install ntfs-3g to get Seahub to start.

Thanks for the suggestion but installing ntfs-3g did not help. It would’ve been very odd if it did since I’m not using ntfs anywhere on the system.

My issue was resolved here: Error:Seahub failed to start - RPI 7.1.5

There was no missing dependency or anything like that, rather the config was pointing to a pids folder that didn’t exist.