Thank you for your donation


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Libraries empty, can't solve it
23rd Jul, 2017, 10:26 PM
Post: #1
[SOLVED] Libraries empty, can't solve it
Hi

I don't know the cause but just one day there is nothing on my libraries and me scraping doesn't work. What could it be?

Backup restoration doesn't work.

Could I reinstall Kodi but without losing all my transmission torrents?

Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 05:21 AM
Post: #2
RE: Libraries empty, can't solve it
(23rd Jul, 2017 10:26 PM)Peiote Wrote:  Hi

I don't know the cause but just one day there is nothing on my libraries and me scraping doesn't work. What could it be?

Impossible to say without logs

Disk full?

Quote:Backup restoration doesn't work.

Which backup do you try to restore?

Quote:Could I reinstall Kodi but without losing all my transmission torrents?

Sure, you can.

Terminal

sudo apt-get install --reinstall xbian-package-xbmc

But probably does not help
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 11:08 AM
Post: #3
RE: Libraries empty, can't solve it
(24th Jul, 2017 05:21 AM)Nachteule Wrote:  
(23rd Jul, 2017 10:26 PM)Peiote Wrote:  Hi

I don't know the cause but just one day there is nothing on my libraries and me scraping doesn't work. What could it be?

Impossible to say without logs

Disk full?

Quote:Backup restoration doesn't work.

Which backup do you try to restore?

Quote:Could I reinstall Kodi but without losing all my transmission torrents?

Sure, you can.

Terminal

sudo apt-get install --reinstall xbian-package-xbmc

But probably does not help
I forgot and can't find how to get the logs. Could you help me with a link, please?

Disk full? How can be checked? External disk is easy, but SD I don't know how to.

I restored both home and full images. No results.
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 07:01 PM
Post: #4
RE: Libraries empty, can't solve it
(24th Jul, 2017 11:08 AM)Peiote Wrote:  I forgot and can't find how to get the logs. Could you help me with a link, please?

Kodi's log is /home/xbian/.kodi/temp/kodi.log (current running session) and /home/xbian/.kodi/temp/kodi.old.log (previous session)

Quote:Disk full? How can be checked? External disk is easy, but SD I don't know how to.

Cmdline version:

Terminal

xbian@xbian ~ $ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 30939136 1045816 29807944 4% /
none 4 0 4 0% /sys/fs/cgroup
devtmpfs 370172 4 370168 1% /dev
/dev/mmcblk0p2 30939136 1045816 29807944 4% /home
/dev/mmcblk0p2 30939136 1045816 29807944 4% /lib/modules
/dev/mmcblk0p2 30939136 1045816 29807944 4% /home/xbian/storage
none 74956 304 74652 1% /run
/dev/mmcblk0p1 69478 30374 39104 44% /boot
/dev/mmcblk0p2 30939136 1045816 29807944 4% /xbmc-backup

Graphical version inside Kodi

System->System information-> Storage


Quote:I restored both home and full images. No results.

Probably your backups having already broken library. Let's check free space first
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 09:40 PM
Post: #5
Libraries empty, can't solve it
Thanks

It seems no storage problem (I was too deleting almost all of my add-ons just in case).

Log:
https://pastebin.com/WmhErvh0

Oldlog:
https://pastebin.com/WReDyegv

Note: some time ago, to get the scraper working with anime (anime has a special naming method) I changed a xml file, but afterwards everything was working well for weeks.
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 10:16 PM (This post was last modified: 24th Jul, 2017 10:18 PM by Nachteule.)
Post: #6
RE: Libraries empty, can't solve it
Hmmm, your external disk is almost full, but space on sd-card looks ok.

In your log you have a lot of

Code:
13:14:53.631 150266.515625 T:1954422784 WARNING: DoWork - Unable to open video database. Can not save file state!

warnings. maybe the ownership of Database folder has been changed.

Please show me output of command

Terminal

xbian@xbian ~ $ ls -la /home/xbian/.kodi/userdata/Database
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 10:23 PM
Post: #7
RE: Libraries empty, can't solve it
(24th Jul, 2017 10:16 PM)Nachteule Wrote:  Hmmm, your external disk is almost full, but space on sd-card looks ok.

In your log you have a lot of

Code:
13:14:53.631 150266.515625 T:1954422784 WARNING: DoWork - Unable to open video database. Can not save file state!

warnings. maybe the ownership of Database folder has been changed.

Please show me output of command

Terminal

xbian@xbian ~ $ ls -la /home/xbian/.kodi/userdata/Database
Here

https://pastebin.com/eMgXiPKS
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 10:36 PM (This post was last modified: 24th Jul, 2017 10:40 PM by Nachteule.)
Post: #8
RE: Libraries empty, can't solve it
Now it's going to be a bit more complicated Undecided

Permissions are ok, but not sure if file MyVideos107.db-journal might cause an issue, it is more than 2 weeks old. I do not have such file, because I'm using a common mysql database for my Kodi clents

So, enabling debug messages for Kodi first would be good idea

To do this, please add

DEBUG="--debug"

