Seahub "Failed to create thumbnail"

Hi, I just upgrade seafile to 6.1.1. Install dependencies like ffmpeg(avconv with alias cause Debian) and everything works except video thumbnails.
After load seahub page with video files list, I get ton of “400 Bad Request” (XHR aka AJAX) and content of response is JSON {"err_msg": "Failed to create thumbnail."} on url https://seafile.example.com/thumbnail/ff3b2d63-795d-4e2d-ad0b-90cdda0b954d/create/?path=%2FYDXJ0728.mp4&size=48&_=1498462436309 . As you can see it’s going for video thumbnail. And logs under /haiwen/seafile-server-lates/runtion/access|error.log are empty.

System
Linux Vendetta 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
Seafile
6.1.1 x64
Apache
Server version: Apache/2.4.10 (Debian)

1 Like

There should also be logs at /haiwen/seafile-server-latest/logs/

Nothing like that ls -la:

total 148
drwxrwxr-x  6 root root  4096 Jun 13 07:52 .
drwxr-xr-x 15 root root  4096 Jun 26 06:27 ..
-rw-rw-r--  1 root root 11322 Jun 13 07:52 check_init_admin.py
-rwxrwxr-x  1 root root  1821 Jun 13 07:52 reset-admin.sh
drwxrwxr-x  2 root root  4096 Jun 26 11:26 runtime
-rwxrwxr-x  1 root root  1937 Jun 13 07:52 seaf-fsck.sh
-rwxrwxr-x  1 root root  3325 Jun 13 07:52 seaf-fuse.sh
-rwxrwxr-x  1 root root  2832 Jun 13 07:52 seaf-gc.sh
drwxrwxr-x  6 root root  4096 Jun 13 07:53 seafile
-rwxrwxr-x  1 root root  5176 Jun 13 07:52 seafile.sh
drwxrwxr-x 12 root root  4096 Jun 13 07:50 seahub
-rwxrwxr-x  1 root root  7737 Jun 13 07:52 seahub.sh
-rw-rw-r--  1 root root 52792 Jun 13 07:52 setup-seafile-mysql.py
-rwxrwxr-x  1 root root  2604 Jun 13 07:52 setup-seafile-mysql.sh
-rwxrwxr-x  1 root root 22058 Jun 13 07:52 setup-seafile.sh
drwxrwxr-x  4 root root  4096 Jun 13 07:49 upgrade

And YES actualy I’m running seafile/seahub under root user

Oh, sorry, the folder should be one folder above.

My bad, didn’t see it:

2017-06-26 06:15:20,317 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/haiwen/seafile-server-6.1.1/seahub/seahub/../../../seahub-data/thumbnail/1024/2dca381d5d2f5331e2657fc409c91d44d3771c00'
2017-06-26 06:15:20,401 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/haiwen/seafile-server-6.1.1/seahub/seahub/../../../seahub-data/thumbnail/1024/0a616af2c27098494dce76342b0c99670a3df566'
2017-06-26 06:15:20,458 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/haiwen/seafile-server-6.1.1/seahub/seahub/../../../seahub-data/thumbnail/1024/818e642d61a9bc770502b3b14c756bcc3c13220e'
2017-06-26 06:15:22,835 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/haiwen/seafile-server-6.1.1/seahub/seahub/../../../seahub-data/thumbnail/1024/ef903160778c203725cb71b3fa3fbca094f63ecf'
2017-06-26 06:15:33,855 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/haiwen/seafile-server-6.1.1/seahub/seahub/../../../seahub-data/thumbnail/1024/3e0961d22e5fa5fbab3ad971756d7b15ac148fed'
2017-06-26 06:15:33,879 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/haiwen/seafile-server-6.1.1/seahub/seahub/../../../seahub-data/thumbnail/1024/1072f34253e31920b160994d3bc053f8798345cc'

1 Like

I had the same problem and I resolved it.
My problem was the version of Pillow.
You can see the version you need on the doc:
seafile-server-latest/seahub/requirements.txt

To solve this just do:

Check the version: pip show Pillow
Uninstall the actual version: pip uninstall Pillow
Install a compatibile version: pip install Pillow==2.6.1

Is this the same issue for pictures?
I get issues with thumbnails for the pictures sometimes, not all of the time just sometime.

I did just fix my issue, I did have the same as you.
What I did was
Sudo -H pip uninstall Pillow

then

sudo -H pip install Pillow

Then the version 4.3 of Pillow did get installed and it works much better then the previous ones and my error in the log files are gone also.
So I’m happy.

