(2014-05-06 09:49)t4_ravenbird Wrote: I see no error in any of your logs - but they are very short and stops only 20-30 seconds after WakeOnAccess reports "server started" ; you need to provide the full log
".. I .. put the computer to sleep .."
Did you force-sleep your server prematurely? Before the TimeOut specified (300 secs) ?
This is not allowed and will break your system and cause symptoms like you report
You must wait until the server goes to sleep after its idle-timeout and the idle-timeout must be >= WakeOnAccess parameter TimeOut
Here's my current scenario:
Kodi Client = raspberry Pi with OSMC, configured to wake up my main Kodi HTPC that hosts: a) NFS file server, b) MySQL; this client is always-on
Main Server: fedora server: running NFS server, MySQL server, and another Kodi; Idle Time out = 35 minutes
For many months, my raspberry was using a local DB instead of MySQL, and was accessing my content remotely via NFS. I had in my wakeonlan.xml:
Timeout = 2100
Pingport = 0
This worked great. Even if I manually sent the main server to sleep in the evening, the raspberry always woke it up before accessing the NFS share the morning after. I never noticed a single problem in many months with this use pattern.
Now I configured the raspberry to use a remote MySQL DB, on the same Main Server as described above, and I see a very strange behavior.
After a clean reboot of the raspberry or a kodi service restart, I can see that a WOL packet is sent to the main server (apparently the OSMC skin triggers a query of all media DBs), and all works OK.
Then if for any reason I force-sleep the main server, and I attempt to playback content in the raspberry I see in the raspberry a log entry:
Can't connect to MySQL server on '192.168.x.x' (113)
... it fails WITHOUT any previous attempt to wake up the server, i.e. there is no "WakeOnAccess ... triggered by..." etc. It just doesn't trigger. I understand this could happen if I attempt this within "2100 seconds" of a successful "wake on lan" ping... if I understood correctly how this Kodi feature works.
But here is the issue: if I wait e.g. 35 minutes for the "wake on lan" timeout to expire, and then try to play content, I would have thought that upon the next MySQL access, the WOL packet will be sent. However this is not happening: after the first MySQL failure, the raspberry won't sent a WOL packet again until Kodi is restarted.
It seems that NFS access either bypass the "ping timeout" and always trigger a ping/WOL or alternatively if an NFS connectivity issue happens, a WOL is sent afterwards. However, MySQL can't recover from a single access error.
I tried changing the Pingport to 3306 (MySQL) and noticed that in the log, Kodi was logging a WakeOnAccess every "TimeOut" seconds, keeping the server awake for ever (and unable to handle a single force-sleep) - hence it was useless.
Is there something I could be missing to get Wake On Lan working properly with MySQL? ... other than removing MySQL and going back to local DB