Seahub web interface broken

Hi !
I just deployed Seafile on my server.
My problem is that if I change something in the administration pannel on seahub, the changes are not saved…
I can’t create groups, libraries or anything through seahub, it seems like something is missing (buttons maybe…).
But, I can add/download files from libraries through the desktop app with the admin account (the only account I have…).
Nothing appears in logs, the only feedback I have is a little “Error” box sometimes.
As I have absolutely no feedback about what’s going wrong, I don’t know what to do… the problem clearly comes from seahub itself because it’s possible to use seafile from a desktop client…
Do someone know where this problem might come from ?
Thanks for helping !

Can you please show us you seahub.log?

1 Like

It’s empty…

If that log is empty, then you may have permissions problems… Are you saying it exists, but has 0 bytes in it? What about the other logs in the logs folder? Do they have anything in them?

seahub.log exists but has 0 bytes indeed. I don’t think there’s any problem with permissions because all log files have the same permissions and seahub_django_request.log, seafile.log, and the others are not empty.

I don’t mind not using the web interface if I can create users, groups, and configure seafile through CLI, but I didn’t find any information about how to configure seafile without the web interface.

I tried using manage.py : I typed ./manage.py test and got :
(1044, “Access denied for user ‘seafile’@‘localhost’ to database ‘test_seahub-db’”)
So maybe the problem is that Seahub can’t access the DB ? How to fix it ?

Edit : I installed seafile again from the beginning, following the server manual, and I have exactly the same problem…

It could still be a permissions problem, just not necessarily with the log files. Can you post a copy of the other Seafile logs, including the django log file? Also, are you using NGinx or Apache?

I finally solved it. Seahub wants the HTTP referer headers, and on my computer I was blocking them partially…
There’s still an issue with Seahub not telling anywhere that the errors came from the missing referers.
Anyway, thanks for your help.

How were you blocking them?

Through Mozilla Firefox, in about:config I changed the parameter network.http.sendRefererHeader from 2 to 1.
The value 2 allows everything, 1 only some (I don’t remember exactly which ones), and 0 none.

Got ya… Thanks for that info. That may help someone in the future with the same problem.

Hi there, I am getting this browser issue as well and only since I have put Seafile behind Nginx. I have the same issue on all . browsers and devices, and in my Firefox, this setting is 2, but I still have the same issue.

In the browser, when connecting the first time on auth screen, everything is perfect, then you log on, and then the entire display is wierd.

See below:

Please, I have been battling for so long now, and everytig else is working, SSL, Multi-tenancy, but he display is now not working.

Can you post your NGinx configuration here?

server {
listen 80;
server_name files.uc-x.net;
rewrite ^ https://$http_host$request_uri? permanent;
return 301 https://$host$request_uri;
server_tokens off;
}

server {
listen 443 ssl;
server_name files.uc-x.net;
ssl on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:5m;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_ciphers 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-$
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
proxy_set_header X-Forwarded-For $remote_addr;
add_header Strict-Transport-Security “max-age=31536000; includeSubDomains”;
server_tokens off;

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 https;
     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;
    error_log	/var/log/nginx/seahub.error.log;
    fastcgi_read_timeout 36000;
}

# Reverse Proxy for seahub
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_send_timeout  36000s;
    send_timeout  36000s;
}

#CHANGE THIS PATH WITH YOUR OWN DIRECTORY
location /media {
    root /var/www/seafile/seafile-server/seahub;
}

}

That is the seafile.conf that is placed in the /etc/nginx/conf.d/seafile.cong

Herebelow is the nginx.conf

For more information on configuration, see:

* Official English Documentation: http://nginx.org/en/docs/

* Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

Load dynamic modules. See /usr/share/nginx/README.dynamic.

include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] “$request” ’
'$status $body_bytes_sent “$http_referer” ’
‘"$http_user_agent" “$http_x_forwarded_for”’;

access_log  /var/log/nginx/access.log  main;

sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 2048;

include             /etc/nginx/mime.types;
default_type        application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

server {
listen       80 default_server;
    listen       [::]:80 default_server;
    server_name  _;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    }

error_page 404 /404.html;
        location = /40x.html {
    }

error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
}

What happens when you try to access it from another machine internal to the network by using http://xxx.xxx.xxx.xxx:8000? Does it work then?

Also, can you check your /var/www/seafile folder and see if the hard link seafile-server-latest exists?

Also, check the service_url in the config files and the web interface, if possible.

Him,

  1. I just tried from 10.90.0.23 to this server, which is http://10.90.0.15:8000, and I get exactly the same problem.

  2. The hardlink does exist, see the contents of /var/www/seafile:
    [root@files seafile]# ls -la
    total 4
    drwxr-xr-x 10 nginx nginx 161 Apr 25 13:55 .
    drwxr-xr-x 3 root root 21 Apr 25 13:44 …
    drwxr-xr-x 3 nginx nginx 73 Apr 25 15:19 ccnet
    drwxr-xr-x 2 nginx nginx 140 Apr 25 14:07 conf
    drwxr-xr-x 2 nginx nginx 293 Apr 25 13:55 logs
    drwxr-xr-x 2 nginx nginx 71 Apr 25 18:43 pids
    drwxr-xr-x 3 nginx nginx 20 Apr 25 13:55 pro-data
    drwxr-xr-x 8 nginx nginx 102 Apr 25 13:55 seafile-data
    drwxr-xr-x 9 nginx nginx 4096 Oct 13 2017 seafile-server
    lrwxrwxrwx 1 nginx nginx 14 Apr 25 13:54 seafile-server-latest -> seafile-server
    drwxr-xr-x 3 nginx nginx 21 Apr 25 13:54 seahub-data

  3. Service_URL are shown below in the ccnet.conf file:
    [General]
    USER_NAME = files
    ID = 527786fbe4753af37ab353709895a4d85da69ec4
    NAME = files
    SERVICE_URL = https://files.uc-x.net

[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 10.90.0.25
PORT = 3306
USER = seafile
PASSWD = Friday@17h00
DB = ccnet-db
CONNECTION_CHARSET = utf8

Thanks for the help so far.

I’ve had the same problem (before the problem I had in this topic). The problem came from folder permissions. Nginx couldn’t access the seahub/media folder. Make sure all parents directories have their ‘x’ permissions on all users (In my case, the seafile user’s home folder had bad permissions, so nginx (the http user) couldn’t access its sub-folders.

I have checked this agin now, nginx own these files and folders and they all have 0755 rights. I even tried the media folder on 0777 permissions, still the same problem.

I do note one thing about your NGinx config, though I don’t think it’s related. Either it was a typo or you set it to hard code the folder. It’s better to use that hard link.

Change this line:
root /var/www/seafile/seafile-server/seahub;

To this:
root /var/www/seafile/seafile-server-latest/seahub;

You stated that before you installed NGinx, everything worked fine. As the previous poster mentioned, you could have a permissions problem. My media folder and all its contents are set to 755, which will allow read and execute access for everyone.

No, I just tried that too, made no difference. I did reload nginx after the change (nginx -s reload)