Couchpotato version in FreeNAS?

Status
Not open for further replies.

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Ok I've finally got some free time, I have installed a brand new copy of couchpotato - with a new jail, new ip address it's "fresh off the boat"
As per one of the developers instructions I've gone to this folder.
[root@freenas] /mnt/ARRAY/jails/couchpotato_3/usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer/couchpotato/core/downloaders/
As per the developers post here
https://github.com/RuudBurger/CouchPotatoServer/issues/3723#issuecomment-50873584
I do not have a blackhole.py file, I have a blackhole folder which as the developer himself states "You are using an old version of CP"
https://github.com/RuudBurger/CouchPotatoServer/issues/3723#issuecomment-50881184

If I actually open the new version of CP which I've installed and check the "about" section.
Version
04aa2e5fa4dd5a019f763d6bcf60079a7c61650b (16/8/2014 11:30:37 am)
Updater
source, master
ID
72741
Directories
/usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer
/usr/pbi/couchpotato-amd64/etc/couchpotato
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I did infact read it, i didn't see that screenshot however. It appears something got messed up on your installation, also you're missing the media user. I'm on the same pbi and my directory looks like http://i.imgur.com/OI6Y2f3.png

2 options i can think of create a user with User ID = 816 Username/Group = media and reinstall the plugin then update in couchpotato webui should bring it up to date

I have created a user with the User ID 816, deleted the plugin / jail and then re-installed a new copy / plugin. This has not fixed the problem (still have a blackhole folder, not a file)
Perhaps I created the user incorrectly? I did set a password (it insisted)
EDIT: Also, I tried doing an update in CP see if this now worked, no luck


or you could jexec into the jail, shutdown the service, "cd /usr/pbi/couchpotato-amd64/share/couchpotato/", "rm -rf CouchPotatoServer" directory and do "git clone git://github.com/RuudBurger/CouchPotatoServer.git CouchPotatoServer" restart couchpotato and you'll be upto date

I did this (stopped plugin) - opened a shell to the jail directly, went to the directory, deleted the directory but when I tried "git clone git://<etc etc etc>" I got the error
git: Command not found
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
One more thing, here's the user I created, perhaps I set the wrong permissions for the user?
fnas_i9fgeo6qs3.jpg




I gotta be honest with you, I know I'm a newbie and I don't mean to question the person who actually wrote the plugin, but it seems pretty odd to me, that the version of CP that's being downloaded on a fresh plugin install is "broken" - have you (can you?) please test by simply installing a second, standard copy of CP in FreeNAS? I get the impression this should literally break nothing? It'll just make you a new jail, new install of CP into that jail and so be it?
I'd be curious to see if you do / do not have the same problem I do.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Does a fresh install of CP from the repo not get you the latest CP source files? If so, that means something in CP's update mechanism broke sometime since the last time I updated the plugin. If you can confirm this, I can update the PBI with the latest source files so people don't end up with messed up installs.

But, I can assure you, there's nothing in my plugin that breaks this. I just ship the source files (a very old version at this point), and CP is in charge of updating itself. Anything that breaks because of bugs in CP's update mechanism is caused by CP.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Ok I kind of don't understand what you're asking BUT I think I might, how's this?

Since I made those posts 36 minutes ago, I did the following:
After that, I pasted your command from your earlier tips, and git is installed successfully
git clone git://github.com/RuudBurger/CouchPotatoServer.git CouchPotatoServer

Finally, when it all finished it DID install Couchpotato correctly, I now have "blackhole.py" in my downloads folder, I do NOT have a "blackhole" folder.
Does this help? Surely it would only take you (or anyone reading this thread?) 5 minutes to click click click - install a second copy of CP 2.0 as per the plugins wizard thing in FreeNAS, not break anything on your NAS and see in your new, temporary jail if the problem persists for others.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok I kind of don't understand what you're asking BUT I think I might, how's this?

Since I made those posts 36 minutes ago, I did the following:
After that, I pasted your command from your earlier tips, and git is installed successfully


Finally, when it all finished it DID install Couchpotato correctly, I now have "blackhole.py" in my downloads folder, I do NOT have a "blackhole" folder.
Does this help? Surely it would only take you (or anyone reading this thread?) 5 minutes to click click click - install a second copy of CP 2.0 as per the plugins wizard thing in FreeNAS, not break anything on your NAS and see in your new, temporary jail if the problem persists for others.
When I get a chance I'll test it. I'll check if a fresh install has blackhole.py, but is missing the blackhole folder.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
cp2_upbze7mbsv.jpg


That's my fresh "manually installed" copy, you can see there's no folder there.
I'd just configure that from scratch and use it if I knew how to do all the other stuff (auto start of the program and so on etc) - but honestly it'd be nicer if the plain plugin just worked the way the existing one does.
I mean maybe your version is fine still TBH? Maybe the install of the old "broken" build is actually normal- but the update process is where mine's broken?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok, I can confirm I have a blackhole folder, even after CP supposedly updated to the latest version. Something got screwed up in CP's update process. I'm hoping it was just some past update, and not an inherent problem with it.

I'll issue an updated PBI release with the latest source.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Ok cool, phew - I thought it was me. I don't know what work you have to do - but thank you. I hope it doesn't take too much of your time, update the thread when it's done if you can and thanks again - really appreciate it.
EDIT: and I assume once you fix it, ongoing updates should continue to work yeah?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Ok cool, phew - I thought it was me. I don't know what work you have to do - but thank you. I hope it doesn't take too much of your time, update the thread when it's done if you can and thanks again - really appreciate it.
EDIT: and I assume once you fix it, ongoing updates should continue to work yeah?
I won't be able to do it for a few days. On a remote island away from my desktop with the VM I use to build PBI's, lol.

