CouchPotato not starting (Pi2)

Hi Guys,

I hope someone will be able to help me do some trouble shooting on my CouchPotato. It has been working for a long time, but has recently stopped working. I’m a noob to linux and don’t understand everything and in researching and trying to fix it I am sure I have actually made things worse.

At first I thought it was because the service was not starting. Unfortunately I have not been taking notes and I did not know if it was started with init.d, rc.local or what I gather is the correct thing systemd. I don’t really know the difference and may have all three set up.

However none of these changes got it working again, so I tried installing again and now I think I have two non-functioning installs of CouchPotato. One at opt/CouchPotato and one at opt/CouchPotatoServer.

CouchPotato one was the first and did work and CouchPotatoServer is new and never worked.

I have also tried looking in the logs and there is a few things that I think are leading to the issue. In the CouchPotato Log the first issues are:

10-29 22:37:03 ERROR [31m[chpotato.core._base._core] LXML not available, please install for better/faster scraping support: http://lxml.de/installation.html [0m
10-29 22:37:03 ERROR [31m[chpotato.core._base._core] OpenSSL not available, please install for better requests validation: https://pyopenssl.readthedocs.org/en/latest/install.html: Traceback (most recent call last):
File “/opt/CouchPotato/couchpotato/core/_base/_core.py”, line 84, in dependencies
import OpenSSL
ImportError: No module named OpenSSL

However I think CouchPotato has worked after this date. The Next error is I think the one we need to investigate:

01-13 00:27:24 ERROR [31m[ couchpotato.runner] Shutting down as CP needs some space to work. You’ll get corrupted data otherwise. Only 54MB left [0m

This is the final entry in the log and is repeated several times, but with different amounts of MB left. I have seen advice in other threads to run df –h, so I have done this and this is the output:

osmc@osmc:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        362M     0  362M   0% /dev
tmpfs           367M  5.3M  362M   2% /run
/dev/mmcblk0p6   28G   26G   39M 100% /
tmpfs           367M     0  367M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           367M     0  367M   0% /sys/fs/cgroup
/dev/mmcblk0p5   79M   20M   60M  26% /boot
/dev/sdb1       1.4T  1.4T  209M 100% /mnt/SamsungG3Station
/dev/mmcblk0p1  819M  745M   74M  92% /media/RECOVERY
/dev/mmcblk0p3   27M  669K   25M   3% /media/SETTINGS
/dev/sda2       4.6T  2.7T  2.0T  59% /mnt/SeagateExpansion5TB
tmpfs            74M     0   74M   0% /run/user/1000

Do we need to try and free up some space? /dev/mmcblk0p6 looks full – could this be the issue?

(as a side issue OSMC update failed due to lack of space. I did sudo apt-get autoremove but I still got the message about lack of space. Doing sudo apt-get update and sudo apt-get dist-upgrade seems to have finished – are these things connected?)

I have done a grep on couchpotato and can see my bash history of me making things worse! Do you want to see this?

So I hope you can see I have tried to fix this, but need the help of an expert. I have provided a lot of detail here, but am more than happy to provide more info and run commands to help you diagnose the problem. Sorry for writing so much, I am not sure what are the key points you need to know.

So I need 2 things:

  1. Get CouchPotato working
  2. Clean up duplicated install

What do you need to help me? Do you want Kodi.log? Do you want full CouchPotato.log?

Many thanks.

MOD EDIT: Please use code tags, signified by </> in the message editor, so that pre-formatted code is easily readable.

Your / partition and your /boot partition are completely full. This is your issue. Additionally, /boot should have a total size of not less than 240mb.

Fantastic. Many thanks for your suggestion. I wonder what these areas are full of? Do you have any advice on what I should delete?

Or whether I should try to resize these? Sounds like I should try to make /dev/mmcblk0p5 240mb and then make /dev/mmcblk0p6 bigger.

Any advice on how I can do this? Should I be looking at Gparted? Is there a command I can type into Putty?

Righto, tried to make some space, not at all sure how to do it in the /Boot, but cleared cache, purged packages and deleted thumbnails. This got me to:

osmc@osmc:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        362M     0  362M   0% /dev
tmpfs           367M  5.3M  362M   2% /run
/dev/mmcblk0p6   28G   25G  1.2G  96% /
tmpfs           367M     0  367M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           367M     0  367M   0% /sys/fs/cgroup
/dev/mmcblk0p5   79M   20M   60M  26% /boot
/dev/sdb1       1.4T  1.4T  209M 100% /mnt/SamsungG3Station
/dev/mmcblk0p1  819M  745M   74M  92% /media/RECOVERY
/dev/mmcblk0p3   27M  669K   25M   3% /media/SETTINGS
/dev/sda2       4.6T  2.7T  2.0T  59% /mnt/SeagateExpansion5TB
tmpfs            74M     0   74M   0% /run/user/1000

So we can see that cleared gig or so from / but I still have no real idea why nearly 28G is full of. Shouldn’t be anything but OSMC and the extra stuff I installed. It is this extra stuff why I don’t want to wipe and start over. Mental list to remind myself:
noip updater
fail2ban
dns-crypt
nzb-get + scripts
couchpotato
truecrypt
Forawarded ports

Anyway, good news is CouchPotato started, but it is starting over and all the settings are empty. Do you think the settings are in my Pi somewhere or do you think they are gone and I’ll have to do it all again? Could it be that the Pi is using the second install and I somehow need to tell it to use the first install?

MOD EDIT: again with the code tags…

PLEASE use </> the code tags when you paste from SSH! It’s 10 times more difficult to read your pastes without it!

You need to seek support for CP from the CP people… We have no idea how it’s configured…

Are you running a NOOBS install?

My guess is thats it CP that have filled up you root partition…

command:

grep osmc /home/osmc/.couchpotato/settings.conf

check the folder from where you have installed CP…
-H

Hi Guys,

Many thanks for trying to help me.

ActionA - many apologies for not using . I will try to do this in the future.

I think this may have started as noobs, but the only operating system I have installed is OSMC. Could this be a reason for a lack of space?

Hi Harry, thanks for your suggestions. I have done:

grep osmc /home/osmc/.couchpotato/settings.conf and got this:

osmc@osmc:~$ grep osmc /home/osmc/.couchpotato/settings.conf
username = osmc
from = /home/osmc/downloads/
directory = /home/osmc

Looking in these directories I am not seeing anything that should be taking up so much space. Its not like there is loads of unfinished film downloads.

I have also done this: du -k | sort -n | perl -ne ‘if ( /^(\d+)\s+(.$)/){$l=log($1+.1);$m=int($l/log(1024)); printf ("%6.1f\t%s\t%25s %s\n",($1/(2**(10$m))),((“K”,“M”,“G”,“T”,“P”)[$m]),""x (1.5$l),$2);}’

Found it on the web. It is showing a very big list. I am looking through this, but nothing s standing out at the moment as taking up 25GB. USB drive I mounted in /mnt are taking a,lot of space, but that shouldn’t count though as it is on another dirive right?

Done this: find /var -size +10000k -print0 | xargs -0 ls -lSh. Can I delete any of this:

-rw-r–r-- 1 root root 32M Sep 5 10:02 /var/lib/apt/lists/ftp.debian.org_debian_dists_jessie_main_binary-armhf_Packages
-rw-r–r-- 1 root root 28M Sep 27 04:24 /var/cache/apt/archives/rbp2-mediacenter-osmc_15.1.0-20_armhf.deb
-rw-r–r-- 1 root root 28M Oct 21 02:50 /var/cache/apt/archives/rbp2-mediacenter-osmc_15.2.0-1_armhf.deb
-rw-r–r-- 1 root root 28M Nov 23 00:43 /var/cache/apt/archives/rbp2-mediacenter-osmc_15.2.0-8_armhf.deb
-rw-r–r-- 1 root root 27M Aug 3 13:19 /var/cache/apt/archives/rbp2-mediacenter-osmc_15.0.0-5_armhf.deb
-rw-r–r-- 1 root root 25M Aug 7 23:17 /var/cache/apt/archives/rbp2-mediacenter-osmc_15.1.0-0_armhf.deb
-rw-r–r-- 1 root root 25M Aug 30 04:14 /var/cache/apt/archives/rbp2-mediacenter-osmc_15.1.0-9_armhf.deb
-rw-r–r-- 1 root root 22M Sep 5 10:01 /var/lib/apt/lists/ftp.debian.org_debian_dists_jessie_main_i18n_Translation-en
-rw-r–r-- 1 root root 22M Jan 14 06:25 /var/cache/apt/pkgcache.bin
-rw-r–r-- 1 root root 22M Jan 14 06:25 /var/cache/apt/srcpkgcache.bin
-rw-r–r-- 1 root root 18M Nov 29 17:32 /var/cache/apt/archives/rbp2-image-4.3.0-10-osmc_10_armhf.deb
-rw-r–r-- 1 root root 18M Dec 27 00:48 /var/cache/apt/archives/rbp2-image-4.3.3-1-osmc_1_armhf.deb
-rw-r–r-- 1 root root 18M Jan 2 06:17 /var/cache/apt/archives/rbp2-image-4.3.3-3-osmc_3_armhf.deb
-rw-r–r-- 1 root root 18M Nov 28 13:30 /var/cache/apt/archives/rbp2-image-4.3.0-9-osmc_9_armhf.deb
-rw-r–r-- 1 root root 18M Dec 27 22:28 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.524_all.deb
-rw-r–r-- 1 root root 18M Mar 1 2015 /var/cache/apt/archives/libpython2.7-dev_2.7.9-2_armhf.deb
-rw-r–r-- 1 root root 18M Nov 28 16:11 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.517_all.deb
-rw-r–r-- 1 root root 18M Oct 23 14:17 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.507_all.deb
-rw-r–r-- 1 root root 18M Sep 27 11:24 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.491_all.deb
-rw-r–r-- 1 root root 18M Aug 29 21:51 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.39_all.deb
-rw-r–r-- 1 root root 18M Aug 4 02:03 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.33_all.deb
-rw-r–r-- 1 root root 18M Aug 1 14:00 /var/cache/apt/archives/mediacenter-addon-osmc_3.0.32_all.deb
-rw-r–r-- 1 root root 17M Oct 12 05:13 /var/cache/apt/archives/rbp2-image-4.2.3-2-osmc_2_armhf.deb
-rw-r–r-- 1 root root 17M Sep 23 21:11 /var/cache/apt/archives/rbp2-image-4.2.1-1-osmc_1_armhf.deb
-rw-r–r-- 1 root root 16M Aug 19 21:49 /var/cache/apt/archives/rbp2-image-4.1.5-1-osmc_1_armhf.deb
-rw-r–r-- 1 root root 16M Aug 4 16:02 /var/cache/apt/archives/rbp2-image-4.1.3-2-osmc_2_armhf.deb
-rw-r–r-- 1 root root 16M Jul 21 21:59 /var/cache/apt/archives/rbp2-image-4.1.2-1-osmc_1_armhf.deb
-rw-r–r-- 1 root root 12M Dec 27 2014 /var/cache/apt/archives/g+±4.9_4.9.2-10_armhf.deb

Got to find a way to clean out stuff safely and quickly. Checking with you guys for each file isn’t going to work.

No need to delete the apt cache and that is only a few hundred M compared to your bigger problem of 25G.

So what does a ls -lah /home/osmc/downloads/ gives you? No big files?

While it should not be related to your space problem if you want to continue with OSMC only I recommend you move to a plain OSMC install via OSMC installer.
Do a backup of your current install and move to a plain install.

use du -kx than your USB drive would not be shown.

Hi,

Thanks for responding. [quote=“fzinken, post:9, topic:12134”]
ls -lah /home/osmc/downloads/
[/quote]

Gives
osmc@osmc:~$ ls -lah /home/osmc/downloads/
total 100K
drwxr-xr-x 6 osmc osmc 20K Jan 14 22:53 .
drwxr-xr-x 15 osmc osmc 4.0K Jan 14 21:48 …
drwxr-xr-x 2 osmc osmc 4.0K Dec 17 18:37 intermediate
drwxr-xr-x 2 root root 4.0K Dec 21 19:32 nzb
-rw-r–r-- 1 osmc osmc 812 Jan 12 23:44 nzbget-2016-01-12.log
-rw-r–r-- 1 osmc osmc 2.4K Jan 13 01:49 nzbget-2016-01-13.log
-rw-r–r-- 1 osmc osmc 4.7K Jan 14 22:53 nzbget-2016-01-14.log
-rw-r----- 1 osmc osmc 4 Jan 14 22:53 nzbget.lock
drwxr-xr-x 2 osmc osmc 36K Dec 24 00:25 queue
drwxr-xr-x 7 osmc osmc 4.0K Jan 14 20:13 tmp

So I think we may be going in the wrong direction with that.

Actually, I have just done another stupid thing. I think I had saved files into a mountpoint folder, but when the mount was not connected. So I deleted this and I have my free space back. However I have deleted stuff I thought I was putting on the mounted drive, but I had put it onto my SD Card.

So do I try to get it back with some form of undelete programme or call it lost… Its gonna be gone in all reality. At least I got the space back!! Haha.

Thanks everyone for your help, I should have paid more attention to whether the mount was mounted or not!

Ok, this is a good explaination as it would be hidding in the now “mounted” directory.

So I assume that was on “/”, if that is the case read up on http://extundelete.sourceforge.net/
But allways a very hard path to walk down unless it is very important.