Library Initialization - Curl errors / Libraries Missing
#1
Code:
- Raspberry Pi model B (stock settings)
- OpenELEC Testing - Raspberry Pi ARM 2.99.2 (3.0 RC 2)
- NFS root stored on NAS
- Video and Music sources stored on NAS, exported by NFS read-only,insecure
- MySQL Library stored on NAS

Hi all,

Apologies if this exists somewhere else. Whilst I've found plenty of threads (both on here and other sites) covering the errors I'm querying, they all seem to refer either to:
  • Scraper sites (TMDb / TVDB) being down
  • Specific issues that don't seem to apply to my current situation

Additionally, I'm not 100% sure that these issues are necessarily unique to the Raspberry Pi. But, as I'm not getting the same problems on my existing XBMC instances (Win7 & ATV2 - different MySQL database) when performing the same tasks it seems a reasonable place to start.

I've set up the OpenELEC as detailed above, using NFS root stored on the NAS. I set this up a few days ago and it boots fine / doesn't complain and generally behaves well.
Yesterday, I got around to setting up the new MySQL database these devices will be using. After a bit of confusion (I'd failed to spot / remember the differences is in how Frodo manages these compared to the last time I set them up in Dharma / Eden) I got these fixed and XBMC successfully starts up and connects to the databases without any hassle, creating all the tables correctly. The first time I tried to initialize the DB some tables weren't created. Dropping the DB and starting from scratch fixed that.

Today, I was trying to get the Libraries scanned and updated, which is where I'm encountering these errors. Upon setting the content for the sources (TV Shows - TVDB ; Movies - TMDB) and forcing an update, XBMC happily runs through scanning the directories and gathers a bunch of information, evidenced both by checking the database and also looking at the Thumbnails that have been scraped:
Code:
ls -la .xbmc/userdata/Thumbnails/
total 209
drwxr-xr-x 19 root root  19 Jan 31 19:33 .
drwxr-xr-x  9 root root  15 Feb  1 11:02 ..
drwxr-xr-x  2 root root 114 Feb  1 11:42 0
drwxr-xr-x  2 root root 125 Feb  1 11:41 1
drwxr-xr-x  2 root root 102 Feb  1 11:41 2
drwxr-xr-x  2 root root 120 Feb  1 11:42 3
drwxr-xr-x  2 root root 106 Feb  1 11:42 4
drwxr-xr-x  2 root root 123 Feb  1 11:42 5
drwxr-xr-x  2 root root 126 Feb  1 11:42 6
drwxr-xr-x  2 root root 110 Feb  1 11:41 7
drwxr-xr-x  2 root root 141 Feb  1 11:42 8
drwxr-xr-x  2 root root 131 Feb  1 11:42 9
drwxr-xr-x  3 root root   3 Jan 31 19:33 Video
drwxr-xr-x  2 root root 111 Feb  1 11:41 a
drwxr-xr-x  2 root root 120 Feb  1 11:41 b
drwxr-xr-x  2 root root 117 Feb  1 11:42 c
drwxr-xr-x  2 root root 123 Feb  1 11:42 d
drwxr-xr-x  2 root root 115 Feb  1 11:42 e
drwxr-xr-x  2 root root 109 Feb  1 11:41 f

Code:
[xbmc_caphouse_video75]> SELECT c00,c09,c14 FROM movie WHERE idMovie=100;
+-----------+-----------+-----------------------+
| c00       | c09       | c14                   |
+-----------+-----------+-----------------------+
| Deep Blue | tt0365109 | Documentary / Foreign |
+-----------+-----------+-----------------------+
1 row in set (0.00 sec)

However, if I go back to look at the Movie Library (which now appears as a menu option) no results are returned at all. Similarly, no results are shown under "Recently Added" and there's no clear indication of the Libraries being initialized. Cleaning and re-scanning made no difference.

Investigating the logs, the one thing that gets noticed is a regular cycle of failures for each title:
Code:
12:17:56 T:2860926048 WARNING: FillBuffer: curl failed with code 22
12:17:56 T:2860926048   ERROR: CCurlFile::CReadState::Open, didn't get any data from stream.
12:17:56 T:2860926048   ERROR: Run: Unable to parse web site
12:17:57 T:2860926048   ERROR: Failed to open(//Video/Film/.actors) opendir call failed with "NFS: Lookup of //Video failed with NFS3ERR_NOENT(-2)"
12:17:57 T:2860926048   ERROR: GetDirectory - Error getting nfs://10.127.100.1/srv/multimedia/spencerstreet/Video/Film/.actors

12:18:06 T:2860926048 WARNING: FillBuffer: curl failed with code 22
12:18:06 T:2860926048   ERROR: CCurlFile::CReadState::Open, didn't get any data from stream.
12:18:06 T:2860926048   ERROR: Run: Unable to parse web site
12:18:08 T:2860926048   ERROR: Failed to open(//Video/Film/.actors) opendir call failed with "NFS: Lookup of //Video failed with NFS3ERR_NOENT(-2)"
12:18:08 T:2860926048   ERROR: GetDirectory - Error getting nfs://10.127.100.1/srv/multimedia/spencerstreet/Video/Film/.actors

For TV Episodes, the cycles look similar (I don't have an example to hand as I hastily rebooted without backing up the last xbmc.log - I can recreate as required). The primary difference is it calls that it's searching for the .nfo files for the episode listings, which I don't have for any of my films or shows and haven't needed for my other setups.

Likewise, of the errors above, I'm not concerned about the GetDirectory errors - these should fail, because there is no .actors directory. My assumption (and I could be wrong) is that the scraper is running through correctly to TVDB / TMDb - evidenced by the populated database - but at some point is failing with the CURL error and trying to fall back to file-based references.

What I can't work out is why this is happening. To all intents and purposes it looks like its gathering all the information it needs correctly. It's populating the Thumbnails directory (remember, this has never had any libraries initialized on it before this morning) and is able to reach the relevant URLs without issue:
Code:
$ du -h .xbmc/userdata/Thumbnails/
83M     .xbmc/userdata/Thumbnails/

Code:
root ~ # ping thetvdb.com
PING thetvdb.com (141.101.112.33): 56 data bytes
64 bytes from 141.101.112.33: seq=0 ttl=59 time=49.688 ms
64 bytes from 141.101.112.33: seq=1 ttl=59 time=47.148 ms

Code:
root ~ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.127.100.62   0.0.0.0         UG    0      0        0 eth0
8.8.8.8         10.127.100.62   255.255.255.255 UGH   0      0        0 eth0
10.127.100.0    0.0.0.0         255.255.255.192 U     0      0        0 eth0
10.127.100.62   0.0.0.0         255.255.255.255 UH    0      0        0 eth0

Code:
root ~ # cat /etc/resolv.conf
# Generated by Connection Manager
nameserver 127.0.0.1

For clarity, here's the relevant export:
Code:
## Multimedia Sharing for HTPC Frontends
/srv/multimedia/spencerstreet   10.127.100.0/26(ro,all_squash,insecure,no_subtree_check)

There's no indication in syslog of any issues, just successful mount requests:
Code:
Feb  1 12:30:30 praetor rpc.mountd[4460]: authenticated mount request from 10.127.100.5:813 for /srv/multimedia/spencerstreet (/srv/multimedia/spencerstreet)

Any ideas or pointers on what other information might be useful here would be greatly appreciated. If it was just the Database not being updated, or thumbs / data not being scraped and parsed correctly I would easily understand. But everything I can see suggests that's not the case, or at least it's getting the vast majority of what it needs, just not tying it to the Library itself.

Thanks in advance.
Reply
#2
Anyone any ideas on this one?

Further to the earlier notes, I've tried two additional steps to help on this:
  • Exporting and Importing the Library From System Settings > Video > Library
  • Forcing a full clean of the database by unexporting the multimedia store, rescanning the Library (and cleaning), then re-enabling the export and re-scanning.

The same errors are seen in the logs (FillBuffer and not getting data from the stream).

My assumption at this point (given the buffer problem) is that it's a case of resource allocation. But how to fix that I'm not sure.
Reply
#3
Further to my last post, this is now resolved.

Thinking it strange the way it was behaving (seeing the database getting populated and thumbnails being downloaded) I decided to undo the only other tweak I'd made, which involved specifying the named database.

Removing the relevant lines from advancedsettings.xml and rebooting to force XBMC to utilize the new database instead (named with the default of MyMusic% and MyVIdeos%), I set about rescanning the content.

The scanning worked just as before, producing the same errors I'd erroneously assumed were the source of my problem in the initial post.
However, upon completion, the Library option existed (as it did before) and more importantly was populated with the items scanned.

I'm still not sure why the different name caused this to be wrong, my only assumption at this point is that there's another flag somewhere that causes XBMC to specifically called MyMusic / MyVideos and can't do so because those databases on there.
I'm going to follow that line up in a separate thread though, since a non-default name for the DBs continues to work fine on Frodo on my old setup (that's migrated steadily from Dharma -> Eden -> Frodo).
Reply

Logout Mark Read Team Forum Stats Members Help
Library Initialization - Curl errors / Libraries Missing0