-
Re: Starting and stopping of service through AF
Lal_Babu_ShaikFeb 8, 2019 12:47 PM (in response to sachin_kumar_s)
-
Re: Starting and stopping of service through AF
sachin_kumar_s Feb 11, 2019 5:54 AM (in response to Lal_Babu_Shaik)Hi Lal babu,
We are trying automatically Start/stop the services. So that we do not have to log in to the system and start/stop the service every time.
Thanks,
Sachin.
-
Re: Starting and stopping of service through AF
Lal_Babu_ShaikFeb 11, 2019 6:09 AM (in response to sachin_kumar_s)
1 of 1 people found this helpfulHi Sachin
Service failure /stop can occur due to many reasons. It is always recommended to know the root cause of the issue before restart the service else it mail fail again. If you are planning to automate service restart then use Powershell to start and stop the service and you may to schedule the script to check the service and start accordingly.
If you want to start/stop a service based on certain value in PI/AF then you can use PI Powershell to check the value and excute Start-Service accordingly. Please make sure you hare having permission to start and stop service using powershell.
-
-
-
Re: Starting and stopping of service through AF
sraposoFeb 8, 2019 3:26 PM (in response to sachin_kumar_s)
1 of 1 people found this helpfulHi Sachin,
You could do it in AF programmatically by using a custom data reference. What's the use case though? What are you trying to do?
Thanks,
Seb
-
Re: Starting and stopping of service through AF
sachin_kumar_s Feb 11, 2019 5:50 AM (in response to sraposo)Hi seb,
What we are trying to do is that, whenever a service gets stopped we need to get it started automatically. So that we do not have to log in to the system and start the service.
We are trying to do it through any PI related application(Reason being we may not have access to all the windows application whereas we have access to all PI application).
And could you elaborate on what you meant by AF programmatically by using a custom data reference.
Thanks,
Sachin.
-
Re: Starting and stopping of service through AF
Eugene LeeFeb 11, 2019 7:06 AM (in response to sachin_kumar_s)
2 of 2 people found this helpfulYou have to be careful with permissions if you use CDR since it takes the access rights of the end user. i.e. your end user might not have the appropriate permissions to start/stop services.
Reason being we may not have access to all the windows application
if you do not have admin access, chances are you might run into problems when you try to start/stop services. You have to ensure that each end user has the right permissions.
-
Re: Starting and stopping of service through AF
sraposoFeb 11, 2019 2:12 PM (in response to sachin_kumar_s)
2 of 2 people found this helpfulHi Sachin,
There is a recovery configuration for every windows service. I think the best short term solution here would be to restart the service if a failure occurs. You can see this in services.msc. For example:
As Lal suggested, if a service stops, the best approach is to identify why the service stopped. This can be done by looking into the logs of the application or if the service is crashing capture a crash dump using a postmortem debugger such as ProcDump. This way you could prevent the service from stopping/crashing in the future.
If a service is critical for production and can never be stopped, the recommended approach is to configure either fail over or high availability depending on the product.
I wouldn't configure this type of service recovery using PI software as it isn't designed to do this.
Thanks,
Seb
-
Re: Starting and stopping of service through AF
jyiFeb 12, 2019 12:25 AM (in response to sachin_kumar_s)
1 of 1 people found this helpfulPlease contact our techsupport line if you are having continuous service stoppage. Manually/forcefully restarting the services are never a good answer. There will be a bigger reasons why it breaks down in the first place.
Most PI Services are designed to run all the time. There are a few services that run on-demand and/or by a trigger. So if one of below services include the one you are manually restarting, then please contact our support people!
PI Server-Verify that the corresponding PI services are running
-
-