Configuration not working with new/other tvh-version
Added by Hartmut Birsner about 8 years ago
I have a working tvh-server on raspery pi3 (raspbian /linux-kernel 4.4.19-v7+). After updating (or downgrading) to an other tvh-version, I'm not able to login in webGUI and configuration seems not working any more. When I'm deleting the /home/tvheadend/.hts-Folder, I can login to webGUI but my configuration-data are all lost. How can I intergrate existing configuration-data (.hts-folder) in newer/other tvheadend-version?
Replies (6)
RE: Configuration not working with new/other tvh-version - Added by Mark Clarkstone about 8 years ago
Hartmut Birsner wrote:
I have a working tvh-server on raspery pi3 (raspbian /linux-kernel 4.4.19-v7+). After updating (or downgrading) to an other tvh-version, I'm not able to login in webGUI and configuration seems not working any more. When I'm deleting the /home/tvheadend/.hts-Folder, I can login to webGUI but my configuration-data are all lost. How can I intergrate existing configuration-data (.hts-folder) in newer/other tvheadend-version?
Depends on the version, there are issues with using an older config with a newer tvheadend version and vice versa, especially going from 3.x to 4.x.
RE: Configuration not working with new/other tvh-version - Added by Hartmut Birsner about 8 years ago
I don't think that's the point, because I'm using only 4.x versions.
RE: Configuration not working with new/other tvh-version - Added by Jonathan Thomson about 8 years ago
Although not guaranteed, I've found that the configuration from the 4.1/master branch remains compatible through the builds, so a config for the latest build works with a build from say 3 months ago and vice versa - I doubt it's supported but that's my findings after running TVH in my home for the past 3 months or so.
However, your issue doesn't sound like a configuration issue per-se. I've witnessed this behaviour when the user (the linux user that is) who created the configuration is different to the user running the binary.
Check the username of the "good" configuration - it should be /home/hts/.hts/tvheadend by default
If you are testing a new build of TVHeadend before installing it (sudo make install) then you MUST run the tvheadend binary as the user who normally runs it or else it will create a new/default configuration under your current user - for me, that would mean issuing the following command;
sudo su hts
...to switch to the 'hts' user (the default tvheadend user account which runs the tvheadend service) and then executing the new tvheadend binary whilst running as that user.
If there is any mismatch between the user who created the configuration and the current user, you will always end up creating and/or running the default configuration.
You could also copy the .hts folder from the default location to your main (pi?) user account but then you'd need to fix all the permissions and I just don't think it's worth doing that.
RE: Configuration not working with new/other tvh-version - Added by Hartmut Birsner about 8 years ago
Yes, I guess the configuration-issue is triggered by something like user-rights or ownership-mismatch. Therefore your explanation seems very helpfull to me.
I build the tvh package (./configure &&make &&make install) as root. The init.d-start-stop-script declares "tvheadend" as tvuser and tvgroup. Therefore I guess in my case the user running the binary is "tvheadend" and not "hts". Can you confirme this?
According to this the username of the "good" configuration is /home/tvheadend/.hts/tvheadend (=path of my configuration-data). So I should use probably the command
sudo su tvheadend
I will try out your suggestens (switch to tvheadend-user before installing a new build to run the new binary first time as this user). I assume to solve this issue, with this explanation. Thanks!
RE: Configuration not working with new/other tvh-version - Added by Jonathan Thomson about 8 years ago
It seems that some distros (Fedora is one that springs to mind) use 'tvheadend' as the user so yes, just substitute 'hts' for 'tvheadend' in the above
RE: Configuration not working with new/other tvh-version - Added by Hartmut Birsner about 8 years ago
I checked this out. Config-data seems not compatible between TVH 4.0 and 4.1. A downgrade is not possible for me with config-data preserved even by following the suggested solution.
Whereas after an upgrade from TVH 4.1-2141 to 4.1-2236 the new version accepts the config-data and everything works fine.