[solved] Seafile status Active: active (exited)


#1

Hello! i’m trying to run seafile on a raspbian jessie and i don’t know if i’m experiencing errors with nginx or seafile : i get this. Should’nt the aswer be active (running)?

slyholborn@julouspi:/var/www/mycloud/conf $ sudo service seafile status -l
● seafile.service - Seafile
   Loaded: loaded (/etc/systemd/system/seafile.service; enabled)
   Active: active (exited) since mar. 2018-02-06 11:49:28 CET; 1 day 6h ago
  Process: 1846 ExecStop=/var/www/mycloud/seafile-server-latest/seafile.sh stop (code=exited, status=0/SUCCESS)
  Process: 1860 ExecStart=/var/www/mycloud/seafile-server-latest/seafile.sh start (code=exited, status=0/SUCCESS)
 Main PID: 1860 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/seafile.service

févr. 06 11:49:25 julouspi seafile.sh[1860]: [02/06/18 11:49:25] ../common/session.c(132): us...onf
févr. 06 11:49:25 julouspi seafile.sh[1860]: Starting seafile server, please wait ...
févr. 06 11:49:28 julouspi seafile.sh[1860]: Seafile server started
févr. 06 11:49:28 julouspi seafile.sh[1860]: Done.
févr. 06 11:49:28 julouspi systemd[1]: Started Seafile.
févr. 06 22:35:15 julouspi systemd[1]: Started Seafile.
Hint: Some lines were ellipsized, use -l to show in full.

Thanks!


#2

Think it is exited because the script to launch all seafile components exited.


#3

Ok, but then how can i see if it’s running or not?


#4

I have diverted from the manual and used Type=forking in the [Service] section of the systemd units.
Then it looks like this:

● seafile.service - Seafile
   Loaded: loaded (/opt/seafile/systemd/seafile.service; enabled)
   Active: active (running) since Wed 2018-02-07 15:36:27 CET; 23h ago
  Process: 5368 ExecStart=/opt/seafile/seafile-server-latest/seafile.sh start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/seafile.service
           ├─5428 /opt/seafile/seafile-pro-server-6.2.7/seafile/bin/seafile-controller -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -F /opt/seafile/conf
           ├─5432 ccnet-server -F /opt/seafile/conf -c /opt/seafile/ccnet -f /opt/seafile/logs/ccnet.log -d -L /opt/seafile -P /opt/seafile/pids/ccnet.pid
           ├─5469 /usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
           ├─5526 seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -L /opt/seafile
           ├─5527 /usr/bin/python2.7 -m wsgidav.server.run_server --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
           └─5529 /usr/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExpl...

Feb 07 15:36:23 seafile-rlp-bgtask-01 seafile-control[5414]: seafile-controller.c(1124): loading seafdav config from /opt/seafile/conf/seafdav.conf
Feb 07 15:36:24 seafile-rlp-bgtask-01 seafile.sh[5368]: [02/07/18 15:36:23] ../common/session.c(139): using config file /opt/seafile/conf/ccnet.conf
Feb 07 15:36:24 seafile-rlp-bgtask-01 seafile.sh[5368]: [02/07/18 15:36:24] ../common/license.c(440): Loading license file /opt/seafile/seafile-license.txt ..
Feb 07 15:36:24 seafile-rlp-bgtask-01 seafile.sh[5368]: Starting seafile server, please wait ...
Feb 07 15:36:24 seafile-rlp-bgtask-01 seafile-control[5426]: seafile-controller.c(1124): loading seafdav config from /opt/seafile/conf/seafdav.conf
Feb 07 15:36:27 seafile-rlp-bgtask-01 seafile.sh[5368]: Seafile server started
Feb 07 15:36:27 seafile-rlp-bgtask-01 seafile.sh[5368]: Done.
Feb 07 15:36:27 seafile-rlp-bgtask-01 systemd[1]: Started Seafile.

#5

Works great! but now, i can’t use service for seahub : i have to launch it manualy :

    sudo service seahub start
    Job for seahub.service failed. See 'systemctl status seahub.service' and 'journalctl -xn' for details.

    systemctl status seahub.service
● seahub.service - Seafile hub
   Loaded: loaded (/etc/systemd/system/seahub.service; enabled)
   Active: failed (Result: exit-code) since jeu. 2018-02-08 21:14:09 CET; 23s ago
  Process: 25820 ExecStop=/var/www/mycloud/seafile-server-latest/seahub.sh stop (code=exited, status=0/SUCCESS)
  Process: 25828 ExecStart=/var/www/mycloud/seafile-server-latest/seahub.sh start-fastcgi (code=exited, status=1/FAILURE)
 Main PID: 25828 (code=exited, status=1/FAILURE)

