Page 1 of 1

Remotely restart service

PostPosted: Fri Jan 27, 2012 3:41 am
by seus
Hello,

I've noticed that sometimes my TV has trouble seeing the Serviio service as an available input. When this happens restarting the service always makes it pop up instantly (restarting the server from the console does not). I don't terribly mind doing this once in awhile but it would be really nice to not have to go to the computer to do it. Is there a way, or if not would it ever be considered, to remotely restart the service? By say, visiting a URL on my phone or something like that.

Thanks!

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 4:28 am
by moltra

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 6:33 am
by seus


Thanks! Those are great to see. Will definitely check out the Android app. Now that I think about it though, it seems like any front-end for the console would probably not have the capabilities of actually restarting the Windows service, which is what seems to be needed to get my TV to see it sometimes. I guess I may have to look into Windows-specific solutions to accomplish that.

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 6:44 am
by moltra
Actually I think all three can stop and start the serviio server.

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 8:12 am
by will
You can stop or start the DLNA streaming server part of it.

You can actually also exit the main server process, however you cannot start it back up again, which is why I left it out of the app. Not much use from a mobile app if you can stop it but not start it.

The console uses this for the Exit Serviio option when you right click the icon in the notification area.

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 1:04 pm
by zip
still, the streaming part should help in cases like this, as it'll advertise the server again. If it doesn't work post a bitbucket ticket.

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 3:19 pm
by seus
moltra wrote:Actually I think all three can stop and start the serviio server.

Yes, the issue is stopping/starting the server (from the Windows console) doesn't make my TV see it, but restarting the actual Windows service does.

will wrote:You can stop or start the DLNA streaming server part of it.

You can actually also exit the main server process, however you cannot start it back up again, which is why I left it out of the app. Not much use from a mobile app if you can stop it but not start it.

The console uses this for the Exit Serviio option when you right click the icon in the notification area.

Thanks for chiming in...that makes sense and is what I expected.

zip wrote:still, the streaming part should help in cases like this, as it'll advertise the server again. If it doesn't work post a bitbucket ticket.

Yeah I'm not sure why stopping and restarting the server from the Windows console doesn't make it show up on the TV but restarting the Windows service does. I have commented out the Device Description block in my profile for the Samsung TV per your previous advice to make the AllShare pop-up stop displaying on the TV. Would that be related at all? If not I will try it again and maybe post a ticket.

Re: Remotely restart service

PostPosted: Fri Jan 27, 2012 4:11 pm
by Cerberus
seus wrote:Yeah I'm not sure why stopping and restarting the server from the Windows console doesn't make it show up on the TV but restarting the Windows service does. I have commented out the Device Description block in my profile for the Samsung TV per your previous advice to make the AllShare pop-up stop displaying on the TV. Would that be related at all? If not I will try it again and maybe post a ticket.


would seem that service get block or stops responding for some reason that why it doesnt reappear.

Re: Remotely restart service

PostPosted: Sun Jan 29, 2012 2:36 am
by seus
Cerberus wrote:
seus wrote:Yeah I'm not sure why stopping and restarting the server from the Windows console doesn't make it show up on the TV but restarting the Windows service does. I have commented out the Device Description block in my profile for the Samsung TV per your previous advice to make the AllShare pop-up stop displaying on the TV. Would that be related at all? If not I will try it again and maybe post a ticket.


would seem that service get block or stops responding for some reason that why it doesnt reappear.


That makes sense. If the service hung or crashed would that get reported in serviio.log? I can check that the next time this happens to see if anything occurred.

Re: Remotely restart service

PostPosted: Sun Jan 29, 2012 3:09 am
by Cerberus
seus wrote:
Cerberus wrote:
seus wrote:Yeah I'm not sure why stopping and restarting the server from the Windows console doesn't make it show up on the TV but restarting the Windows service does. I have commented out the Device Description block in my profile for the Samsung TV per your previous advice to make the AllShare pop-up stop displaying on the TV. Would that be related at all? If not I will try it again and maybe post a ticket.


would seem that service get block or stops responding for some reason that why it doesnt reappear.


That makes sense. If the service hung or crashed would that get reported in serviio.log? I can check that the next time this happens to see if anything occurred.


ask me another i have no idea never looked. ZIP?

Re: Remotely restart service

PostPosted: Sun Jan 29, 2012 7:59 pm
by allg
I have the same problem. After some time (maybe after Windows standby mode) my tv is showing serviio only after restarting the service. I made a batch file therefore 8-)

I noticed the following in my log file:
2012-01-29 16:55:31,771 WARN [DiscoveryAdvertisementNotifier] Could not advertise the device on any available NIC, will try again

Re: Remotely restart service

PostPosted: Sun Jan 29, 2012 8:28 pm
by Cerberus
allg wrote:I have the same problem. After some time (maybe after Windows standby mode) my tv is showing serviio only after restarting the service. I made a batch file therefore 8-)

I noticed the following in my log file:
2012-01-29 16:55:31,771 WARN [DiscoveryAdvertisementNotifier] Could not advertise the device on any available NIC, will try again


that would make sense as standby mode is not supported and users are advise not to use it or hibernate when running serviio.

Re: Remotely restart service

PostPosted: Sun Jan 29, 2012 9:09 pm
by allg
Windows 7 event-based solution to restart the service via batch-file automatically after standby:

Set up an scheduled task to run with this event as a trigger:
Log: System
Source:Power-Troubleshooter
Event ID: 1

Re: Remotely restart service

PostPosted: Thu Feb 16, 2012 5:48 pm
by seus
Cerberus wrote:
allg wrote:I have the same problem. After some time (maybe after Windows standby mode) my tv is showing serviio only after restarting the service. I made a batch file therefore 8-)

I noticed the following in my log file:
2012-01-29 16:55:31,771 WARN [DiscoveryAdvertisementNotifier] Could not advertise the device on any available NIC, will try again


that would make sense as standby mode is not supported and users are advise not to use it or hibernate when running serviio.

Really? That's a shame, most people sleep their PCs daily I would think, it really is the most sensible thing to do (very little power usage and almost instant on/off). Are there technical reasons why the service can't play nice with resume from sleep? I use it every day and most of the time Serviio shows up just fine on my TV, so it definitely can work without being restarted after resume from sleep, I'm not sure why it only sometimes fails.

allg wrote:Windows 7 event-based solution to restart the service via batch-file automatically after standby:

Set up an scheduled task to run with this event as a trigger:
Log: System
Source:Power-Troubleshooter
Event ID: 1

Thanks for this! I had no idea you could use an event trigger with those parameters to detect when resuming from sleep. I used this, did a net stop/net start as my actions, and set it to run under SYSTEM so I wouldn't see any pop-ups. Haven't tested it resuming from sleep yet, but it worked when I ran the task on-demand. I'll be very happy if this completely eliminates the issue of my TV sometimes not seeing Serviio.

Re: Remotely restart service

PostPosted: Thu Feb 16, 2012 6:16 pm
by Cerberus
seus wrote:
Cerberus wrote:
allg wrote:I have the same problem. After some time (maybe after Windows standby mode) my tv is showing serviio only after restarting the service. I made a batch file therefore 8-)

I noticed the following in my log file:
2012-01-29 16:55:31,771 WARN [DiscoveryAdvertisementNotifier] Could not advertise the device on any available NIC, will try again


that would make sense as standby mode is not supported and users are advise not to use it or hibernate when running serviio.

Really? That's a shame, most people sleep their PCs daily I would think, it really is the most sensible thing to do (very little power usage and almost instant on/off). Are there technical reasons why the service can't play nice with resume from sleep? I use it every day and most of the time Serviio shows up just fine on my TV, so it definitely can work without being restarted after resume from sleep, I'm not sure why it only sometimes fails.


thats a common mistake as your running a media Server on it, its no longer a normal pc ;) this is why a lot of people now use low power NAS uniots to run programs like serviio to save on power usage.

Re: Remotely restart service

PostPosted: Thu Feb 16, 2012 10:17 pm
by seus
Cerberus wrote:
seus wrote:
Cerberus wrote:that would make sense as standby mode is not supported and users are advise not to use it or hibernate when running serviio.

Really? That's a shame, most people sleep their PCs daily I would think, it really is the most sensible thing to do (very little power usage and almost instant on/off). Are there technical reasons why the service can't play nice with resume from sleep? I use it every day and most of the time Serviio shows up just fine on my TV, so it definitely can work without being restarted after resume from sleep, I'm not sure why it only sometimes fails.


thats a common mistake as your running a media Server on it, its no longer a normal pc ;) this is why a lot of people now use low power NAS uniots to run programs like serviio to save on power usage.

Hmm...maybe I should clarify what I meant. I don't sleep my PC and expect my TV to wake it up via the NIC when it pings for DLNA servers or anything like that. I explicitly wake it myself when I want to use it or know that I will be streaming media from it. In that regard, it isn't really equivalent to a full-time media server. In fact, given how lightly running Serviio tasks a modern system with lots of RAM and CPU power, I don't think it's too unusual to use a regular household PC for Serviio duties at all, and to expect it to be run 24/7 just because it sometimes performs this task seems incorrect. So I just think the service should be able to handle a resume from sleep without crashing or hanging. But I don't expect it to wake on-demand for me or anything.

But, it's mostly an academic discussion - I don't even mind the current situation if this scheduled task takes care of it.

Re: Remotely restart service

PostPosted: Thu Feb 07, 2013 9:00 pm
by dusza
allg wrote:Windows 7 event-based solution to restart the service via batch-file automatically after standby:

Set up an scheduled task to run with this event as a trigger:
Log: System
Source:Power-Troubleshooter
Event ID: 1


Just registered to post that. I was struggling with the same issue for a couple of months. This solved the problem and should be a sticky or even make it into the FAQ (if it's not already there).
Thanks!