Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Newbie's First Kodi System
#16
(2019-11-05, 20:51)wyvernuk Wrote:
(2019-11-05, 18:26)Klojum Wrote:
(2019-11-05, 17:37)wyvernuk Wrote: Looking at the logfiles: It seems that Kodi cannot link to the SQL (MariaDB) Database for some reason. It then appears to reboot and falls-back to the native Database with reduced functionality.
sql:
2019-04-11 17:29:11.270 T:2881905520 NOTICE: Running database version Addons27
2019-04-11 17:29:11.271 T:2881905520 NOTICE: Running database version ViewModes6
2019-04-11 17:29:11.272 T:2881905520 NOTICE: Running database version Textures13
2019-04-11 17:29:11.286 T:2881905520 NOTICE: MYSQL: Connected to version 10.3.14-MariaDB
2019-04-11 17:29:11.303 T:2881905520 NOTICE: Running database version MyMusic72
2019-04-11 17:29:11.309 T:2881905520 NOTICE: Running database version MyVideos116
2019-04-11 17:29:11.311 T:2881905520 NOTICE: Running database version TV32
2019-04-11 17:29:11.312 T:2881905520 NOTICE: Running database version Epg12

It seems me that your MariaDB server is running just fine.

cpp:
2019-04-11 17:29:09.420 T:3011551248 NOTICE: Disabled debug logging due to GUI setting. Level 0.

Level 0 is the default logging level. When you enable debugging, you will go to level 1 or 2. Instructions are in the Kodi wiki of the debug log (wiki) page.
With a higher logging level, there will be more specific details in the log file.

Code:
sources://music.tbn

Tbn is a file extension that is no longer in use in Kodi. It use to be in XBMC some 4-5 years ago, and it's simply a renamed jpg file. Now all fanart files are direct jpg files.

Code:
ERROR: GetDirectory - Error getting //smb/var/media/Maxtor 1/

I think your network sources have some typos in them.                
Thank you for spending time looking at the logs. I'll increase the logging level and see if that sheds some light on the problem. I'll also look for network source typos.          

