[Release thread] Couchpotato plugin

Status
Not open for further replies.

Master Gollom

Dabbler
Joined
Jul 25, 2013
Messages
44

FlangeMonkey

Contributor
Joined
Dec 6, 2012
Messages
111
For people that use freenas on low powered equipment. Couchpotato monitors a folder every so often and over time I've found Couchpotato to run away and throttle the processor. I'd therefore suggest turning this off and using a script on sabnzbd to push them over the Couchpotato for sorting.

This is a Couchpotato thing so not a problem with the PBI.

I use the scripts on nzbToMedia, but there are others out there.

https://github.com/clinton-hall/nzbToMedia

Hope this helps...
 

tofagerl

Contributor
Joined
Aug 26, 2013
Messages
118
FIXED, SEE BELOW!!!

I'm trying to get all three of your PBIs to run as the same user to minimize permissions problems. Sabnzbd went fine, however, when I edit couchpotato/etc/rc.d/couchpotato to switch to ${couchpotato_user:="tom"}, I get this error:

Code:
root@customplugin_2:/usr/pbi/couchpotato-amd64/CouchPotato/init # service couchpotato start
Starting couchpotato.
Traceback (most recent call last):
  File "/usr/pbi/couchpotato-amd64/CouchPotato/CouchPotato.py", line 127, in <module>
    l = Loader()
  File "/usr/pbi/couchpotato-amd64/CouchPotato/CouchPotato.py", line 59, in __init__
    hdlr = handlers.RotatingFileHandler(os.path.join(self.log_dir, 'error.log'), 'a', 500000, 10)
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/__init__.py", line 902, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/__init__.py", line 925, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/usr/pbi/couchpotato-amd64/data/logs/error.log'
 
Traceback (most recent call last):
  File "/usr/pbi/couchpotato-amd64/CouchPotato/CouchPotato.py", line 127, in <module>
    l = Loader()
  File "/usr/pbi/couchpotato-amd64/CouchPotato/CouchPotato.py", line 59, in __init__
    hdlr = handlers.RotatingFileHandler(os.path.join(self.log_dir, 'error.log'), 'a', 500000, 10)
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/__init__.py", line 902, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/pbi/couchpotato-amd64/lib/python2.7/logging/__init__.py", line 925, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/usr/pbi/couchpotato-amd64/data/logs/error.log'
/usr/local/etc/rc.d/couchpotato: WARNING: failed to start couchpotato


Do you know what I am doing wrong? Obviously I chowned both /mnt/ folders and the main PBI folder to the correct user.


FIXED: I tried sabnzbd first, and there the rc.d file was symlinked from the PBI-dir to /usr/local/etc, so I assumed it was the same way in couchpotato and sickbeard. It wasn't, so I edited the wrong files. Everything is fine now :)
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
hi, I'm having a problem with Couchpotato, it fails to rename or move the files.

this was in log.

08-30 15:09:32 INFO​
[tato.core.plugins.renamer] Renaming "/media/Downloads/Completed/Ip.Man.The.Final.Fight.2013.720p.BluRay.DTS.x264-EbP [PublicHD]" to "/media/Downloads/Completed/_FAILED_RENAME_Ip.Man.The.Final.Fight.2013.720p.BluRay.DTS.x264-EbP [PublicHD]"​
08-30 15:09:32 ERROR​
[tato.core.plugins.renamer] Couldn't move file "/media/Downloads/Completed/Ip.Man.The.Final.Fight.2013.720p.BluRay.DTS.x264-EbP [PublicHD]" to "/media/Downloads/Completed/_FAILED_RENAME_Ip.Man.The.Final.Fight.2013.720p.BluRay.DTS.x264-EbP [PublicHD]": Traceback (most recent call last): File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 453, in moveFile shutil.move(old, dest) File "/usr/pbi/couchpotato-amd64/lib/python2.7/shutil.py", line 301, in move copy2(src, real_dst) File "/usr/pbi/couchpotato-amd64/lib/python2.7/shutil.py", line 130, in copy2 copyfile(src, dst) File "/usr/pbi/couchpotato-amd64/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/media/Downloads/Completed/Ip.Man.The.Final.Fight.2013.720p.BluRay.DTS.x264-EbP [PublicHD]'​
08-30 15:09:32 ERROR​
[tato.core.plugins.renamer] Failed moving the file "Ip.Man.The.Final.Fight.2013.720p.BluRay.DTS.x264-EbP [PublicHD]" : Traceback (most recent call last): File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 445, in tagDir self.moveFile(src, dst) File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 470, in moveFile raise Exception Exception​
08-30 15:09:32 ERROR​
[ couchpotato.core.event] Error in event "renamer.scan", that wasn't caught: Traceback (most recent call last): File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/event.py", line 12, in runHandler return handler(*args, **kwargs) File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 377, in scan self.tagDir(group, 'failed_rename') File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 445, in tagDir self.moveFile(src, dst) File "/usr/pbi/couchpotato-amd64/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 470, in moveFile raise Exception Exception​
encoding=UTF-8 debug=False args=['--config_file', '/usr/pbi/couchpotato-amd64/data/config.ini', '--data_dir', '/usr/pbi/couchpotato-amd64/data/', '--pid_file', '/usr/pbi/couchpotato-amd64/data/couchpotato.pid', '--daemon'] app_dir=/usr/pbi/couchpotato-amd64/CouchPotato data_dir=/usr/pbi/couchpotato-amd64/data/ desktop=None options=Namespace(config_file='/usr/pbi/couchpotato-amd64/data/config.ini', console_log=False, daemon=True, data_dir='/usr/pbi/couchpotato-amd64/data/', debug=False, pid_file='/usr/pbi/couchpotato-amd64/data/couchpotato.pid', quiet=False)
 

