Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 34
  • 35
  • 36
  • 37
  • 38(current)
Automatic WakeOnLan upon accessing MySql or FileShares
It seems you have 2 issues if I understand correctly.. (?)

1) .. MySQL can't recover from a single access error.
.. and yet NFS will wake your server, only MySQL will not when you get into this state.
There is no difference in the wake-on-access module between the two and this problem can not come from there. It could seem like the MySQL (kodi-client) module itself gets permanently broken after a single connection-failure and decides to never try again, that could explain such behaviour. I did not think it worked like that but I will have a look in the code
edit : I find this
Code:
CLog::Log(LOGINFO,"MYSQL server has gone. Will try %d more attempt(s) to reconnect.", attempts);
It looks like 5 retry-attemps are made and then connection is permanently broken.

2) .. logging a WakeOnAccess every "TimeOut" seconds .. keeping the server awake
There is no difference between Pingport setting and frequency of ping-tests made so I dont see how this has any significance. If your rpi keeps server awake by repeatedly connecting to it then there must be an add-on (or skin) that does something periodically. You need to figure out what that is and disable it or let the server stay on 24/7. Check the logs to get an idea of what may be causing the periodic connection.
Reply
(2016-05-20, 10:10)t4_ravenbird Wrote: It seems you have 2 issues if I understand correctly.. (?)

1) .. MySQL can't recover from a single access error.
.. and yet NFS will wake your server, only MySQL will not when you get into this state.
There is no difference in the wake-on-access module between the two and this problem can not come from there. It could seem like the MySQL (kodi-client) module itself gets permanently broken after a single connection-failure and decides to never try again, that could explain such behaviour. I did not think it worked like that but I will have a look in the code
edit : I find this
Code:
CLog::Log(LOGINFO,"MYSQL server has gone. Will try %d more attempt(s) to reconnect.", attempts);
It looks like 5 retry-attemps are made and then connection is permanently broken.

2) .. logging a WakeOnAccess every "TimeOut" seconds .. keeping the server awake
There is no difference between Pingport setting and frequency of ping-tests made so I dont see how this has any significance. If your rpi keeps server awake by repeatedly connecting to it then there must be an add-on (or skin) that does something periodically. You need to figure out what that is and disable it or let the server stay on 24/7. Check the logs to get an idea of what may be causing the periodic connection.

Thanks for the fast response! Here is what I found in the log this AM in the raspberry:

23:42:35 15247.150391 T:1776026608 ERROR: Unable to open database: MyMusic56 [2003](Can't connect to MySQL server on '192.168.1.8' (113))

This is with OSMC, May update (Kodi 16.1). There are no retry attempts for some reason - it shows just once.

When I tried (with Yatse) to playback content, nothing would play - the raspberry was unable to browse the library, no errors pop up in the log, the raspberry responds (e.g. HTTP interface, can launch addons) but does not find any content, i.e. it gave up on the library.

Right now I'm going back to local-db (removed mysql configuration) and doing rescan of the library over NFS, with WOL back to my original settings. Will review behavior again specially after forced sleeps of the main Kodi box. It was working fine before (the raspberry was literally always-on for months without a reboot, and the main Kodi box was force-sleep with its remote a few times a day, and I never noticed a WOL problem). Will post findings.
Reply
Yes, maybe I was not clear enough in my post above, but that is as expected.
If you get the log ..ERROR: Unable to open database:.. then the MySQL connection is permanently broken until you restart Kodi - it will not recover.
And if you force-sleep the server there is a big risk that this will happen. When you use wake-on-access you may not force-sleep server, it is not a supported use-case.
Reply
  • 1
  • 34
  • 35
  • 36
  • 37
  • 38(current)

Logout Mark Read Team Forum Stats Members Help
Automatic WakeOnLan upon accessing MySql or FileShares4
This forum uses Lukasz Tkacz MyBB addons.