Mac Desktop client data transfer interrupted

Folks I’ve some issues with a Seafile installation running on Docker on NAS behind a reverse proxy.

Seafile is set up on port 8000 going through to 443 on a Synology via their web interface. I can add some advanced variables to tweak things, but I’m new to RPs so don’t really know how to fix this.

I’m connecting via the web interface, and uploading SOME files, like a few small folders, but I’m trying to put up a Joplin folder with 45000 or so very small files in and it gives me the following errors. I also got errors on the smaller folders but it finished syncing after going through the errors, it just resumed the sync and finished.

I’ve been reading the forum a lot but there’s a bunch of stuff about Nginx servers that’s going a bit over my head. I do have some movement to configure the Synology with some advanced settings, so if anybody has some ideas about that I could try and translate them to the Syn interface.

Thanks in advance.

James

Desktop log:

06/23/20 00:56:26] http-tx-mgr.c(929): libcurl failed to PUT {httpsseafileURL}/seafhttp/repo/1edc3e9f-d4c7-49a7-bb81-2b0feb49b9fb/block/516826427d90991571b85bf83390d6d80298d5bd: Operation was aborted by an application callback.
[06/23/20 00:56:26] http-tx-mgr.c(929): libcurl failed to PUT {httpsseafileURL}/seafhttp/repo/1edc3e9f-d4c7-49a7-bb81-2b0feb49b9fb/block/e2396b0c51c2b9469c2e3a3e5965df2dc28fad77: Operation was aborted by an application callback.
[06/23/20 00:56:27] http-tx-mgr.c(1157): Transfer repo '1edc3e9f': ('normal', 'data') --> ('error', 'finished')
[06/23/20 00:56:27] sync-mgr.c(621): Repo 'Joplin' sync state transition from uploading to 'error': 'Data transfer was interrupted. Please check network or firewall'.

Docker file:

sudo docker create \
  --name seafile \
      -e SEAFILE_SERVER_HOSTNAME=example.com \
      -v /volume1/docker/seafile:/shared \
      -p 8000:80 \
      -e PUID=1029 \
      -e PGID=100 \
      --restart unless-stopped \
    seafileltd/seafile:latest

Seafile conf files:

ccnet.conf:

[General]
USER_NAME = seafile
ID = eccc9f60a63b8c85c02d387d188928c8a25ffe11
NAME = seafile
SERVICE_URL = {http-seafileURL}:8000

[Client]

PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafile
PASSWD = edbee2c2-4a9a-467a-b5d6-e721532c8ee9
DB = ccnet_db
CONNECTION_CHARSET = utf8

[Client]
UNIX_SOCKET = /opt/seafile/ccnet.sock

seafdav.conf:

[WEBDAV]

enabled = false

port = 8080

fastcgi = false

share_name = /

seafile.conf:

[fileserver]
port = 8082

[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = xxx
db_name = seafile_db
connection_charset = utf8

seahub_settings.py:

SECRET_KEY = "xxx"

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'seahub_db',
        'USER': 'seafile',
        'PASSWORD': 'edbee2c2-4a9a-467a-b5d6-e721532c8ee9',
        'HOST': '127.0.0.1',
        'PORT': '3306'
    }
}


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'
FILE_SERVER_ROOT = "{http-seafileURL}/seafhttp"

seahub log:

2020-06-23 14:48:33,729 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:autofilled): Transport endpoint is not connected
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django_pylibmc/memcached.py", line 130, in get
    return super(PyLibMCCache, self).get(key, default, version)
  File "/opt/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/cache/backends/memcached.py", line 79, in get
    val = self._cache.get(key)
Error: error 26 from memcached_get(:1:autofilled): Transport endpoint is not connected

Local client log:

[06/23/20 16:35:57] http-tx-mgr.c(929): libcurl failed to PUT https://{seafileURL}/seafhttp/repo/b3a90257-72c9-4a52-83f4-83c4d586dd73/block/cdd0e81cd5a2a67eaaa99e5583158a7aae6ef757: Operation was aborted by an application callback.
[06/23/20 16:35:57] http-tx-mgr.c(1157): Transfer repo 'b3a90257': ('normal', 'data') --> ('error', 'finished')
[06/23/20 16:35:57] sync-mgr.c(621): Repo 'xxx' sync state transition from uploading to 'error': 'Data transfer was interrupted. Please check network or firewall'.

I’ve been at it for the whole day trying to work through this problem.

Seafile works without the reverse proxy in place, synced 4GB of data super fast.

The problem with the Synology is that it locks down ports 443 and 80 for it’s own Nginx RP server, so installing other systems can be a bit of a pain in the arse to configure (switching ports), and you may need to redo that work upon updates, so I’d rather get it configured for the existing software.

The problem with the existing reverse proxy interface is that they don’t allow for much in the way of configuration. You can add some stuff like ‘proxy_pass’, but you can’t add the location /seafhttp config settings.

I’ve ended up changing the nginx config file inside the synology - only problem is that if I open the control panel on synology, it reverts back to how it was before.

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name {seafileURL};

    ssl_certificate /usr/syno/etc/certificate/ReverseProxy/xxx/fullchain.pem;

    ssl_certificate_key /usr/syno/etc/certificate/ReverseProxy/xxx/privkey.pem;

    add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload" always;

    location / {

        proxy_connect_timeout 12000;

        proxy_read_timeout 12000;

        proxy_send_timeout 12000;

        proxy_intercept_errors off;

        proxy_http_version 1.1;

        proxy_set_header        Host            $http_host;

        proxy_set_header        X-Real-IP            $remote_addr;

        proxy_set_header        X-Forwarded-For            $proxy_add_x_forwarded_for;

        proxy_set_header        X-Forwarded-Proto            $scheme;

        proxy_pass http://192.168.1.77:8000;

    }

    error_page 403 404 500 502 503 504 @error_page;

    location @error_page {
        root /usr/syno/share/nginx;
        rewrite (.*) /error.html break;
        allow all;
    }

    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break ;
        proxy_pass http://192.168.1.77:8082 ;
        client_max_body_size 0;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;
        proxy_request_buffering off;
    }

    location /media {
    root /opt/seafile/seafile-server-latest/seahub;

    }


}

I think the Seahub log points to file uploading errors via the browser