Updates should work, I replied on the github issue, maybe the CP dev knows what's up.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Really? I thought he actually closed the entry? Thanks.
EDIT: yeah looks like you did manage to update it - ok cool.

Take your time, I've survived fine as it is with my current version - the painful thing is going to be either updating my existing copy without breaking it, or transitioning to a fresh copy (lots of little settings configured)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Really? I thought he actually closed the entry? Thanks.
EDIT: yeah looks like you did manage to update it - ok cool.

Take your time, I've survived fine as it is with my current version - the painful thing is going to be either updating my existing copy without breaking it, or transitioning to a fresh copy (lots of little settings configured)
If you apply the below command updates should work from CP, by default they apply automatically, I think once a day.
Code:
chown -R media:media /usr/pbi/couchpotato-amd64/share/couchpotato/*
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
So wait, if I do that, it might fix my broken copy? I'm happy to try it.
Also from a root prompt direct to FreeNAS or inside the jail?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So wait, if I do that, it might fix my broken copy? I'm happy to try it.
Also from a root prompt direct to FreeNAS or inside the jail?
No, this would just change ownership on the fixed source files you got using git. CP could then update using git.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I'll just wait for your fixed PBI and do a full fresh install. With 2 browser tabs shouldn't take too long to replicate settings across.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Here's some interesting information, I thought I might just fiddle around.
I logged into my working couchpotato version and typed the following

pkg update
pkg upgrade
pkg install nano
pkg install git
pkg upgrade*
pkg update*
chmod -R 777 /*


Opened couchpotato, searched for updates (none to be found!)
Restarted couchpotato using the CP ui (not FreeNAS ui)
searched for updates (still none to be found!)

Then I shell'd in again to the system, went to couchpotato-amd64/share/couchpotato/core/blah/blah (whatever the path is)/downloaders/
Guess what? it's worked. - I now have "blackhole.py" NOT "blackhole" folder (it actually deleted the folder as part of a cleanup!?!)

* = I have no idea what I'm doing, within reason- I'm following other peoples instructions and I see them repeat commands so I figured why not? - I also set all the permissions to be completely open, either way - those commands "fixed" my broken install, seemingly anyhow?
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Nope scratch that, what I actually did was break my install. So it fixed the filesystem and now I seemingly have the right "blackhole.py" and the update applied correctly BUT couchpotato is no longer auto-starting on a re-boot of the server and if I manually try to "turn it on" using the slider in the FreeNAS plugins gui, I get "some error occurred"

So if anyone can assist me manually starting my copy of CP I can copy all the settings out, into a new copy of CP once the author fixes a new PBI.
(this thread, is exactly why dummy end users prefer a simple PBI rather than manually installing and configuring using traditional stuff) - see also my issues in the qbittorrent thread.


EDIT:
A friend has helped me copy out my database into a new PBI (2.0 / basic / broken version) of Couchpotato, so I'm back up and running at least, haven't lost my settings / fine tuning and movie list. so I'll manually copy that information into the new PBI when it's launched - thanks all.

EDIT2:
So to summarise these 2 big posts, I tried to run some manual commands to update couchpotato, they DID seem to update it (new file structure for the program, as per later versions) but ultimately "broke" the PBI. I then managed to copy my .db and .ini file from my "broken" edition to a new PBI / jail and I'm back and running where I was. So again... I'll wait for a new "new" PBI release which will update properly, then manually import my data in there.
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
please don't 'chmod' anything unless you know what you're doing exactly. you changed permission levels of operating system files, I doubt that jail could ever restart. good thing you were experimenting in a jail that you could easily trash and replace!

EDIT
Reading your list of commands is comical and scary at the same time, lol. Most of those command are completely irrelevant (PBI's don't really interact with packages), or completely suicidal (chmod 777 /*)

But, we've all done something stupid like that in the past, lol. I remember running (rm -r /) on an ubuntu server I had when I first explored running servers years ago.
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I only run chmod on my data and my jails (/mnt/array/data) I never run it on / within the "full" shell of FreeNAS, I know that I don't know what I'm doing, if that makes sense.
Here's my problem, I'm having frequent issues with /mnt/array/data/download having permissions issues. I download a file and I can't move it or delete it, so I I just chmod all files to 777 (Should I be doing 775) - it generally fixes my problem.
I've even set up a cron job to do chmod -R 777 /mnt/array/data
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I only run chmod on my data and my jails (/mnt/array/data) I never run it on / within the "full" shell of FreeNAS, I know that I don't know what I'm doing, if that makes sense.
Here's my problem, I'm having frequent issues with /mnt/array/data/download having permissions issues. I download a file and I can't move it or delete it, so I I just chmod all files to 777 (Should I be doing 775) - it generally fixes my problem.
I've even set up a cron job to do chmod -R 777 /mnt/array/data
It won't hurt if it's just on your data which doesn't need to be executed/system libraries.
But, instead of setting a cron job to do this I recommend solving the issue once and for all.
  • You are having issue between which two programs?
  • What users are these programs running as? (Most of my plugins run as the 'media' user, UID=816)
  • Are they running in the same jail or different jails
  • Most programs (Sab/transmission/SB/CP) allow you to set what permissions files will be set as after being downloaded/moved.
 
Status
Not open for further replies.
Top