Master Gollom

Dabbler
Joined
Jul 25, 2013
Messages
44
Hi,

Please check the permissions of the files. If it is a permissions problem, you have to set up the right permissions in the sabnzbd config.
 

SinDeus

Explorer
Joined
Sep 3, 2013
Messages
65
Hello there!

First of all, thank you for your work. It is greatly appreciated.
But, as you may guess, I ran into a problem when installing the CouchPotato plugin...

The console shows this error:

Code:
Sep  3 09:57:21 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/sbin/jexec 3 /usr/local/sbin/pbi_add  -f --no-checksig /.plugins/couchpotato-1.0-amd64.pbi
Sep  3 09:57:29 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/sbin/jexec  3 cat /usr/pbi/couchpotato-amd64/freenas
Sep  3 09:57:30 freenas notifier: Performing sanity check on nginx configuration:
Sep  3 09:57:30 freenas notifier: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
Sep  3 09:57:30 freenas notifier: nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Sep  3 09:57:30 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/local/bin/warden list  -v
Sep  3 09:57:30 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/local/bin/warden list  -v
Sep  3 09:57:31 freenas kernel: arp: 192.168.1.28 moved from 02:a2:fc:00:0a:0b to f4:ca:e5:63:41:65 on re0
Sep  3 09:57:32 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/local/bin/warden list  -v
Sep  3 09:57:33 freenas last message repeated 3 times
Sep  3 09:57:38 freenas manage.py: [freeadmin.navtree:473] Impossible de récupérer http://192.168.1.24/plugins/Couchpotato/2/_s/treemenu : timed out


"Impossible de récupérer" means "Unable to retrieve" (yeah, system's in French).

So, this basically describes my issues when trying to install a plugin (among the four new ones: CouchPotato, Bacula, SABnzbd, SickBeard): no entry is visible under the "plugins" section of the tree, and I can't start them via the GUI (the button stays on "OFF", while the spinner, well, spins for ever).

I run on FreeNAS-9.1.0-RELEASE-x64 (dff7d13).

What can I do? Upgrade to 9.1.1? Downgrade? Fix some kind of jail configuration?

Thank you for your help. And if I didn't provide sufficient information, please let me know.
 

Master Gollom

Dabbler
Joined
Jul 25, 2013
Messages
44
Hi,

Please check your ip configuration of the NAS and the Jails. Looks like there's something wrong. Can you ping the jail from your network? Can you ping the NAS from within the jail?
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
For what i'ts worth, i had many problems in 9.1 that seem to be solved in 9.1.1

9.1.1 est 9.1.0 sans les bugs, si j'ai bien compri
 

SinDeus

Explorer
Joined
Sep 3, 2013
Messages
65
Holy jeez! I figured it out, thanks to you Master G.

I tried to ping the NAS from within every jail (I have 3 of them): they all worked, except for the CouchPotato one. First clue.
I tried to ping every jail from the NAS: they all responded, but the CouchPotato one seemed to respond after a greater delay than the 2 others. Second clue.
Then, quick look at the console:
Code:
Sep  3 11:19:49 freenas kernel: arp: f4:ca:e5:63:41:65 is using my IP address 192.168.1.28 on epair2b!


Aha! My IP configuration was indeed faulty: a device on my network ended up with the same IP as my newly created jail. This issue was meant to raise on the third jail: it fell on the poor CouchPotato.

Thank you so much for pointing me in the right direction. Have a great day!
 

SinDeus

Explorer
Joined
Sep 3, 2013
Messages
65
Aaaaaaaaand I'm back. With a different problem (what's with me today?).
Long story short: I can't, through the CouchPotato web GUI, list the contents of my jail mount point. However, when I connect to this jail via the console, the mount point works perfectly...
It most certainly is a permission issue (though I have set the mount point owner to 1001:media, and its permission to 775 - event 777, just for the fun), but I can't understant what's going on. My transmission plugin was set up this exact same way, and sees / writes on the mount point.
Are there any kind of logs I could look at to have a better understanding of what happens here?

