SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Not enough permissions or invalid service name

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Not enough permissions or invalid service name
Author Message
angie.cortes



Joined: 16 Jun 2015
Posts: 2
Country: Costa Rica

Post Not enough permissions or invalid service name Reply with quote
Hello,

I'm trying to restart a Windows service using JAL functions ServiceStop() and ServiceStart() in a 24x7 job.

Even though the session is running with an administrative account, I keep getting this error message: "Error stopping service. Not enough permissions or invalid service name."

I tried finding a place to review with which user is 24x7 running, but I couldn't find it.

Could you please help me?

Thank you.
Tue Jun 16, 2015 12:46 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
If you are running 24x7 Scheduler as a service, that would be the logon account assigned to the 24x7 Scheduler service. If you are running it in console or GUI mode, then that would be the account running the process. In case case you can see which user is running a process in the Task Manager.

Please note for the parameter you need to specify service name as it is registered with the system, not the service display name (or long descriptive name), which appears in the Windows services applet and which is often different. If not sure about the service names, execute the following from the command line
sc queryex type= service state= all
You want to use with ServiceStop/Start functions what is reported in the SERVICE_NAME value.
Tue Jun 16, 2015 1:09 am View user's profile Send private message
angie.cortes



Joined: 16 Jun 2015
Posts: 2
Country: Costa Rica

Post Reply with quote
Thank you very much for the clarifications.

After several attempts, I finally could use the functions but I had to add a Wait time in between the ServiceStop and the ServiceStart.
Apparently, the one that was failing was the attempt to start a service which was still in the process of being stopped.

The error message was quite confusing, though.
Tue Jun 16, 2015 2:30 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.