Help installing couchpotato v2 on ubuntu 12.10

abs1

Well-Known Member
Joined
Dec 1, 2009
Messages
367
Reaction score
73
Location
Cape Town
Hi guys im at the mercy of you fellow forumites or should I say linux experts, I will admit I'm a complete noob when it comes to linux but want to learn. So I took the plunge and installed ubuntu 12.10 on my laptop, soon to be changed to 12.04 lts. Initially v1 installed without problems but after updating to version 2 I just cant get to load the webpage. I followed the guide from https://github.com/RuudBurger/CouchPotatoServer/blob/master/README.md

I can access the page only if I do this: python CouchPotatoServer/CouchPotato.py in terminal. when i close the terminal i dont have access anymore which point me to the startup script not working. Now i have changed the path and the user to what it supposed to be and updated the ini and all the other steps, I even deleted the old version of couchpotato but to no avail. When I run the following: "/etc/init.d/couchpotato start" I also get this error "start-stop-daemon: unable to open pidfile ‘/var/run/couchpotato.pid’ for writing (Permission denied)" which also tells me I will never be able to load the webpage if I dont get rid of this error, and I did reboot after updating.

Early days and lots to learn, can you guys also maybe give some good links for linux noobs, would really appreciate it.:)

please help:(
 
You probably need to add "sudo" (super user do - basically temporary root access) in front of your commands which is why it's not working.

So...

Code:
sudo /etc/init.d/couchpotato start


Because you are starting it up as a Daemon it needs to be run as root, instead of your own user thus the reason for the permissions failure.

Did you Clone the Github or download the source?

Or you could run the python command as your own user and force it to the background so that you can close the terminal.

You do that by adding the ampersand (&)

Code:
python CouchPotatoServer/CouchPotato.py &

However using the daemon mode is the better practise method as that should startup with your machine each time.

*******

Also are you absolutely sure you followed these steps? Because it should have worked by itself after a reboot if you did them correctly.

Code:
Change the paths inside the init script. sudo nano /etc/init.d/couchpotato
This opens an editor, problem is they don't have a "step" to say what you should edit here...so changes are you need to make some changes...not just run the command.

Then you need to exit and save properly as well.

Code:
Make it executable. sudo chmod +x /etc/init.d/couchpotato
Add it to defaults. sudo update-rc.d couchpotato defaults

Don't miss these steps. Otherwise it won't work on reboot or when testing.
 
Last edited:
You probably need to add "sudo" (super user do - basically temporary root access) in front of your commands which is why it's not working.

So...

Code:
sudo /etc/init.d/couchpotato start


Because you are starting it up as a Daemon it needs to be run as root, instead of your own user thus the reason for the permissions failure.

Did you Clone the Github or download the source?

Or you could run the python command as your own user and force it to the background so that you can close the terminal.

You do that by adding the ampersand (&)

Code:
python CouchPotatoServer/CouchPotato.py &

However using the daemon mode is the better practise method as that should startup with your machine each time.

*******

Also are you absolutely sure you followed these steps? Because it should have worked by itself after a reboot if you did them correctly.

Code:
Change the paths inside the init script. sudo nano /etc/init.d/couchpotato
This opens an editor, problem is they don't have a "step" to say what you should edit here...so changes are you need to make some changes...not just run the command.

Then you need to exit and save properly as well.

Code:
Make it executable. sudo chmod +x /etc/init.d/couchpotato
Add it to defaults. sudo update-rc.d couchpotato defaults

Don't miss these steps. Otherwise it won't work on reboot or when testing.

Yes sir I made sure to edit the path and the user and also to save and exit properly. The thing is I want it bootable running from the start up script not every time having to start it manually. What will be the correct procedure to start from scratch? I think ill first have a go with the sudo command in front and see what happens.

I don't have access to my machine now so will check tonight.

Thanks for the tips.:)
 
There is a whole thread over here:
http://forum.xbmc.org/showthread.php?tid=106025&page=2

One suggestion from the thread:
Code:
#remove startuplinks
sudo update-rc.d -f couchpotato remove
#create new links at end of bootorder
sudo update-rc.d couchpotato defaults 99
Some users say it starts too soon, this will move it later in the boot process. Have a read through and report back if it didn't work.
 
There is a whole thread over here:
http://forum.xbmc.org/showthread.php?tid=106025&page=2

One suggestion from the thread:
Code:
#remove startuplinks
sudo update-rc.d -f couchpotato remove
#create new links at end of bootorder
sudo update-rc.d couchpotato defaults 99
Some users say it starts too soon, this will move it later in the boot process. Have a read through and report back if it didn't work.

Thanks for this link MyWorld, it sorted all my problems, what an amazing script. http://forum.xbmc.org/showthread.php?tid=106025&page=2

Anyway reinstalled 12.04 and followed the above script (LaSi - Bashed Installers for SickBeard, Couchpotato, Headphones and more) to do the installations. Everything installed fine without problems.

Thanks for all your help and comments. One last question what are your guys favourite antivirus for ubuntu 12.04 or what would you guys recommend.

cheers :)
 
One does not need to use anti-virus solutions on Linux.

If you update your system regularly when new updates are released then there is no need for any anti-virus. There are hardly any viruses for Linux.

It has been 12 years on Linux now without any firewalls (except for the router) or anti-virus software with no problem.
I really do not see the need for a desktop user to have this installed, if you have strong passwords then there is little chance of anything happening.
 
One does not need to use anti-virus solutions on Linux.

If you update your system regularly when new updates are released then there is no need for any anti-virus. There are hardly any viruses for Linux.

It has been 12 years on Linux now without any firewalls (except for the router) or anti-virus software with no problem.
I really do not see the need for a desktop user to have this installed, if you have strong passwords then there is little chance of anything happening.

Thanks, noted.:)
 
Just in case someone else finds this thread when searching, the Ainer.org guides on setting up Couchpotato, sickbeard, sab etc are really, really handy:

Page 3 deals with the pidfile problem specifically.

d'oh, saw that OP did do as instructed. Still a useful set of guides ;)
 
Yup it was when I did this a few yrs ago though things aren't exactly as said.

Just a quick tip, Ubuntu has a crash checking application I think called 'apport'. If you like me and deploying on a headless low end server then make sure to disable it. It can sometimes run a processor/core at 100% non-stop without fail. It investigates crashes..

Now on to crashes.. Sabnzbd, Couchpotato, Headphones, deluge and other services run do crash from time to time. Best way to resolve it is to use monit. It's basically a monitor for apps to keep them going. Combo with m/monit u can monitor your server from your phone.

Also consider installing openswan for the L2TP VPN which u can use from any smartphone/tablet(monitor) and items like bandwidthd(traffic monitor), smokeping(latency).

Consider link bonding to your network card if you have multi users and even multi-wireless APs. If you have a beefy(>4GB, 2.6GHz with dual or quad core) machine consider Plex for media transcoding.
 
Top
Sign up to the MyBroadband newsletter
X