Failed to start seafile server

My results are the same for ver 6.2.X… Needs over 1.5 gig of free memory. And the swap I’m talking about is a virtual memory swap, where disk space is used as memory.

He only has 512 MB of physical memory, which is not enough to run seafile 6.2.X, and much of that memory is already used by the router itself.

I know somewhere on Github there is discussion on packaging Seafile yourself for Entware-ng, and there may be a build for it out there. The last version I remember someone was successful was 5.0.X.

@ouchyoung

I still don’t think that’s going to be enough free memory. You could try bumping the swap up to 2 gb and try.

Also, have you checked any of your system logs to see if there are any clues there? If you are running out of memory, you might get a clue there.

Another thing… If you can open two separate terminal windows. In one, run seafile… In the other, have top running and watch what happens to the memory usage.

1 Like

Thanks for reminding me the system log.

I have already tried 2 Giga of swap but it still report a failure.

I checked the running programs using “top” and I did find “seaf-server…” running in the background, and telnet the server with 8082 port had a response. But when I came to starting ccnet, the server reported a locale problem, and cannot find the running seaf-server. Weired.

I’m now checking the system log, hoping there is something.

The entware doesn’t log by default… and I don’t know how to enable system log.:joy:

Yeah, in your original message, the logs showed that seafile was running, which I commented at the time that it seemed odd. It sounds like the server is running, but a portion of it is not. When you say starting ccnet, do you mean seahub? And, what is the error on the locale? Which file is that logged in?

So, there’s nothing under /var/log?

nothing under /opt/var/log (where the entware should have the log files saved).

I firstly ran seafile.sh to start seafile-server, then ran seahub.sh to start seahub, where reported the locale error. Here’s the error message (it’s reported following the command, not in a log file):

LANG is not set in ENV, set to en_US.UTF-8
LC_ALL is not set in ENV, set to en_US.UTF-8

Warning: seafile-controller not running. Have you run “./seafile.sh start” ?

I searched this and found a post descripting the same problem, not solved either… (I put that post previously in this post).

That LANG shouldn’t affect anything. It set it automatically for you, and UTF-8 is common. For some reason, seahub is reporting that seafile isn’t running, which is odd since the processes are running in the background. We’re missing something and it’s probably something simple.

I’ll look at it again tomorrow evening. I just spent the last 14 hours upgrading my server. In the process, my neighborhood got hit by a tornado and there was damage. Then, I got my car stuck in the mud, which it still is. And, I have minor surgery in the morning. It’s been a day and my brain is fried now… :wink:

Sorry to know that… Hope everything gets fine soon. BTW, are you in Indiana?

Nah… In Alabama… tornado alley.

Some questions for you:

  • What user were you logged in when you installed Seafile?
  • Did you get any errors during installation?
  • Have you checked permissions on the files and folders, particularly the seafile-data folder?
  • Can you stop seahub, then seafile, then start seafile, and then seahub, and then for that particular time, post the results of the ccnet.log, controller.log, seafile.init.log, seafile.log, seahub.init.log, seahub.log, and the seahub_django_request log?
  1. The entware uses “admin” to login. I didn’t create any user so seafile was installed with user “admin”, a root user;
  2. No errors during installation.
  3. I checked the permissions with “ls -l”, almost all folders and files were in all user accessible status. But I’m not sure with all of them, need double check.
  4. I will try to stop those and to see the log files later.

Ok, that’s possibly your problem. Installing seafile as a root user has caused a lot of people some problems. And, also, installing it outside the home directory has as well. In your ccnet.conf file, “Name = Seafile” should be in there. It is the unprivileged user used to start Seafile. According to the manual, all operations in Seafile should be from a non-root user, including running the install script.

As for permissions, I have mine set at 755 for most everything in Seafile with the exception of a few files. If I can recall correctly, installing as the root user causes permissions problems. Those log files, especially the .init files, should give us a clue.

Hmm… Guess so. Will try to create a user and reinstall seafile later. Thank you so much.

Still no luck…
I created a user named “Seafile” and used this user to install seafile server by using “sudo”.
I configured the server following the guide, but I modified the port, because the default port is in using by the firmware.

I still got this error message:

[03/22/18 11:54:13] ../common/session.c(132): using config file /opt/share/seafile/conf/ccnet.conf
Starting seafile server, please wait ...
Failed to start seafile server

And the logs (only 3 logs in the logs folder) don’t help much:
seafile.log:

[03/22/18 11:54:15] http-server.c(160): fileserver: worker_threads = 10
[03/22/18 11:54:15] http-server.c(175): fileserver: fixed_block_size = 8388608
[03/22/18 11:54:15] http-server.c(190): fileserver: web_token_expire_time = 3600
[03/22/18 11:54:15] http-server.c(205): fileserver: max_indexing_threads = 1
[03/22/2018 11:54:15 AM] ../common/mq-mgr.c(54): [mq client] mq cilent is started

ccnet.log

[03/22/18 11:54:13] ../common/session.c(132): using config file /opt/share/seafile/conf/ccnet.conf
[03/22/18 11:54:13] ../common/session.c(455): socket file exists, delete it anyway
[03/22/18 11:54:14] ../common/session.c(484): Listen on /opt/share/seafile/ccnet/ccnet.sock for local clients
[03/22/18 11:54:14] ../common/session.c(290): Update pubinfo file
[03/22/18 11:54:14] ../common/session.c(398): Accepted a local client
[03/22/18 11:54:14] ../common/session.c(398): Accepted a local client
[03/22/18 11:54:15] ../common/session.c(398): Accepted a local client
[03/22/18 11:54:15] ../common/session.c(398): Accepted a local client

Controller.log

[03/22/18 11:54:13] seafile-controller.c(154): starting ccnet-server ...
[03/22/18 11:54:13] seafile-controller.c(73): spawn_process: ccnet-server -F /opt/share/seafile/conf -c /opt/share/seafile/ccnet -f /opt/share/seafile/logs/ccnet.log -d -P /opt/var/run/seafile/ccnet.pid
[03/22/18 11:54:13] seafile-controller.c(88): spawned ccnet-server, pid 21295
[03/22/18 11:54:14] seafile-controller.c(555): ccnet daemon connected.
[03/22/18 11:54:14] seafile-controller.c(186): starting seaf-server ...
[03/22/18 11:54:14] seafile-controller.c(73): spawn_process: seaf-server -F /opt/share/seafile/conf -c /opt/share/seafile/ccnet -d /opt/share/seafile/seafile-data -l /opt/share/seafile/logs/seafile.log -P /opt/var/run/seafile/seaf-server.pid
[03/22/18 11:54:14] seafile-controller.c(88): spawned seaf-server, pid 21318
[03/22/18 11:54:14] seafile-controller.c(528): seafdav not enabled.

And here’s the configuration from my ccnet.conf:

[General]
USER_NAME = Seafile
ID = 1ed4346fac74c8381217f7e2ff296a2bac105220
NAME = Seafile
SERVICE_URL = http://10.10.10.1:9999

[Client]
PORT = 13419

Here’s the memory status after running the script:

                     total          used              free       shared      buffers

Mem: 514508 108308 406200 0 1948
Swap: 2097148 0 2097148
Total: 2611656 108308 2503348

Here’s the backgroud running threads (part of threads in the system):

21319     1 Seafile  S     116M 23.0  0.0 seaf-server -F /opt/share/seafile/conf -c /opt/share/seafile/ccnet -d /opt/share/seafile/seafile-data -l /opt/share/seafile/logs/seafi
21298     1 Seafile  S    14116  2.7  0.0 ccnet-server -F /opt/share/seafile/conf -c /opt/share/seafile/ccnet -f /opt/share/seafile/logs/ccnet.log -d -P /opt/var/run/seafile/cc
21296     1 Seafile  S    10176  1.9  0.0 /opt/bin/seafile-controller -c /opt/share/seafile/ccnet -d /opt/share/seafile/seafile-data -F /opt/share/seafile/conf
  587     1 admin    S     5088  0.9  0.0 /usr/sbin/httpd /tmp/httpd.conf

I’m totally defeated… :joy:

You definately need more RAM on this device, the pi is optimised and has 1GB RAM in the newer versions.

Seafile is definitely starting, but something is preventing it from completing, apparently, or it’s looking for something it cannot access… Have you checked your dependencies and versions?.

BTW, what happens when you key 10.10.10.1:9999 in a browser?

Not sure about dependencies, the official website suggests to install python-requests, and all those dependencies were installed automatically during installation in entware. I checked the website, the browser reported “no response” or something like that (my browser reports in Chinese so I can’t describe the error message accurately in English).

You may wind up having to build Seafile yourself rather than using the standard repositories. I don’t know what your repositories are set to in your sources.list file, but they could be pointed to Linux repositories.

Entware on github has some information and the files necessary to build your own. You can locate them in the link below. Just scroll down and look at the seafile sections. In the “makefile” of each one, you’ll find the list of required dependencies.

Thank you so much for the information. Actually, I installed seafile from the Entware repo. They compiled it for ARMv7 here: http://pkg.entware.net/binaries/armv7/Packages.html