EDIT:
OK, I figured it out: it was not a permission issue, but an encoding one. My mount point was containing folders with accented characters, which are not fully supported by CouchPotato (Sickbeard has no problem with them, for the record). After I renamed my folders, they were finally visible.
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
Hi there,
no worrys, all works perfect :) and thanks for that.
just a question, today, CP webui states an orange bar, that there is an update to CP.
What should i do?

Shino
 

Master Gollom

Dabbler
Joined
Jul 25, 2013
Messages
44
Well since the build in updater of couchpotato doesn't work, you download the sources an overwrite them (in the couchpotato folder)
 

xxJeevesxx

Dabbler
Joined
Sep 7, 2013
Messages
12
Hello all! I just wanted to get some information on updating CP manually. I see you said to download and overwrite the files. I'm a little cautious for doing this because: 1) I'm not sure exactly what to download, and 2) I'm not sure exactly what to over write. Would you be so kind as to give a little more detail on what to download and what to overwrite? I would be eternally grateful!

Thanks in advance! :)
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
Hello all! I just wanted to get some information on updating CP manually. I see you said to download and overwrite the files. I'm a little cautious for doing this because: 1) I'm not sure exactly what to download, and 2) I'm not sure exactly what to over write. Would you be so kind as to give a little more detail on what to download and what to overwrite? I would be eternally grateful!

Thanks in advance! :)


This would help me to,
Thanks!
 

Master Gollom

Dabbler
Joined
Jul 25, 2013
Messages
44
Since I'm not in front of my NAS and i don't get to it for the next few days, here's a rough guide on how to update couchpotato:

Before you start overwriting files do a backup of couchpotato.

1) Download the files from https://github.com/RuudBurger/CouchPotatoServer
2) sftp to your jail/nas
  • sftp jail: the path should be /usr/pbi/couchpotato-amd64/CouchPotato/
  • ftp nas: the path should be /mnt/<mount name for the jails>/<jailname>/usr/pbi/couchpotato-amd64/CouchPotato/
3) in this folder you're going to put the new files you've just downloaded. Remember to overwrite the old files.
4) restart the jail

this should be working

cheers ;)
 

ShinobiX9X

Contributor
Joined
Mar 6, 2013
Messages
141
Hi there, i tried in a new jail to test, and it didn't work.
Now i see you write restart the jail, i just tried to switch on the plugin.
Do you mean to really start and stop the jail in the jails section?
 

Super Paul

Cadet
Joined
Aug 20, 2013
Messages
6
@ShinobiX9X, yes I believe you have to restart the jail for various pyc files to get recompiled (if I'm using the right terminology). I followed his suggested directions, and have successfully updated Couchpotato.

If, like me you have changed the user that CouchPotato runs under, you will have to chown the "new" directory/files.
 

maxriot

Cadet
Joined
Sep 15, 2013
Messages
3
Looking some help with the couch potato plugin, has got me stumped
Transmission working fine
I’ve created a folder within transmission jail “BTDownloads” on my NAS I’ve a folder called Media
I’ve added storage withing the jail to mirror this so anything transmission downloads appears in the Media folder.
Onto couch potato,
Set this up to use transmission as the downloader
I created a folder within the couchpotato jail “couchdownloads”, and done the same as transmission, added storage to point this to my Media folder.
When I snatch a movie from couch potato, it finds no problem, sends to transmission no problems and downloads the movie.
Problem then here is that the media folder now contains the folder name of the movie I’ve downloaded but there are no files in it, the same with the folder I created in the jail of couch potato.
After much searching, I discovered that for some reason, couchpotato or transmission has created a folder within the jail of transmission “couchdownloads” and the whole movie is there?
Anyone able to let me know where I’m going wrong, or if it’s possible, that any movies I get from couchpotato will appear in my Media folder?
 
Status
Not open for further replies.
Top