to file /etc/default/xbmc and restart Kodi. You have to get a log of DEBUG messages in kodi.log now

And, you could move away MyVideos107.db-journal to see if this makes any difference
Find all posts by this user
Quote this message in a reply
24th Jul, 2017, 11:29 PM
Post: #9
RE: Libraries empty, can't solve it
(24th Jul, 2017 10:36 PM)Nachteule Wrote:  Now it's going to be a bit more complicated Undecided

Permissions are ok, but not sure if file MyVideos107.db-journal might cause an issue, it is more than 2 weeks old. I do not have such file, because I'm using a common mysql database for my Kodi clents

So, enabling debug messages for Kodi first would be good idea

To do this, please add

DEBUG="--debug"

to file /etc/default/xbmc and restart Kodi. You have to get a log of DEBUG messages in kodi.log now

And, you could move away MyVideos107.db-journal to see if this makes any difference
There (it doesn't even try to scrape)
https://pastebin.com/CVcTRZQU
Find all posts by this user
Quote this message in a reply
25th Jul, 2017, 12:21 AM (This post was last modified: 25th Jul, 2017 12:25 AM by Nachteule.)
Post: #10
RE: Libraries empty, can't solve it
That does not look very good:

Code:
15:22:21.024  28.155327 T:1925182384   ERROR: SQL: [MyVideos107.db] Some kind of disk I/O error occurred
                                            Query: PRAGMA cache_size=4096
15:22:21.025  28.156208 T:1925182384   ERROR: Connect failed with 'SQL: [MyVideos107.db] Some kind of disk I/O error occurred
                                            Query: PRAGMA cache_size=4096
                                          
                                            '
15:22:21.065  28.195885 T:1925182384  NOTICE: XBian: notifying Upstart (doing DB upgrades)
15:22:21.223  28.354013 T:1925182384  NOTICE: Old database found - updating from version 99 to 107
15:22:21.223  28.354252 T:1925182384   DEBUG: Copying from MyVideos99.db to MyVideos107 at /home/xbian/.kodi/userdata/Database/
...
15:22:26.207  33.338474 T:1925182384   ERROR: SQL: Can't copy database. (10)
15:22:26.208  33.338921 T:1925182384   ERROR: Unable to copy old database MyVideos99 to new version MyVideos107

Maybe sd-card is broken or filesystem is damaged.

Which sd-card are you using? Samsung?

You can test filesystem by command

Terminal

sudo btrfs scrub start /
sudo watch btrfs scrub status /
Find all posts by this user
Quote this message in a reply
25th Jul, 2017, 01:06 AM
Post: #11
Libraries empty, can't solve it
Edit: SOLVED.




THANKS!

**************

It seems to have one error, I don't know if it is important.

https://pastebin.com/kKt0Rr6x

My SD card
Find all posts by this user
Quote this message in a reply
25th Jul, 2017, 02:49 AM
Post: #12
RE: [SOLVED] Libraries empty, can't solve it
Good news Smile

So what exactly was the problem now?

To figure out which file is broken, you have to run the scrub command again and after the error occurs you can run dmesg to see which file was causing the error
Find all posts by this user
Quote this message in a reply
25th Jul, 2017, 04:44 AM
Post: #13
RE: [SOLVED] Libraries empty, can't solve it
(25th Jul, 2017 02:49 AM)Nachteule Wrote:  Good news Smile

So what exactly was the problem now?

To figure out which file is broken, you have to run the scrub command again and after the error occurs you can run dmesg to see which file was causing the error
This?
https://pastebin.com/a9yBWTWe

I didn't know how to write after the scrub
Find all posts by this user
Quote this message in a reply
25th Jul, 2017, 08:33 PM
Post: #14
RE: [SOLVED] Libraries empty, can't solve it
(25th Jul, 2017 04:44 AM)Peiote Wrote:  This?
https://pastebin.com/a9yBWTWe

Yes. Hmmm, bad sector seems to be inside of metadata. Not sure if btrfs check command is able to fix that, but you can try it:

1) First, you have to boot into rescue mode and of course you have to connect a USB keyboard to your RPi. To boot into rescue mode, you have to add rescue to the kernel cmdline in file /boot/cmdline.txt and you need to have initramfs enabled for the rescue mode (this thread and this post might be useful too)

2) when being in rescue mode, you have to umount your sd-card first by running comand
Terminal

umount -R /rootfs

3) now you can run filesystem check by typing command
Terminal

btrfs check /dev/mmcblk0p2
(this command checks only but does not repair anything) and finally
Terminal

btrfs check --repair /dev/mmcblk0p2
Find all posts by this user
Quote this message in a reply
26th Jul, 2017, 06:01 AM
Post: #15
[SOLVED] Libraries empty, can't solve it
Thank you. I will try tomorrow.

Though new serious problem has arised

I can't understand why. Torrents have been working like a charm for ages and supposedly we did not do big changes




WORST!!!!

I've tried to reboot and now it is dead:

Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  All is working but can't SSH, how to solve? ericyoshino 1 1,287 15th Jan, 2016 09:50 PM
Last Post: f1vefour

Forum Jump: