The IP address renewal is simply triggering Serviio's new binding recovery strategy. You should be able to see this in the log - when Serviio loses the IP address it shuts down its DiscoverySSDPMessageListener service (which is I believe the culprit - it fails when the PC awakes from sleep), reacquires a new IP address (in this case the same one) and then restarts the SDDPListener.
In the log file it will look something like:
- Code:
2013-06-01 21:34:23,732 WARN [DiscoveryAdvertisementNotifier] Cannot acquire NIC for current bound IP address 192.168.0.2, will re-acquire new IP
2013-06-01 21:34:23,732 INFO [DiscoverySSDPMessageListener] Leaving DiscoverySSDPMessageListener
2013-06-01 21:34:23,732 INFO [EventSubscriptionExpirationChecker] Leaving EventSubscriptionExpirationChecker, removing all event subscriptions
2013-06-01 21:34:23,748 INFO [DiscoveryAdvertisementNotifier] Leaving DiscoveryAdvertisementNotifier
2013-06-01 21:34:23,780 WARN [MultiCastUtils] Could not find NIC with name 'eth6-0'
2013-06-01 21:34:23,780 WARN [LocalAddressResolverStrategy] Haven't found IP address for NIC eth6-0, will try again 9 times
2013-06-01 21:34:23,824 INFO [EventDispatcher] Leaving EventDispatcher
2013-06-01 21:34:28,826 WARN [MultiCastUtils] Could not find NIC with name 'eth6-0'
2013-06-01 21:34:28,948 WARN [LocalAddressResolverStrategy] Haven't found IP address for NIC eth6-0, will try again 8 times
2013-06-01 21:34:34,009 WARN [MultiCastUtils] Could not find NIC with name 'eth6-0'
2013-06-01 21:34:34,009 WARN [LocalAddressResolverStrategy] Haven't found IP address for NIC eth6-0, will try again 7 times
2013-06-01 21:34:39,082 WARN [MultiCastUtils] Could not find NIC with name 'eth6-0'
2013-06-01 21:34:39,082 WARN [LocalAddressResolverStrategy] Haven't found IP address for NIC eth6-0, will try again 6 times
2013-06-01 21:34:44,201 INFO [Device] Updated bound IP address of Device with UUID: c41c5514-0d79-3774-967b-023b9e31d01f, bound address: 192.168.0.2
2013-06-01 21:34:44,202 INFO [DiscoveryAdvertisementNotifier] Starting DiscoveryAdvertisementNotifier
2013-06-01 21:34:44,202 INFO [EventDispatcher] Starting EventDispatcher
2013-06-01 21:34:44,203 INFO [EventSubscriptionExpirationChecker] Starting EventSubscriptionExpirationChecker
2013-06-01 21:34:44,342 INFO [DiscoverySSDPMessageListener] Starting DiscoverySSDPMessageListener using interface eth6 (Intel(R) 82566DM-2 Gigabit Network Connection) and address 192.168.0.2, timeout = 0
If you are looking to create a batch file, you need not worry about renewing the IP address - the restart of the Serviio service will do the trick. You may want to implement this sleep workaround from jammoblammo:
viewtopic.php?f=5&t=8393#p67123.
For some reason I do not get this sleep issue, even though its prevalent with many other Win users - Serviio always goes thru the above address binding recovery for me after awakening from sleep. I wish I could work out why - it may help others.
To that end I wonder if you could help me confirm a theory, by checking your event log (Windows System log, type Event in the start menu to get to the Event Viewer) - I get the following after awakening from sleep:
- Code:
Information 4/06/2013 6:12:03 PM e1express 32 None
Warning 4/06/2013 6:12:03 PM e1express 27 None
Information 4/06/2013 6:12:00 PM Service Control Manager 7036 None
Information 4/06/2013 6:11:58 PM e1express 32 None
Warning 4/06/2013 6:11:56 PM e1express 27 None
Information 4/06/2013 6:11:57 PM Service Control Manager 7036 None
Information 4/06/2013 6:11:57 PM Service Control Manager 7036 None
Information 4/06/2013 6:11:50 PM Kernel-General 1 None
Information 4/06/2013 5:34:50 PM Service Control Manager 7036 None
Information 4/06/2013 5:34:50 PM Service Control Manager 7042 None
Information 4/06/2013 5:34:40 PM Kernel-Power 42 (64)
reading from bottom to top, I get a Kernel-Power 42 message (this is the system going to sleep), followed later by a Kernel-General 1 message (effectively the system waking up). Can you find the same sort of combination in your log, and then confirm whether you get a pair of e1express messages (or similar) after that. These messages relate to my ethernet port being shut down and then restarted.
I get this ethernet restart twice (not sure if that's relevant) but I think this is why I don't see the awakening from sleep problem - my ethernet shuts down momentarily, losing and then re-acquiring its IP address which then causes the bound address strategy in Serviio to be triggered. This strategy restarts the listener service and the world is a nice place again.
Hope the above makes sense. Given that your PC is not recovering from sleep, I wonder if you could explore your windows system event log and see if your ethernet port is being restarted after sleep. If it isn't, this would confirm my theory... then we just have to work out why the ethernet port restarts in my PC and not others.
Of course a nicer solution would be that the Serviio listener service survived sleep so it didn't need to be restarted, (if that is indeed the problem - I thought sleep was meant to preserve all application states so that they recovered seamlessly) but that is in zip's domain, which I know he is working through.
Thanks in advance.