#6

and nginx won’t work…


#7

Are you sure you want to use start-fastcgi there?

And for further help you should paste your seahub.service file then (systemctl cat seahub.service).


#8

when i started with seafile, i used a tuto in which they were using fast-cgi : as i don’t know much about servers i did exactly as on the tuto… i saw in the doc it was not recomanded so i try without, but i think i have issues with nginx : my other site doesn’t work anymore!


#9
systemctl cat seahub.service
# /etc/systemd/system/seahub.service
[Unit]
Description=Seafile hub
After=network.target seafile.service

[Service]
#change start to start-fastcgi if you want to run fastcgi
ExecStart=/var/www/mycloud/seafile-server-latest/seahub.sh start-fastcgi
ExecStop=/var/www/mycloud/seafile-server-latest/seahub.sh stop
User=slyholborn
Group=slyholborn
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

#10

Ok, well for both nginx and seahub you need to check their (error) log files.
You will probably find the reasons why it doesn’t work there.


#11

I’ll first change my seahub.service not to use fast-cgi.


#12

It works on my network even if seahub is also exited… but i remember it’s only running when asked. Am i mistaken?

        seahub.service - Seafile hub
           Loaded: loaded (/etc/systemd/system/seahub.service; enabled)
           Active: active (exited) since ven. 2018-02-09 17:16:14 CET; 2h 37min ago
          Process: 1334 ExecStart=/var/www/mycloud/seafile-server-latest/seahub.sh start (code=exited, status=0/SUCCESS)
         Main PID: 1334 (code=exited, status=0/SUCCESS)
           CGroup: /system.slice/seahub.service
                   ├─1576 python2.7 /var/www/mycloud/seafile-server-6.2.5/seahub/thirdpart/gunicorn seahub.wsgi:application -c /var/www/mycloud/seafile-server-6.2.5/runtime/seahub.conf -b 0.0.0.0:8000 --preload
                   ├─1630 python2.7 /var/www/mycloud/seafile-server-6.2.5/seahub/thirdpart/gunicorn seahub.wsgi:application -c /var/www/mycloud/seafile-server-6.2.5/runtime/seahub.conf -b 0.0.0.0:8000 --preload
                   ├─1631 python2.7 /var/www/mycloud/seafile-server-6.2.5/seahub/thirdpart/gunicorn seahub.wsgi:application -c /var/www/mycloud/seafile-server-6.2.5/runtime/seahub.conf -b 0.0.0.0:8000 --preload
                   ├─1632 python2.7 /var/www/mycloud/seafile-server-6.2.5/seahub/thirdpart/gunicorn seahub.wsgi:application -c /var/www/mycloud/seafile-server-6.2.5/runtime/seahub.conf -b 0.0.0.0:8000 --preload
                   ├─1633 python2.7 /var/www/mycloud/seafile-server-6.2.5/seahub/thirdpart/gunicorn seahub.wsgi:application -c /var/www/mycloud/seafile-server-6.2.5/runtime/seahub.conf -b 0.0.0.0:8000 --preload
                   └─1634 python2.7 /var/www/mycloud/seafile-server-6.2.5/seahub/thirdpart/gunicorn seahub.wsgi:application -c /var/www/mycloud/seafile-server-6.2.5/runtime/seahub.conf -b 0.0.0.0:8000 --preload

    févr. 09 17:16:04 julouspi seahub.sh[1334]: Starting seahub at port 8000 ...
    févr. 09 17:16:14 julouspi seahub.sh[1334]: Seahub is started
    févr. 09 17:16:14 julouspi seahub.sh[1334]: Done.
    févr. 09 17:16:14 julouspi systemd[1]: Started Seafile hub.

#13

seems like i’ve got fast-cgi issues with nginx…

2018/02/08 08:41:37 [error] 15948#15948: *46 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 66.118.142.165, server: julously.com, request: "HEAD /myadmin/scripts/setup.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:"

Even i i still have issues, my first question has an answer. I’m passing this thread to resolve and i open a new one. Thanks a lot!


#14

This is php, not Seafile.


#15

I know that, but if my nginx isn’t working, i cant acces seafile outside of my network…So first i have to make nginx work again, and then configuring it for seafile…