Couchpotato version in FreeNAS?

Status
Not open for further replies.

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
My programs doing the downloading are qbittorrent (running as root inside a jail) and sabnzbd (I don't know how the PBI is configured but it's set to write out files with a 777 permission in the options)
It's not consistent either :( that's the idiot thing, it's random when files will just spit up "access denied" hence me just brute forcing the problem.
I live alone, no other users, so I don't care about security.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
assumimg you are using a package for qbitorrent, you could set the user for it as media in your rc.conf
you'd also need to change the ownership of qbitorrent's data files but that should be a one time thing
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Josh:

I'm extremely confused and ... frustrated right now, I'm not sure if I owe you an apology or what the hell (Maybe RuddBurger at GIThub made some changes?)
Long story short, I broke my first CP install and set up a new, vanilla, PBI based, regular old plugin version of CP.
All I did to the entire install was copy /mnt/jails/couchpotato_1/blah/blah/blah/config.ini (and the .DB file) into my /mnt/jails/couchpotato_2 directory

So yeah, it's "vanilla as heck"
Lo and Behold,,... my server emailed me this morning that it's grabbed 2 updates and updated CP?
Furthermore, I checked the filesystem, sure enough confirmation - the /downloaders/blackhole/ folder has been removed and /downloaders/blackhole.py is there
(So basically, updates are working properly)

? I thought you managed to re-create my problem too, has something changed?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Josh:

I'm extremely confused and ... frustrated right now, I'm not sure if I owe you an apology or what the hell (Maybe RuddBurger at GIThub made some changes?)
Long story short, I broke my first CP install and set up a new, vanilla, PBI based, regular old plugin version of CP.
All I did to the entire install was copy /mnt/jails/couchpotato_1/blah/blah/blah/config.ini (and the .DB file) into my /mnt/jails/couchpotato_2 directory

So yeah, it's "vanilla as heck"
Lo and Behold,,... my server emailed me this morning that it's grabbed 2 updates and updated CP?
Furthermore, I checked the filesystem, sure enough confirmation - the /downloaders/blackhole/ folder has been removed and /downloaders/blackhole.py is there
(So basically, updates are working properly)

? I thought you managed to re-create my problem too, has something changed?
I have no idea, lol, but glad you got it working.

I just tested again and it still doesn't update properly from a new install. I'll still post an updated PBI soon for other who need the fix.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Well... that's confusing? Maybe if you wait it will eventually update?
I didn't do anything different, what the heck is going on?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Well... that's confusing? Maybe if you wait it will eventually update?
I didn't do anything different, what the heck is going on?
Not sure, I could speculate though.
Maybe the config you gave it had variable that didn't make sense with the older version. CP got confused and did a full pull of the current source from github?
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Has something been done to the CP plugin?
I saw a button labelled update so I clicked it, even though mine claims to have been updating itself automatically anyhow - silly me?
It's now at (2/2) and been stiting at 50% for 25 minutes?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Has something been done to the CP plugin?
I saw a button labelled update so I clicked it, even though mine claims to have been updating itself automatically anyhow - silly me?
It's now at (2/2) and been stiting at 50% for 25 minutes?
there were some issues with in app updates so I refreshed the version being shipped. added SSL support. and moved CP data directory to /var/db/couchpotato

an update from a previous FN version is not recommended because the old datadirectory is still in /usr/pbi/couchpotato-amd64/etc/couchpotato
so the update will take a while as it's packaged up. after the update you'll need to manually move the datadirectory if you don't want to start from scratch.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I might install a fresh copy andcopy my DB and INI File over and hope for the best..... I think this one has had it Jim - but it was doomed for a while, at least now updates might work (I know they started working again for me, but it was also kind of out of the blue too? Made no sense why they suddenly fixed themselves!)
Hope the .db and .cfg are compatible, I'll find out.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I think it renames or moves the data, where would my .db file be now? The find command is an awful awful thing, it's gargantuanly complex for no apparent reason.
EDIT:
What EXACTLY does this script do? This "update" script? Does it just completely delete folders / files for the existing version and install the new one inside the jail? I mean is it basically just a complete trash of the jail?

I'm curious if you could just install it fresh rather than use the update button?
I've found a couchpotato.db file in my freshly installed CP (to try and fix the problem) and in my old one - both are identically 5120 bytes.........
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Nope, it FINALLY finished updating my version - it's finished updating and I'm being prompted to use the wizard, tell me the .DB file is in a .OLD directory or something please?

You're going to have a heap of users who are going to damage their older CP installs if they click your new "update" button that's been published, this is very bad. Tell me the .db file is somewhere, please - there's HOURS and HOURS of work creating that list and specifying the qualities / searches / API keys etc.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
[root@freenas] /mnt/ARRAY/jails/couchpotato_1# find /mnt/ARRAY/jails/ -name '*cou*.db'
/mnt/ARRAY/jails/couchpotato_2/usr/pbi/couchpotato-amd64/couchpotatoUI/couchpotato.db
/mnt/ARRAY/jails/couchpotato_1/usr/pbi/couchpotato-amd64/couchpotatoUI/couchpotato.db
/mnt/ARRAY/jails/couchpotato_3/usr/pbi/couchpotato-amd64/couchpotatoUI/couchpotato.db

