Seafile - ERROR downloading shared links -- SOLVED --

Hi,
we have Seafile Pro and were running version 7.0.10 for a year. I decided to upgrade to newest 7.x.x available. Followed pre-install notes, installed new Python a changed nginx config.

Seafile/Seadrive clients are working OK on Mac/Win, syncing files.

Now we cannot Download files from shared links or Upload files to Upload shared Upload folder. After clicking on Download link it says: This site cant be reached. ERR_CONNECTION_REFUSED.
I checked all configs, googled simillar errors but didnt find any solution.
Only found some possible hacking attempts in seahub.log, like:
WARNING: django.request:152 get_response Not Found /index.php … (+many wp-login wordpress attempts).

Original site was deployed with Install script from tutorial, Ubuntu 18.04 LTS
Could anybody give me a hint ? Thank you.

Here are my configs:

ccnet.conf

[General]
USER_NAME = seafile
ID = xxxxxxx
NAME = seafile
SERVICE_URL = http://127.0.0.1:8000

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafile
PASSWD = xxxx
DB = ccnet_db
CONNECTION_CHARSET = utf8

seafile.conf

[fileserver]
port = 8082

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

seafdav.conf

[WEBDAV]
enabled = true
port = 8080
fastcgi = false
share_name = /seafdav

seahub_settings.py

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub_db’,
‘USER’: ‘seafile’,
‘PASSWORD’: ‘xxxxx’,
‘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’

TIME_ZONE = ‘Europe/Berlin’
SITE_BASE = ‘http://127.0.0.1
SITE_NAME = ‘Seafile Server’
SITE_TITLE = ‘Seafile Server’
SITE_ROOT = ‘/’
ENABLE_SIGNUP = False
ACTIVATE_AFTER_REGISTRATION = False
SEND_EMAIL_ON_ADDING_SYSTEM_MEMBER = True
SEND_EMAIL_ON_RESETTING_USER_PASSWD = True
CLOUD_MODE = False
FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2
SESSION_SAVE_EVERY_REQUEST = False
SESSION_EXPIRE_AT_BROWSER_CLOSE = False

FILE_SERVER_ROOT = ‘http://127.0.0.1/seafhttp

ONLYOFFICE_DESKTOP_EDITORS_PORTAL_LOGIN = True

gunicorn.conf.py

import os

daemon = True
workers = 5

bind = “127.0.0.1:8000”

pids_dir = ‘/opt/seafile/pids’
pidfile = os.path.join(pids_dir, ‘seahub.pid’)

timeout = 1200

limit_request_line = 8190

nginx conf

log_format seafileformat ‘$http_x_forwarded_for $remote_addr [$time_local] “$request” $status $body_bytes_sent “$http_referer” “$http_user_agent” $upstream_response_time’;

server {
listen 80;
server_name data.savet.sk;

proxy_set_header X-Forwarded-For $remote_addr;

location / {
     proxy_pass         http://127.0.0.1:8000;
     proxy_set_header   Host $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-Host $server_name;
     proxy_set_header   X-Forwarded-Proto $scheme;
     proxy_read_timeout  1200s;

     # used for view/edit office file via Office Online Server
     client_max_body_size 0;

     access_log      /var/log/nginx/seahub.access.log seafileformat;
     error_log       /var/log/nginx/seahub.error.log;
}

location /seafhttp {
     rewrite ^/seafhttp(.*)$ $1 break;
     proxy_pass http://127.0.0.1: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_request_buffering    off;

    access_log      /var/log/nginx/seafhttp.access.log seafileformat;
    error_log       /var/log/nginx/seafhttp.error.log;
}
location /media {
    root /opt/seafile/seafile-server-latest/seahub;
}
location /seafdav {
proxy_pass         http://127.0.0.1:8080/seafdav;
    proxy_set_header   Host $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-Host $server_name;
    proxy_set_header   X-Forwarded-Proto $scheme;
    proxy_read_timeout  1200s;
    client_max_body_size 0;

    access_log      /var/log/nginx/seafdav.access.log seafileformat;
    error_log       /var/log/nginx/seafdav.error.log;
}

}

This text will be hidden

Answering own question - as no reply for 2 weeks.

Installed new 8.01 Pro server and made side by side comparison of all config files.

First error was port 8000 in URL - it made its way into generated Shared Links. I deleted port in web settings URL and in config files. Shared links now working as intended.

Second error was Internal Error - it was caused by missing Office Preview config and instalation. I installed Libreoffice PDF convert according to manual and its OK now, no error.

1 Like