Hi,
I noticed shortly that I can’t start seafile via systemd or similar services.
When I start the server by logging into the seafile user (via su) and executing the seafile.sh and seahub.sh scripts (seahub in fastcgi) everything runs fine but when I try to automate the process e.g. via systemd I get django errors in the logfile (example, happens also with other tables at the end).
It seems that django couldn’t find specfic tables in the db. The strange thing is: The django backend for sqlite shows up in the stacktrace, but I use MySQL/MariaDB as my backend (specified in seahub_settings.py, works when started manually).
For me it looks like seahub is ignoring the settings file when started via systemd and uses the default values.
In my understanding, the .pyc file is recreated on every start of seahub. I deleted the file and started seahub again and no new .pcy appears. What could be the problem here?
Hi,
I’m running a Ubuntu 16.04 LTS with the newest kernel but I experienced the problem also on other Ubuntu Servers with other kernels.
These are my service files (mostly from the manual): [Links broken. See below].
I didn’t try to start seafile at startup because there are also other applications on my server that can’t be shut down. But I don’t think that it’s gonna work from startuo when it doesn’t work manually.
Btw: For example seafdav runs great, also in systemd mode. Its only seahub.
Thank you for your help but I don’t think thats the problem here. If I try to start seahub it starts w/o a error message, only when I try to access seahub it gives these error messages in the django log and shows a Page unavailable html page. Maybe I didn’t said that clear enough. Also, the dependencies of seahub (has to start after seafile) are specified in my .service file. (See my next post)
I took the most parts from the manual. I only added some small things.
But I now copy-pasted the .service files from the manual and changed only the path.
Nothing changed in the behaviour.
Yes, I’d do that. The Seafile team does not have the ressources to test every system and setup according to @daniel.pan. They need to find a way to clear these kinds of problems before changing anything.
As I already said (wrote in the forum and in the summary in the issue description) I now use exactly the template from the seafile manual (with customized paths and fastcgi for seahub, I’m runnning seahub behind a apache reverse proxy). Without /bin/bash. As I wrote twice.
If this is a configuration issue the issue is also in the seafile manual.
btw: I tried this some time ago with a script in /etc/init.d that uses sudo to run seafile/seahub as user seafile and the same error message came up.
Nope, the log is clean and looks nearly exactly as yours.
Thank you for your test. My systemctl status output looks nearly the same as yours. Only the LANG is not set in ENV... message doesn’t appear in my logs (neither it does on a manual start) and I use Seafile 6.1.1 instead of 6.0.9. But I don’t think this makes a difference, as I said I ran into this problem before on a completely independent system.
Is your VM a Ubuntu 16.04?
It seems like a config issue on my side but I really don’t know where. It doesn’t make any sense that the seahub settings file is ignored (?) if seahub is started via systemd. Where is a related config file?..