Also 2.6.1 don’t support you to look at jpg files trough the webbrowser.

P.S Version 4.3 works better with Video thumbnails also.

You can use --upgrade next time, so you don’t have to uninstall package.

pip install --upgrade Pillow

1 Like

Thanks, that’s a much faster way.
So you did also upgrade Pillow to 4.3?

I did new server deploy(new machine) some time ago and thumbnails start work. And yes, using 4.3

Ok, Thanks.
Have you updated all of the PIP packet to the newest version not just Pillow?

Don’t know, did fresh install.

Here is my pip list

acme (0.10.2)
certbot (0.10.2)
certbot-apache (0.10.2)
chardet (2.3.0)
ConfigArgParse (0.11.0)
configobj (5.0.6)
cryptography (1.7.1)
decorator (4.0.11)
dnspython (1.15.0)
enum34 (1.1.6)
funcsigs (1.0.2)
getmail (4.53.0)
idna (2.2)
imageio (2.1.2)
ipaddress (1.0.17)
keyring (10.1)
keyrings.alt (1.3)
mock (2.0.0)
mod-python (3.3.1)
moviepy (0.2.3.2)
mysqlclient (1.3.7)
numpy (1.13.1)
olefile (0.44)
parsedatetime (2.1)
pbr (1.10.0)
Pillow (4.3.0)
pip (9.0.1)
psutil (5.0.1)
pyasn1 (0.1.9)
pycrypto (2.6.1)
pygobject (3.22.0)
PyICU (1.9.5)
pyOpenSSL (16.2.0)
pyRFC3339 (1.0)
python-augeas (0.5.0)
python-ldap (2.4.28)
pytz (2016.7)
pyxdg (0.25)
requests (2.12.4)
SecretStorage (2.3.1)
setuptools (33.1.1)
six (1.10.0)
tqdm (4.11.2)
urllib3 (1.19.1)
wheel (0.29.0)
zope.component (4.3.0)
zope.event (4.2.0)
zope.hookable (4.0.4)
zope.interface (4.3.2)

@holantomas

I have the same error logs as you

2017-11-14 17:20:03,716 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/66a3a89a25a2251434aad9c74ac281976c9cdd49'
2017-11-14 17:20:05,778 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/91e8a5f768d7709f01941a9866ff261d98729c4a'
2017-11-14 17:20:06,561 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/0e7c5050eba4d16927d6dd916353a87f4a583eec'
2017-11-14 17:20:07,104 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/87b0ab9e2fa56acf43a855e4b033d06a722a955c'
2017-11-14 17:20:07,650 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/484d54abbb135ee8e333873fbba9ff327e1bb5fa'
2017-11-14 17:20:08,148 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/2c6f7830bb74bf5edab6bee43fc05bf4956c67aa'
2017-11-14 17:20:47,608 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/fafffece73d48ef3da78f94481439e798fbbffd2'
2017-11-14 17:20:47,736 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/8c42cb8c7c75bb7d16b6f03990517c0342b1d5f6'
2017-11-14 17:20:47,739 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/339d273fba174964feda4c3021c4230d4274f29a'
2017-11-14 17:20:51,002 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/67ade3805da0dfb1b6dfa54bbf0c2a6b4485161e'
2017-11-14 17:20:51,626 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/584e7a60111af7908e0f23b98ed8cff0a7c022de'
2017-11-14 17:20:51,776 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/c4e52e1b6f07557ee1c33b0414795533489d0bee'
2017-11-14 17:20:51,979 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/2348b0619eb80eb64faa4f4d928f0a2b72f161e7'
2017-11-14 17:20:52,246 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/d216ab6c3b21cec88feba62678c9e6125947aa12'
2017-11-14 17:25:47,346 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/e847a2681561e3a2378f52ace138d35cf329dd67'
2017-11-14 17:25:47,545 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/aee9d30dc7d0127593c22d0c699fcd1361698867'
2017-11-14 17:25:47,644 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/37165fcb6b90f2f25e5e4b6857a61c6ebd9893fc'
2017-11-14 17:25:47,646 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/c5192b40452f85b637b5a0dd39cd209ff75c4325'
2017-11-14 17:25:50,900 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/2ca45e034de1bd88a32622ca411ab21070f8eab8'
2017-11-14 17:25:54,854 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/2484cfcea59cab8b5de45d54d92acbf44b0b4c6b'
2017-11-14 17:26:38,785 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/d6087acd7f8be2725481abd74c1f17faeb719b3b'
2017-11-14 17:26:41,604 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/d6c49335524a2c0a2367a29a75d4a0e228e9b45d'
2017-11-14 17:26:42,801 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/39f788b56dca696fbb3c759086b73d08c54ce982'
2017-11-14 17:26:44,071 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/36b66cce30f6ef8816561def0443a62cbf885b25'
2017-11-14 17:26:48,010 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/2405f9a0297ea4439b8e0cd10a7e4cf28c44f5e4'
2017-11-14 17:26:49,336 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/afbac24ce58746af8546bb066e5aec01f7ba5d42'
2017-11-14 17:26:50,358 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/f18493644c0957c601d7186e1b6e3a08fb6b045f'
2017-11-14 17:26:51,068 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/7a8088df84b695765ee8b53786ad82f482e1e1cd'
2017-11-14 17:26:51,734 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/b5a99d880e2860594355724dfdbd7bca5d17c5d1'
2017-11-14 17:26:52,434 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/b08a4ed30573de1c486fa5fc349700bcb5e2f1f2'
2017-11-14 17:27:27,041 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/2d23960628ad9a214d2ae2aee9d525fc884bf724'
2017-11-14 17:27:27,125 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/ef051b84f394997689827520bb21579c041b8fd2'
2017-11-14 17:27:27,131 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/9028a0982e47ce600d20f7bb74a4a87a3f2578e3'
2017-11-14 17:27:29,632 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/9cb5831d7c05034ad6e2f594c4ce8b9118357318'
2017-11-14 17:27:50,491 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/65661aa5bbadda4890d236b13877e77e4b15e4d4'
2017-11-14 17:27:50,586 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/ab579bce6952a99312b9866a05a434147ffc36a5'
2017-11-14 17:27:50,594 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/bd07c6285933dd0dd3a509b71a8e658494259bc1'
2017-11-14 17:28:04,108 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/650c40e88382f2f8a29cf3140a8c2297f2ab935d'

