Seahub.log not logging


#1

I am trying to setup a fail2ban with seafile community edition on a raspberry pi. I have updated it to 6.2.5 however since the installation of 6.1.2 earlier I just noticed that the seahub.log which should log failed attempts does not log anything the last file modification date is JAN 29
$ ls -l|grep seahub
-rw-r–r-- 1 seafile seafile 27145 Jan 29 20:47 seahub.log

the content is: 2018-01-29 20:47:41,388 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: …

Whenever I try to input invalid credentials to the apache interface of seafile server it does not log anything.


#2

Looks like seahub isn’t really working since then, can you upload files ?


#3

Yes, seafile works I can upload files, I can access localhost 8082,8000 ports they are working but I just do not get a log if the user has invalid password on login. They log file is at logs/seahub.log right? but there is another folder in seafile-server-latest/runtime/log but they are empty files.


#4

My standard Seafile is on a Dedicated Server. But to test updates and try soththing new I have another on a pi, but I usually don’t use it. The Server works with seafile 6.2.3 and logs. But the pi (seafile 6.2.5), there’ nothing in seahub.log. I don’t know why, maybe it’s caused by the software.

Edit: You don’t become the password log in seahub.log, my looks like that:

2018-01-21 19:28:14,364 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:28:17,974 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:28:18,570 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:28:19,079 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or direct2018-01-21 19:28:14,364 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:28:17,974 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:28:18,570 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:28:19,079 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or ory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:31,222 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:31,545 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:31,846 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:32,096 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:33,318 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:34,185 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:44,728 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-21 19:29:45,412 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/seafile/seafile-server-6.2.3/seahub/seahub/../../../$
2018-01-31 14:33:46,128 [ERROR] seahub.api2.endpoints.copy_move_task:148 post move file failed
2018-01-31 14:33:47,772 [ERROR] seahub.api2.endpoints.copy_move_task:148 post move file failed
2018-01-31 14:34:19,407 [ERROR] seahub.api2.endpoints.copy_move_task:148 post move file failed

#5

According to https://manual.seafile.com/security/fail2ban.html, the attempt will only be logged

Each time a user/computer tries to connect and fails 3 times

did you really try it three times?


#6

Yes I did try almost 2015 times, the seahub.log does not fill up. The last modification date was 2 days ago. I will upload my seafile config later on and hope it will clear things up.


#7

I had that once, reason was I did configure memcached in seahub_settings.py, but forgot to actually install memcached with sudo apt-get install memcached. So it’s probably worth checking if you really have all requirements installed.


#8

I did not use memcached so it is not installed.
anyway here is the seahub_settings.py

-- coding: utf-8 --

SECRET_KEY = “secretkeyhere”
FILE_SERVER_ROOT=‘https://mysite.ddns.com/seafhttp
TIME_ZONE =‘UTC’
MAX_NUMBER_OF_FILES_FOR_FILEUPLOAD = 2000
LANGUAGE_CODE = ‘en’
SITE_TITLE = ‘Seafile Cloud’
SITE_NAME = ‘Seafile’


#9

fixed by explicitly defining max failed login

LOGIN_ATTEMPT_LIMIT in seahub-settings