Seahub not starting after adding memcached

I am learning about Seafile by setting up the CE version 6.2.5 on a Ubuntu 18.04 server in a Virtualbox VM. I plan to setup a real server in due course.

I am using the SQLlite data base and followed the approach in the official server manual. Everything has worked until I added the CACHE information to the seahub_settings.py file. Seahub fails to start with the different CACHE config suggested in both the official and the community manuals. I can find no errors in any log file. Systemd just says seahub failed to start.

Not sure what to do to diagnose this without any clear errors and would appreciate any guidance the community can provide

have you tried with this the community manual
https://seafile.readthedocs.io/en/latest/installation/memcached/

here is my configuration of memcached file seahub_settings.py on debian 9, I think it’s the same on ubuntu

# Config Memcached
CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': '127.0.0.1:11211',
    },
    'locmem': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    },
}

Hi Cisco, thanks for taking the time to reply.

I had tried config based on the community manual. I will try it again. It’s easy to make capitalisation errors or miss something.

I’ll post an update when I can.

I can only assume I had typos in the first two attempts at adding the config to seahub_settings.py. I have just recreated it and Cisco’s config works, as does the official manual. Still cannot get the community manual config to work though.

Thanks again Cisco.

    # -*- coding: utf-8 -*-
SECRET_KEY = "xxx"

FILE_SERVER_ROOT = 'http://192.168.0.18/seafhttp'

SERVE_STATIC = False
MEDIA_URL = '/seafmedia/'
SITE_ROOT = '/seafile/'
LOGIN_URL = '/seafile/accounts/login/'
COMPRESS_URL = MEDIA_URL
STATIC_URL = MEDIA_URL + 'assets/'
##########################################################
#Config above here works if everything below is hashed out
##########################################################

#####################################################
# Config from Community Manual - Does not work for me
#####################################################
#CACHES = {
#    'default': {
#        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
#        'LOCATION': '127.0.0.1:11211',
#    }
#}

#######################################
# Config Memcached from "Cisco" - works
#######################################
#CACHES = {
#    'default': {
#        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
#        'LOCATION': '127.0.0.1:11211',
#    },
#    'locmem': {
#        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
#    },
#}

#####################################
# Config from Official Manual - works
#####################################
CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': '127.0.0.1:11211',
    },
    'locmem': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    },
}
COMPRESS_CACHE_BACKEND = 'locmem'
1 Like