My pillow is

Name: Pillow
Version: 2.6.1
Location: /usr/lib/python2.7/dist-packages

But when i do

pip install --upgrade Pillow

I get a lot of errors

----------------------------------------
  Can't roll back Pillow; was not uninstalled
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-epzeKv/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dbGvjO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-epzeKv/Pillow
Storing debug log for failure in /root/.pip/pip.log

Regards

Pillow was not correcty installed.

I had to do :

apt-get install libjpeg-dev
apt-get install zlib1g-dev
pip install --upgrade Pillow

To make it work.

But i still have this logs when i display an image

2017-11-14 19:22:43,500 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/9d0dd60e7364fbdab56e894ad88bda4f9495a6db'
2017-11-14 19:22:43,500 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/d22475bc9c5bed9327dd4bc2e9e6b00b9bb70f3f'
2017-11-14 19:22:43,543 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/3a78519128e5258ba85b44a67c6d37bcc7a9e565'
2017-11-14 19:22:43,543 [ERROR] seahub.thumbnail.views:77 latest_entry [Errno 2] No such file or directory: '/home/cc/seafile/seahub-data/thumbnail/thumb/1024/cb29899383815ca3c3986a153a4de1c3255226dc'

Can anyone help ?

Regards

Do you have any issues more then that line are written in the log files?

Hi,

unfortunately, I can’t find any issue related to these lines…
When i click on images on thumbnail view, they display correctly.
It’s weird, but it occurs frequently.

Could it happens because the path /home/cc/seafile/seahub-data/thumbnail/thumb/ is a symlink to and NFS storage folder ?

Otherwise, Pillow and Moviepy are such a mess to install, i’m not sure they work properly.

regards,
gautier

Then it’s not a issue, I have it too but as far as I can see it’s a false positiv error in the log.
Don’t bother about it.

@gauburtin I have sometimes errors too but I see my thumbnailes working so don’t care about. You can upgrade Pillow as root it will produce some errors (pip is really shitty SW) but if you try after pip list | grep "Pillow" you will see newer version.

After upgrade, don’t forget for cleanup cache and restart seahub

1 Like

Hi,

I did uninstall Pillow and Moviepy and delete Python-dist by hand, because it crashed my server !
Now as you say, i have logs errors about moviepy and pillow not installed, but i don’t care about as my server is running and the thumbnails are working…

@daniel.pan I can’t figure out why this modules (and ffmpeg) are required
I’d prefer that the prerequisites for Seafile to be more stable and not dangerous for my system (debian Jessie).

Regards,
Gautier