Django request log full of warnings


#1

Hi all,

my seahub_django_request.log is full of these Warnings:

2017-05-06 17:32:08,997 [WARNING] django.request:170 get_response Not Found: /seafile/api2/server-info/
2017-05-14 21:11:57,129 [WARNING] django.request:170 get_response Not Found: /seafile/api2/ping/

Any chance to fix this?


#2

Yes, fix your config. Either seahub settings or nginx / webserver, possibly both.


#3

I’ve already tried to fix both config files, but I really can’t find any relevant settings

seafile.conf for nginx:

server {
    listen 443 ssl http2 default_server;
    gzip off;
    server_name www.domain.de domain.de;
    proxy_set_header X-Forwarded-For $remote_addr;
        if ($allowed_country = no) {
            return 444;
        }
    location / {
        fastcgi_pass    127.0.0.1:8000;
        fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
        fastcgi_param   PATH_INFO           $fastcgi_script_name;
        fastcgi_param    SERVER_PROTOCOL        $server_protocol;
        fastcgi_param   QUERY_STRING        $query_string;
        fastcgi_param   REQUEST_METHOD      $request_method;
        fastcgi_param   CONTENT_TYPE        $content_type;
        fastcgi_param   CONTENT_LENGTH      $content_length;
        fastcgi_param    SERVER_ADDR         $server_addr;
        fastcgi_param    SERVER_PORT         $server_port;
        fastcgi_param    SERVER_NAME         $server_name;
        fastcgi_param   REMOTE_ADDR         $remote_addr;
        fastcgi_param   HTTPS               on;
        fastcgi_param   HTTP_SCHEME         https;
        access_log      /var/log/nginx/seahub.access.log;
        error_log       /var/log/nginx/seahub.error.log;
        fastcgi_read_timeout 36000;
    }
    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 0;
        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;
        send_timeout  36000s;
        proxy_request_buffering off;
    }
}

seahub_settings.py (stripped Databases etc.)

FILE_SERVER_ROOT = ‘https://domain.de/seafhttp

CACHES = {
‘default’: {
‘BACKEND’: ‘django.core.cache.backends.memcached.MemcachedCache’,
‘LOCATION’: ‘127.0.0.1:11211’,
}


#4

Check that you have https in ccnet.conf. Maybe you need a http to https redirection? Check with the manual for possible errors


#5

Ok, you deployed Seafile on some domains root and the requests log that someone tried to access Seafile at non root domain. Thus it logged 404 (file not found).


#6

I have a similar problem, every 5 minutes a message appears in the file seahub.log
2018-06-09 12:01:38,526 [WARNING] django.request:152 get_response Not Found: /api2/events/
2018-06-09 12:06:38,525 [WARNING] django.request:152 get_response Not Found: /api2/events/