[root@freenas] /mnt/ARRAY/jails/couchpotato_1#




[root@freenas] /mnt/ARRAY/jails/couchpotato_1/usr/pbi/couchpotato-amd64/couchpotatoUI# cd /mnt/ARRAY/jails/couchpotato_2/usr/pbi/couchpotato-amd64/couchpotatoUI/
[root@freenas] /mnt/ARRAY/jails/couchpotato_2/usr/pbi/couchpotato-amd64/couchpotatoUI# ls -l *.db -rw-r--r-- 1 root wheel 5120 Sep 14 22:43 couchpotato.db
[root@freenas] /mnt/ARRAY/jails/couchpotato_2/usr/pbi/couchpotato-amd64/couchpotatoUI# cd /mnt/ARRAY/jails/couchpotato_3/usr/pbi/couchpotato-amd64/couchpotatoUI/
[root@freenas] /mnt/ARRAY/jails/couchpotato_3/usr/pbi/couchpotato-amd64/couchpotatoUI# ls -l *.db -rw-r--r-- 1 root wheel 5120 Sep 14 23:02 couchpotato.db
[root@freenas] /mnt/ARRAY/jails/couchpotato_3/usr/pbi/couchpotato-amd64/couchpotatoUI# cd /mnt/ARRAY/jails/couchpotato_1/usr/pbi/couchpotato-amd64/couchpotatoUI/
[root@freenas] /mnt/ARRAY/jails/couchpotato_1/usr/pbi/couchpotato-amd64/couchpotatoUI# ls -l *.db -rw-r--r-- 1 root wheel 5120 Sep 14 22:43 couchpotato.db
[root@freenas] /mnt/ARRAY/jails/couchpotato_1/usr/pbi/couchpotato-amd64/couchpotatoUI#


3 different jails, 2 new ones for testing - one original jail which has been "updated" by the new published script?..
ALL of the couchpotato.db files, are 5120 bytes, my movie selection, configuration appears to be completely lost / destroyed.

I can only conclude your update trashes someones install / removes / deletes files and data based on this.
I STRONGLY recommend you "de-publish" your update for couchpotato, before others trash their install.
Please note: My original install of CP had all kinds of weird update issues, causing this thread in the first place, but my final version which ended up working fine was actually a fresh, basic install of the regular plugin, inside a new jail. it ended up "just working" - therefore, logically, if my "normal" copy which I hadn't fiddled with broke, other peoples will break too.
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Well it is now 01:09am and I foolishly clicked that button just before 10pm. I've fixed most of the problem. Thank god I didn't delete my captured virtual machine of my old Windows based server before switching to FreeNAS. I used this script https://couchpota.to/forum/viewtopic.php?f=17&t=4070 to import my old CP config, I've lost 6 weeks or so of movie selections but so be it. Better than nothing :/

I propose that future updates make a backup of the jail / don't aggressively delete files.
Separately, I'd like to see some kind of more convienient jail backup option in the program, I'm going to investigate that or add it to the suggestions page. Had I had one from 2 or 3 days ago, would've saved me a LOT of time.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I don't control the update mechanism. you can blame me for moving the data directory location but if you searched on my support thread I meantuoned this.
also in my previous reply I told you what to do.
move /usr/pbi/couchpotato-amd64/etc/couchpotato to /var/db/couchpotato

future FN "updates" which I try to avoid shouldn't be as painful because I have learned to move the data directory location outside of the pbi's install path. something that most of my plugins still need to go through. I aslo plan on fixing this with the plex plugin which I notices a lot of people complain about PBI updates.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I've calmed down now that I found a backup - I've lost probably 20-30 movies which I have no idea what they were. I've got .... extremely eclectic tastes, I find stuff from a "6 degrees of separation" search on imdb after watching a film, seeing who made it, who was in it, reading trivia, reading forum posts, imgur recommended movie dumps and god knows what else.
None the less, most of my library is rebuilt.

What I have learnt, is I need to figure out how to do backups of the /jails/ regularly. (this is apparently possible now with some tools but it should be easier for end users, so I'll see what can be done on the suggestion forums)

Hopefully, now that I have a fresh 9.2.0 build, it'll auto update itself (as my last one did!!) "within" the jail. I'll ignore the update button in future.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
lost movies? do you keep your actual movie storage in freenas jails? I suggest you keep them on a dataset mounted to the jail. that way you can snapshot it separately and a freak plugin update won't wipe them. hope you get some sleep this weekend lol
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
No I mean literally I don't even know the names of the movies I wanted, my search criteria is set to very picky and there's some INCREDIBLY obscure stuff in my collection of wanted stuff - some of it's been in CP for over 12 months, just sitting and waiting, patiently - for a decent quality version to come out (some of them even just a DVD-R .......)

So I've added about 60 films (at least) since I rolled out FreeNAS and now I've lost the 30 or 40 it couldn't find - I've no ideas what they were.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Ok well I got an email this morning, my new 100% fresh build of CP is "auto-updating" as per normal and as I said, I restored most of my wanted movie list. A shame to lose a couple of movies in the wanted list but overall it's working and auto updating fine.

I really must get a scripted jail backup organised now - unfortunately the fellas in another couple of threads are not being user friendly :/ So be it.
 
Status
Not open for further replies.
Top