FAQ  •  Register  •  Login

Incomplete file when using SFTP

<<

lazytyper

Serviio newbie

Posts: 4

Joined: Sun Aug 21, 2022 5:38 pm

Location: UK

Post Sun Aug 21, 2022 5:49 pm

Incomplete file when using SFTP

Hi,

I noticed intermittently an issue where files are reporting as incomplete (file size reporting much smaller than system file size).

This means only part of the media can be watched.

To resolve I need to restart the Serviio process.

I found out this only occurs when I use SFTP to upload media to the serving system directly to the directory. Normally I use rsync which changes the filename once the full media file has transferred.

It seems that Serviio detects the new file partway through the transfer, but does not update the library when the transfer has completed.

  Code:
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"


Mounted at /dev/md127 on /mnt/media type xfs (rw,nosuid,nodev,relatime,attr2,inode64,logbufs=8,logbsize=32k,sunit=1024,swidth=2048,noquota,x-gvfs-show)

5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64

Serviio version 2.2.1
<<

cmakula

Streaming enthusiast

Posts: 30

Joined: Tue Oct 29, 2019 9:04 pm

Location: Chicago, Illinois, USA

Post Thu Aug 25, 2022 3:56 pm

Re: Incomplete file when using SFTP

If you go into the console in the Shared Folder page (under Library) after the SFTP transfer is completed and hit the button for "Force Refresh", it should rescan the library and start working properly.

At least it does in my case...
:ugeek:
Serviio Server - Dell PowerEdge R420, Dual Xeon E5-2420, 4x120 GB SSD RAID 0, 64 GB RAM (Serviio running from RAMdisk), 4 NICs (aggregated to LAN), 10Gbe to NAS, Ubuntu 22.04.1 Minimal
NFS File Server - Synology DS1517+, 20TB disk space (5x4TB), 4 NICs (aggregated to LAN), 10Gbe to Serviio Server
<<

lazytyper

Serviio newbie

Posts: 4

Joined: Sun Aug 21, 2022 5:38 pm

Location: UK

Post Fri Aug 26, 2022 5:47 pm

Re: Incomplete file when using SFTP

Yeah I usually just restart, but force refreshing does this also.

But this means I need to get to my PC to log in and run the command. Was hoping the library would refresh when the transfer completes.
<<

cmakula

Streaming enthusiast

Posts: 30

Joined: Tue Oct 29, 2019 9:04 pm

Location: Chicago, Illinois, USA

Post Mon Aug 29, 2022 8:25 pm

Re: Incomplete file when using SFTP

I put a shortcut icon on my cell phone for the console page. Takes me about 15 seconds to hit the button. Is usually fixed about 10-20 seconds after that.

Better than having to boot a PC each time.

I should also mention that you could also crontab a stop and start for the service for a time (like 4AM if you are not usually watching anything at that time of the day) and restart the serviio process daily. If you don't usually watch the media the same day it gets uploaded to the SFTP, it will be up to date by the time you go to play the media following day.

To give you an idea, my crontab looks like this (my setup is a little different, because I load up serviio via an rc.local script after script mounting my network shares): If you have serviio starting as a standard service, you may be able to use a single line/command (systemctl restart serviio.service). This crontab unloads serviio at 4AM every Wednesday morning, and starts it back up at 4:02AM. It also backs up my ramdisk image, empties the disk cache, and reboots the server on the 12th of each month, in case you were wondering what the other lines were.

# m h dom mon dow command

0 5 * * * rsync -arog /opt/ /optbackup/
2 5 * * * sync; echo 3 > /proc/sys/vm/drop_caches
0 3 12 * * /usr/sbin/reboot
0 4 * * 3 /opt/serviio/bin/serviio.sh -stop
2 4 * * 3 /opt/serviio/bin/serviio.sh
:ugeek:
Serviio Server - Dell PowerEdge R420, Dual Xeon E5-2420, 4x120 GB SSD RAID 0, 64 GB RAM (Serviio running from RAMdisk), 4 NICs (aggregated to LAN), 10Gbe to NAS, Ubuntu 22.04.1 Minimal
NFS File Server - Synology DS1517+, 20TB disk space (5x4TB), 4 NICs (aggregated to LAN), 10Gbe to Serviio Server

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 28 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.