Hi Klojum.  If you are not fed-up scanning my log files, for which many thanks, I have raised the debug level and attached the latest one (https://paste.kodi.tv/efalorotuy.kodi). If you have the energy, could you please have a quick look?

It doesn't make a lot of sense to me as a 'Newbie', so please forgive me if I ask a couple of stupid questions. Firstly, why does the log report two different Timestamps? At the start of the log it shows the expected 2019-11-06 date (see Thread 3011887120). Later in the file it shows 2019-04-11 as the date (see Thread 2876646256), although it refers to events that happened today!

Secondly, surely the latter thread is significant, because a whole series of events report that the database cannot be opened? I quote a typical line:

2019-04-11 17:28:42.839 T:2876646256   ERROR: Unable to open database: MyMusic72 [2002](Can't connect to MySQL server on '192.168.0.16' (101))

Any advice will be warmly received!
Reply
#17
About the dates; it looks like you have Kodi set to lang English (GB) and probably regional settings to match (that's the default).  I don't know libre, but I see:
Code:
trying to set locale to en_GB.UTF-8
INFO: global locale set to C. 

So I assume your dates are day/mon/year  but I'm not sure if it's expected that you would have the fallback locale of C.

I see this:
Code:
UpdateLibraries: Starting music library startup scan

then later I see this about your music scan:
Code:
DEBUG: DoScan Skipping dir '/var/media/Maxtor 1/Artist Information/Antony Pay/' due to no change
NOTICE: My Music: Scanning for music info using worker thread, operation took 00:00
DEBUG: Process - Finished scan
DEBUG: CAnnouncementManager - Announcement: OnScanFinished from xbmc
DEBUG: GOT ANNOUNCEMENT, type: 32, from xbmc, message OnScanFinished

It looks you are scanning your artist info folders, not your music file source folders?

scott s.
.
Reply
#18
@wyvernuk  - That last log you posted definitely shows you connecting to the database.
sql:
2019-11-06 17:56:46.905 T:2876646256 NOTICE: MYSQL: Connected to version 10.3.14-MariaDB
2019-11-06 17:56:46.922 T:2876646256 NOTICE: Running database version MyMusic72

Whats this ?  I use mariadb but I have no service addon running in Kodi for it. What is it doing ?

sql:
2019-11-06 17:56:47.559 T:2792719216 DEBUG: CPythonInvoker(1, /storage/.kodi/addons/service.mariadb/default.py): start processing

Is the path below correct ?  Should it be /var/media/Maxtor 1/Compilations as there are paths later in the log like that that apparently exist but hold no tagged music files.

sql:
2019-11-06 17:57:14.659 T:2447364976 ERROR: GetDirectory - Error getting /var/media/Maxtor/Compilations/


It would appear to me that if you have no music scanned into the library that you have possibly added the wrong initial directory as a source.  From your log, I would guess that the top level should be /var/media/Maxtor 1/Artist Music/.  You should be able to navigate to that through Settings -> Media -> Manage Sources (music) and it should show that directory.  If it does, right click it and choose 'Scan to library'.  If it doesn't, add that directory as a source and then let Kodi scan it.

As I say, that's only a guess from looking at your log but if it's somewhere near, hopefully you can figure out where you have gone wrong.
Learning Linux the hard way !!
Reply
#19
(2019-11-07, 19:56)black_eagle Wrote: @wyvernuk  - That last log you posted definitely shows you connecting to the database.
sql:
2019-11-06 17:56:46.905 T:2876646256 NOTICE: MYSQL: Connected to version 10.3.14-MariaDB
2019-11-06 17:56:46.922 T:2876646256 NOTICE: Running database version MyMusic72

Whats this ?  I use mariadb but I have no service addon running in Kodi for it. What is it doing ?

sql:
2019-11-06 17:56:47.559 T:2792719216 DEBUG: CPythonInvoker(1, /storage/.kodi/addons/service.mariadb/default.py): start processing

Is the path below correct ?  Should it be /var/media/Maxtor 1/Compilations as there are paths later in the log like that that apparently exist but hold no tagged music files.

sql:
2019-11-06 17:57:14.659 T:2447364976 ERROR: GetDirectory - Error getting /var/media/Maxtor/Compilations/


It would appear to me that if you have no music scanned into the library that you have possibly added the wrong initial directory as a source.  From your log, I would guess that the top level should be /var/media/Maxtor 1/Artist Music/.  You should be able to navigate to that through Settings -> Media -> Manage Sources (music) and it should show that directory.  If it does, right click it and choose 'Scan to library'.  If it doesn't, add that directory as a source and then let Kodi scan it.

As I say, that's only a guess from looking at your log but if it's somewhere near, hopefully you can figure out where you have gone wrong.
Thank you Black Eagle. I'll follow through your leads and see where they take me!
Reply
#20
(2019-11-07, 17:42)scott967 Wrote: About the dates; it looks like you have Kodi set to lang English (GB) and probably regional settings to match (that's the default).  I don't know libre, but I see:
Code:
trying to set locale to en_GB.UTF-8
INFO: global locale set to C. 

So I assume your dates are day/mon/year  but I'm not sure if it's expected that you would have the fallback locale of C.

I see this:
Code:
UpdateLibraries: Starting music library startup scan

then later I see this about your music scan:
Code:
DEBUG: DoScan Skipping dir '/var/media/Maxtor 1/Artist Information/Antony Pay/' due to no change
NOTICE: My Music: Scanning for music info using worker thread, operation took 00:00
DEBUG: Process - Finished scan
DEBUG: CAnnouncementManager - Announcement: OnScanFinished from xbmc
DEBUG: GOT ANNOUNCEMENT, type: 32, from xbmc, message OnScanFinished

It looks you are scanning your artist info folders, not your music file source folders?

scott s.
Hi Scott. I did scan certain artists to see what happened. Scraping typically yielded a handful of CDs, but no information. When I tried a refresh, I did not get the 'local information found' message, even though my Artist Information Folder contains artwork and NFO files!
Reply
#21
@black_eagle 
(2019-11-07, 19:56)black_eagle Wrote: @wyvernuk  - That last log you posted definitely shows you connecting to the database.
sql:
2019-11-06 17:56:46.905 T:2876646256 NOTICE: MYSQL: Connected to version 10.3.14-MariaDB
2019-11-06 17:56:46.922 T:2876646256 NOTICE: Running database version MyMusic72

Whats this ?  I use mariadb but I have no service addon running in Kodi for it. What is it doing ?

sql:
2019-11-06 17:56:47.559 T:2792719216 DEBUG: CPythonInvoker(1, /storage/.kodi/addons/service.mariadb/default.py): start processing

Is the path below correct ?  Should it be /var/media/Maxtor 1/Compilations as there are paths later in the log like that that apparently exist but hold no tagged music files.

sql:
2019-11-06 17:57:14.659 T:2447364976 ERROR: GetDirectory - Error getting /var/media/Maxtor/Compilations/


It would appear to me that if you have no music scanned into the library that you have possibly added the wrong initial directory as a source.  From your log, I would guess that the top level should be /var/media/Maxtor 1/Artist Music/.  You should be able to navigate to that through Settings -> Media -> Manage Sources (music) and it should show that directory.  If it does, right click it and choose 'Scan to library'.  If it doesn't, add that directory as a source and then let Kodi scan it.

As I say, that's only a guess from looking at your log but if it's somewhere near, hopefully you can figure out where you have gone wrong.
I have followed up your various helpful comments with some success!

I haven't worked out how to select multiple 'quotes' of your post, but here is my feedback roughly in order:
  • "That last log you posted definitely shows you connecting to the database." Indeed so. I have now been able to access the MariaDB server from MySQL WorkBench on my Windows 10 computer, look at the Tables, and access the records in the Music72 dB. This includes, for example, artist and art.
  • "Whats this ?  I use mariadb but I have no service addon running in Kodi for it. What is it doing ?"  I haven't the faintest idea!
  • "Is the path below correct ?  Should it be /var/media/Maxtor 1/Compilations..." You are correct. The original '../Maxtor/..' element in the path is a 'left over' from before I partitioned the USB hard drive. My intention. ultimately, is to store my Music files on 'Maxtor 1' and the MariaDB/SQL server files on 'Maxtor 2'.
Much of my confusion stems from the following statement in the Kodi Wiki: "Even if the media is on the same computer as one of the Kodi instances, you MUST use a network share path. You cannot use a local file path with MySQL."
I have been viewing '/var/media/Maxtor 1/Artist music/', for example, as a local file path. LibreELEC has a setting that allows one to treat external drive paths as Shares, so I imagine that this has allowed things to work. When I tried treating the external drive on the RPi4 Host as a networked device , everything seemed to fall apart!

Virtually all the Kodi system is now running. There are still strange 'bugs'. For example, LibreELEC boots-up and states that the Music Library is empty. When I then select 'files', it reboots and the Library is populated. Also the strange log entries persist: namely, the weird TIMESTAMP differences in the log files, and the presence of 'cannot connect to the database' messages - although it obviously can!

I must thank you, and all the other expert helpers, for getting me started. I must now learn how to persuade the Amazon Fire TV Stick to run the Kodi Client correctly!
Reply
#22
(2019-11-08, 18:02)wyvernuk Wrote: I haven't worked out how to select multiple 'quotes' of your post, but here is my feedback roughly in order:

Ah, highlight the bit of the post you want to quote and a 'reply' button will appear on the left at the bottom of the post with the highlighted stuff.  Click that (not the 'reply:quote:report' buttons on the right).  Every time you do that it will either

1) create a new post with the quote in it (as above) or
2) add the quote to a post you are already writing

Took me several years to figure that out !!
(2019-11-08, 18:02)wyvernuk Wrote: I have been viewing '/var/media/Maxtor 1/Artist music/', for example, as a local file path.

That's because it is !!  For proper sharing of your media & databases, it needs to be shared over samba.  See https://wiki.libreelec.tv/how_to/share_a...al_folders for how to add that directory as a samba share.  Once thats done, you need to

1) Remove the original /var/media/blahblah source and answer yes to removing items
2) Clean the library - This should remove all the stuff you have added so far
3) Add the samba source (Add music -> Browse -> Windows network(SMB) -> Workgroup (probably!!) ->name of Pi -> name of directory you have shared.

This is necessary because if you want to use your database on multiple machines, a path of /var/media/maxtor 1/Artist music/ will not make sense to any other machine except the original (see below), whereas a path of smb://libreelec/Shared_music/ will do.

A different machine running Kodi, but using the same database would try to open /var/media/maxtor 1/Artist music/some_artist/Some_album/ but as that is a local path (no network protocol) it will fail and that machine won't play anything.  If however the path is eg smb://libreelec/Music/Artist_music/Artist1/Album1 then Kodi will know to load the tracks from across the network and all will work fine.

Once you get the source shared properly onto your local network and get that added as a music source then once the library is built you just need to duplicate the advancedsettings.xml on any machine with Kodi on it connected to your network and the library will automatically appear and work correctly.

Hope this makes sense.
Learning Linux the hard way !!
Reply
#23
(2019-11-08, 18:30)black_eagle Wrote: That's because it is !!  For proper sharing of your media & databases, it needs to be shared over samba.  See https://wiki.libreelec.tv/how_to/share_a...al_folders for how to add that directory as a samba share.

I had, in fact, reviewed the LibreELEC Wiki information but did not implement any smb.conf changes. This was because my RPi 4 Maxtor 1 'Artist Music' and 'Compilations' folders were already accessible using Windows Explorer. I assumed, therefore, that network sharing was already enabled. I have subsequently followed your recommendations and now have two sources with 'smb://192.168.0.--/Maxtor 1/Artist Music/' and 'smb://192.168.0.--/Maxtor 1/Compilations/' paths (. The LibreELEC user and password details were entered and must have been stored correctly.

Library scraping seems to work but, although I have selected  the 'use local information only' option, the NFO and graphics stored in my Artist Information folder appear to require refreshing manually. This is very time consuming!

I commend you for your clear and helpful explanations. Why don't you write a tutorial to for other 'Newbies' like me? The learning curve for linux, networking, streaming, etc, is quite steep. But I am enjoying it!

My LibreELEC Kodi system initially boots-up stating that my Music Library is empty. If I subsequently select Add Music>Files, LibreELEC performs a soft-reboot and the Library appears. This is somewhat strange. I will consult the gurus on the LibreELEC forum to see if they can explain it.
Reply
#24
(2019-11-09, 13:40)wyvernuk Wrote: My LibreELEC Kodi system initially boots-up stating that my Music Library is empty

There is a setting in LibreElec to tell it to wait for the network before proceeding to start Kodi up.  I'm not near my Pi right now to see where exactly it is, (somewhere in the libreelec settings part I think) but that might be related to your issue.  If the network is not available when Kodi starts, it'll fall back to using (empty) local databases.  A subsequent soft-start will be after the network has become available so network attached stuff will now be found.

It might not be that of course, but I think there's a better than 50% chance that it is.
Learning Linux the hard way !!
Reply
#25
LE Config add-on > Network Tab > Wait For Network Before Starting Kodi in the right hand side menu
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#26
(2019-11-09, 14:33)black_eagle Wrote:
(2019-11-09, 13:40)wyvernuk Wrote: My LibreELEC Kodi system initially boots-up stating that my Music Library is empty

There is a setting in LibreElec to tell it to wait for the network before proceeding to start Kodi up.  I'm not near my Pi right now to see where exactly it is, (somewhere in the libreelec settings part I think) but that might be related to your issue.  If the network is not available when Kodi starts, it'll fall back to using (empty) local databases.  A subsequent soft-start will be after the network has become available so network attached stuff will now be found.

It might not be that of course, but I think there's a better than 50% chance that it is.      

I found the setting that DarrenHill also referenced (LE Config add-on > Network Tab > Wait For Network Before Starting Kodi in the right hand side menu). The initial boot screen found Bluetooth, but I assume the built-in 10 second delay was not sufficient for the network to start. I used systemctl to examine the status of the kodi-waitonnetwork.service. This reported the following message:

Apr 11 17:28:38 LibreELEC systemd[1]: Starting Wait on network...
Apr 11 17:28:48 LibreELEC systemd[1]: kodi-waitonnetwork.service: Main process exited, code=exited, status=110/n/a
Apr 11 17:28:48 LibreELEC systemd[1]: kodi-waitonnetwork.service: Failed with result 'exit-code'.
Apr 11 17:28:48 LibreELEC systemd[1]: Failed to start Wait on network.

The TIMESTAMP certainly shows a 10 second delay. Is there a CONF file somewhere that would allow the delay to be increased?
Reply
#27
(2019-11-09, 18:23)wyvernuk Wrote: s there a CONF file somewhere that would allow the delay to be increased?

/storage/.cache/libreelec/network_wait

The contents of that file on my Pi's is
sql:
WAIT_NETWORK="true"
WAIT_NETWORK_TIME="15"

You should be able to change the timeout value there.  Pretty sure I configured it through the GUI though.  I'm not sure but I think the failure that you got is because 10 seconds was not long enough for the network to become available, hence the error.
Learning Linux the hard way !!
Reply
#28
(2019-11-09, 20:31)black_eagle Wrote:
(2019-11-09, 18:23)wyvernuk Wrote: s there a CONF file somewhere that would allow the delay to be increased?
/storage/.cache/libreelec/network_wait

The contents of that file on my Pi's is
sql:
WAIT_NETWORK="true"
WAIT_NETWORK_TIME="15"

You should be able to change the timeout value there.  Pretty sure I configured it through the GUI though.  I'm not sure but I think the failure that you got is because 10 seconds was not long enough for the network to become available, hence the error.  


Thank you for the link. I updated the value using PuTTY and nano to 15 seconds and it seems to have cured the problem. The boot screen still shows a Wait on Network Failure, but it continues on to show the SMB daemon being started.
Reply
#29
(2019-11-09, 22:19)wyvernuk Wrote: Thank you for the link.

No problem Smile
(2019-11-09, 22:19)wyvernuk Wrote: it seems to have cured the problem

Sorted then ?  Yay !!  Feel free to ask more questions if you need to.  Kodi is an awesome piece of software but some things can take a little time and learning to get the best out of it.  I'm still learning, and I was using it on an original xbox back in the day!
Learning Linux the hard way !!
Reply
#30
(2019-11-09, 23:02)black_eagle Wrote:
(2019-11-09, 22:19)wyvernuk Wrote: Thank you for the link.

No problem Smile
(2019-11-09, 22:19)wyvernuk Wrote: it seems to have cured the problem

Sorted then ?  Yay !!  Feel free to ask more questions if you need to.  Kodi is an awesome piece of software but some things can take a little time and learning to get the best out of it.  I'm still learning, and I was using it on an original xbox back in the day! 
You have been a terrific help Black Eagle! May I ask a favour and push my luck a bit further? I have an Amazon Fire TV Stick running Kodi. How do I get it to link with my RPi 4 MariaDB server that you have so professionally enabled me to get running?

It seems that I must place the advancedsettings.xml file in the User Data Folder. Is that all I need to do?

The Fire TV Stick can only be accessed over the network. I know the (fixed) IP address, but how do I communicate with Kodi, determine the file structure, and save the file? I have WinSCP and PuTTY, but I just get connection refused at the moment.
Reply

Logout Mark Read Team Forum Stats Members Help
Newbie's First Kodi System0