SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.03k stars 1.23k forks source link

Tvheadend problem after upgrade to to Version 4.3.20211121-31 #5014

Closed alickwilson closed 2 years ago

alickwilson commented 2 years ago

Setup

Package Name: Tvheadend Package Version: 4.3.20211121-31

NAS Model: Synology DS118 NAS Architecture: RTD1296 DSM version: 7.0.1-42218

Expected behavior

After update from earlier version Tvheadend should run and connect to port 9981.

Actual behavior

Tvheadend runs and then stops

Steps to reproduce

1. 2. 3.

Package log

Setup

Package Name: Package Version:

NAS Model: NAS Architecture: DSM version:

Expected behavior

Tell us what should happen

Actual behavior

Tell us what happens instead

Steps to reproduce

Uninstall Tvheadend (keep data), Python 3.1 (delete data) and ffmpeg (delete data). Reinstall all. Run Tvheadend

Package log

_Installer log: find logfile /var/log/packages/{package}.log, for DSM<6: /var/packages/{package}/target/var/{package}_installer.log and protocol in Package Center. You find service log and other log files in /var/packages/{package}/target/var. _

Insert the package log(s) here

Other logs

E.g. /var/log/messages or /var/log/synopkg.log


Insert log here
/var/packages/tvheadend/var/tvheadend.log
---
Wed Dec 22 12:12:42 NZDT 2021
Starting tvheadend command tvheadend -f -C -u sc-tvheadend -g tvheadend --http_port 9981 --htsp_port 9982 -c /volume1/@appdata/tvh >
2021-12-22 12:12:50.209 [  ERROR]:config: unknown subsystem '""'
2021-12-22 12:12:50.209 [   INFO]:main: Log started
2021-12-22 12:12:50.434 [   INFO]:http: Starting HTTP server 0.0.0.0:9981
2021-12-22 12:12:50.434 [   INFO]:htsp: Starting HTSP server 0.0.0.0:9982
2021-12-22 12:12:50.647 [   INFO]:config: backup: migrating config from 4.3~c6bb43d (running 4.3~b871020)
2021-12-22 12:12:50.647 [   INFO]:config: backup: running, output file /volume1/@appdata/tvheadend/backup/4.3~c6bb43d.tar.bz2
2021-12-22 12:12:50.648 [   INFO]:spawn: Executing "/bin/tar"
2021-12-22 12:13:35.546 [  ERROR]:spawn: /bin/tar: ./#recycle: Cannot open: Permission denied
2021-12-22 12:13:35.939 [  ERROR]:spawn: /bin/tar: Exiting with failure status due to previous errors
2021-12-22 12:13:35.955 [   INFO]:config: backup: completed
2021-12-22 12:13:35.955 [  ERROR]:config: command '/bin/tar cjf /volume1/@appdata/tvheadend/backup/4.3~c6bb43d.tar.bz2 --exclude b >
2021-12-22 12:13:35.955 [  ERROR]:config: executed in directory '/volume1/@appdata/tvheadend'
2021-12-22 12:13:35.955 [  ERROR]:config: please DON'T report this as an error, you may use --nobackup to skip
2021-12-22 12:13:35.955 [  ERROR]:config: ... or run the above command in the printed directory
2021-12-22 12:13:35.955 [  ERROR]:config: ... using the same user/group as for the Tvheadend executable
2021-12-22 12:13:35.955 [  ERROR]:config: ... to check the reason for the unfinished backup
2021-12-22 12:13:35.955 [  ERROR]:config: backup: fatal error
---
BenjV commented 2 years ago

Could you check if the folder "/volume1/@appdata/tvheadend/backup" exists and if so has "sc-tvheadend" write access there? Could you also check the permissions setting for "/bin/tar" that should be 755.

th0ma7 commented 2 years ago

Actually, I think the issue comes from the #recycle file/directory. This is done automagically by DSM to keep track of deleted files. I'm presuming that this is owned by root and not accessible by sc-tvheadend user. @alickwilson I suggest you manually remove that directory the do a stop/start of the package and see if this fixes things.

BenjV commented 2 years ago

A #recycle folder is created by DSM on a share when you activate the recycle bin functionality for that share.

There should not be a recycle folder on the root of the filesystem So why would a tar command use the ./#recycle folder?

alickwilson commented 2 years ago

Problem solved by removing directory #recycle.

Thanks for your help, @th0ma7 and @BenjV. I could not have solved this without your help.

FWIW, steps below.


Could you check if the folder "/volume1/@appdata/tvheadend/backup" exists and if so has "sc-tvheadend" write access there?

[root@DS118:~# ls -l /volume1/@appdata/tvheadend/backup total 5292 -rw-rw-rw- 1 sc-tvheadend tvheadend 535827 Feb 1 2020 4.2.8.tar.bz2 -rw-rw-rw- 1 sc-tvheadend tvheadend 1028036 Aug 11 2020 4.3~221c29b.tar.bz2 -rw-rw-rw- 1 sc-tvheadend tvheadend 770421 Jul 6 10:54 4.3~9ed76c0.tar.bz2 -rw-rw-rw- 1 sc-tvheadend tvheadend 1263824 Dec 22 16:02 4.3~c6bb43d.tar.bz2 -rw-rw-rw- 1 sc-tvheadend tvheadend 1095695 Dec 5 2020 4.3~ce09077.tar.bz2 -rw-rw-rw- 1 sc-tvheadend tvheadend 713609 Nov 3 15:16 4.3~eb59284.tar.bz2

Could you also check the permissions setting for "/bin/tar" that should be 755.

[root@DS118:~# ls -l /bin/tar -rwxr-xr-x 1 root root 416624 Aug 13 2020 /bin/tar

I suggest you manually remove that directory the do a stop/start of the package and see if this fixes things.

root@DS118:/var/packages/tvheadend/var# rm -r '#recycle'

Restart Tvheadend, runs OK.