[Solved] Upgrade problems 6.2.5 to 6.3.2 and fastcgi to WSGI

Hello,

I upgrade the seafile server from 6.2.5 as usual via the script to 6.3.2 on Ubuntu 16.04.5, with mysql 5.7.23 and apache 2.4.18.
It’s a classical installation with apache https configuration.
I have to change the configuration from fastcgi to wsgi, change apache site enable file.conf and the script /etc/init.d/seafile-server
No visual problems at first with seahub, I see my library but I have problems with markdown file and the synchronisation seen not to work (may be link may be not).
First, when i click to display a file home.txt, it’s work, when I rename as home.md, that fails with an 404 error :

Page not found at /seafhttp/files/f466a704-a6d6-4c0d-b483-9b3940895dc1/truc.md html
Request URL: http://www.my-seafile.fr/seafhttp/files/f466a704-a6d6-4c0d-b483-9b3940895dc1/truc.md

NOTE the URL with http without https

That the first trouble but, I also got error with desktop sync (log file of the client applet.log):

https://www.my-seafile.fr/seafhttp/files/202fd412-77e6-4ab2-b841-502ae5def6c8/seafile-tutorial.doc: status code 404

I found the same error into seahub.log:
2018-08-01 18:21:05,890 [WARNING] django.request:152 get_response Not Found: /seafhttp/files/202fd412-77e6-4ab2-b841-502ae5def6c8/seafile-tutorial.doc
2018-08-01 18:03:36,914 [WARNING] django.request:152 get_response Not Found: /favicon.ico
2018-08-01 18:04:04,013 [WARNING] django.request:152 get_response Not Found: /seafhttp/protocol-version

I check the right trouble with chmod -R a+rwx seahub-data and chmod -R a+rwx seafile-server-latest as explain here: Upgrade problems 6.2.5 to 6.3.2

I check the configuration whitout finding the trouble.
So here configuration files:

Apache configuration file with https (remove certificate part) :

           Alias /media  /var/local/seafile/seafile-server-latest/seahub/media/
            <Location /media>
                    ProxyPass !
                    Require all granted
            </Location>
            RewriteEngine On
            # seahub
            SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
            ProxyPass / http://127.0.0.1:8000/
            ProxyPassReverse / http://127.0.0.1:8000/

            # seafile fileserver
            ProxyPass /seafhttp http://127.0.0.1:8082
            ProxyPassReverse /seafhttp http://127.0.0.1:8082
            RewriteRule ^/seafhttp - [QSA,L]

seafile.conf:
[fileserver]
host = 127.0.0.1
port = 8082
max_download_dir_size=10000
max_upload_size=10000

seahub_settings.py:
FILE_SERVER_ROOT = ‘https://www.my-seafile.fr/seafhttp

ccnet.conf:
[General]
SERVICE_URL = https://www.my-seafile.fr

gunicorn.conf:
import os
daemon = True
workers = 5
# default localhost:8000
bind = “0.0.0.0:8000”
# Pid
pids_dir = ‘/var/local/seafile/pids’
pidfile = os.path.join(pids_dir, ‘seahub.pid’)

I try to investigate and read a lot arround the trouble. i do not undestand why a request on https://www.my-seafile.fr/seafhttp/files/497af560-9c96-47b5-b656-3de13c2b7488/file.md will be convert to http://www.my-seafile.fr/seafhttp/files/497af560-9c96-47b5-b656-3de13c2b7488/file.md

I think a trouble into django new version and apache configuration proxy, but I don’t know where to look after. Nothing specific into apache log file, nothing realy useful into django log : gunicorn_error.log or any other log file.

I just beg to have some clues to investigate into the right direction. I don’t know if I should restart from the last backup.
Thank you for any kind of help.

Best

Pierre

Hi Pierre,
Does it matter that your # seahub and #seafile fileserver sections are in a different order than the documentation: https://manual.seafile.com/deploy/https_with_apache.html (seafile should be before seahub) ?

the only other thought I have, does Ubuntu use systemd ? Should you try a systemctl daemon-reload to pick up any changes you made to /etc/init.d/seafile-server ? (I’m only guessing, I’m not an Ubuntu or systemd expert).

Hi Pierre,
if u did some seahub customizations, try to revert them. This did it for me.

Hi Iamnacho,

thank a lot, it’s exactly that. The incorrect order of the rule of proxy lead to hide the URL /seafhttp by the first rule / so generic.
So much time to a tiny mistake but at least and discover the forum and two peoples who answer back.

Thank again

Best

Pierre