Cluster Configuration with Search and Background Task Node

Hello again,

I’m having a little trouble applying the various parts of documentation regarding configuring a Seafile Pro cluster with a dedicated background task node (e.g. https://manual.seafile.com/deploy_pro/enable_search_and_background_tasks_in_a_cluster.html and https://manual.seafile.com/deploy_pro/deploy_in_a_cluster.html).

When I want to start the background tasks, I find in the log:

[2017-02-10 16:41:45,515] [ERROR] Another instance is already running
Traceback (most recent call last):
  File "/opt/seafile/seafile-pro-server-6.0.7/pro/python/seafevents/main.py", line 186, in _ensure_single_instance
    sync_client.register_service_sync(self.DUMMY_SERVICE, self.DUMMY_SERVICE_GROUP)
  File "/opt/seafile/seafile-pro-server-6.0.7/seafile/lib64/python2.6/site-packages/ccnet/sync_client.py", line 94, in register_service_sync
    self.send_cmd(cmd)
  File "/opt/seafile/seafile-pro-server-6.0.7/seafile/lib64/python2.6/site-packages/ccnet/sync_client.py", line 49, in send_cmd
    raise RuntimeError('Failed to send-cmd: %s %s' % (resp.code, resp.code_msg))
RuntimeError: Failed to send-cmd: 516 The service existed
[2017-02-10 16:41:45,515] [INFO] exit with code 1

which is true:

seafile   7436  0.0  0.0  54796  3712 ?        Ss   13:57   0:00 /opt/seafile/seafile-pro-server-6.0.7/seafile/bin/seafile-controller -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -F /opt/seafile/conf
seafile   7441  0.0  0.4 237336 33436 ?        Sl   13:57   0:09  \_ /usr/bin/python2.7 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --loglevel debug --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
seafile   7539  0.0  0.0   4336   756 ?        S    13:57   0:00  |   \_ /bin/sh -c "/usr/bin/python3" "/opt/seafile/seafile-pro-server-6.0.7/pro/python/seafevents/office_converter/unoconv.py" "-vvv" "--pipe" "seafilepipe" "-l"
seafile   7541  0.0  0.4 165296 31224 ?        Sl   13:57   0:00  |   |   \_ /usr/bin/python3 /opt/seafile/seafile-pro-server-6.0.7/pro/python/seafevents/office_converter/unoconv.py -vvv --pipe seafilepipe -l
seafile   7543  0.0  0.7 557920 50032 ?        Sl   13:57   0:00  |   |       \_ /usr/lib/libreoffice/program/soffice.bin --invisible --nocrashreport --nodefault --nologo --nofirststartwizard --norestore --accept=pipe,name=seafilepipe;urp;StarOffice.ComponentContext
seafile  15791  0.0  0.0      0     0 ?        Z    16:37   0:00  |   \_ [sh] <defunct>
seafile   7442  0.8  4.3 3482568 312224 ?      Sl   13:57   1:21  \_ /usr/bin/java -Xms256m -Xmx1g -Xss256k -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Delasticsearch -

On the background task node, I have:

  • seafevents.conf:
[INDEX FILES]
enabled = true
interval = 10m
index_office_pdf = true
  • seahub_settings.py:
OFFICE_CONVERTOR_NODE = True

On the other nodes, I have

  • seafevents.conf:
[INDEX FILES]
enabled = true
interval = 10m
index_office_pdf = true
external_es_server = true
es_host = seafile-rlp-bgtask-01.zdv.uni-mainz.de
es_port = 9500
  • seahub_settings.py:
OFFICE_CONVERTOR_ROOT = "https://seafile-rlp-bgtask-01.zdv.uni-mainz.de"

What could I be missing here?

Best regards,
Moritz

Is the problem solved?

No, but I didn’t change anything. :wink:
I was thinking that the configuration is not fully correct, is it?

When I want to start the background tasks, I find in the log:

Is this the output when you type “./seafile-background-tasks.sh start”?

No, that is from logs/seafile-background-tasks.log.

The output from the command is:

seafile@seafile-rlp-bgtask-01:/opt/seafile/seafile-server-latest$ ./seafile-background-tasks.sh start

Starting seafile background tasks ...
Error: failed to start seafile background tasks.
Please try to run "./seafile-background-tasks.sh start" again

Have you tried

./seafile-background-tasks.sh stop

Thanks for the detailed reporting. Do you have the cluster section in your seafile.conf?

[cluster]
enabled = true

If not, try stop the seafile server, add it, then try to start seafile server as well as the the background tasks script.

Thanks, after fixing that part in seafile.conf, this issue is resolved, too… :wink:

1 Like