Hello everybody,
I am using Aris 9.7 on Windows 2012 server.
I would like to schedule restart of Aris services but i am not sure how do i do that !
Can somebody on the forum help me in doing it OR guide me with appropriate documentation for the same ?
Highly appreciate any assistacne !!
Please everyone,
If my query lacks details, do let me know and i shall be happy to furnish the same.
I am sure this is not a mammoth task for the experts on this community here and should be doable.
Please guide me as i am on a dead line here :(
Thank you for hearing me out !!!
Hello,
First of all, please do not spam the forum to try to get an immediate answer ;-)
Anyway, you can start the aris cloud controller with the right template file like this:
acc.bat -c generated.apptypes.current.cfg -n nodes.nf -f restartAll.pt
Where nodes.nf is a file containing your nodes:
add node n1 <serverName> @9001 <acc user> <acc password>
and the restartAll.pt contains the acc commands to run:
on all nodes stopall
on all nodes startall
Regards,
Didier
Hello Sayed,
on Windows Server 2012 you have 2 commands for batches:
rem check if aris 9 service is running net start | find /i "aris agent" rem if servicename not found then if errorlevel 1 net start "Aris Agent 9.7"
or with the service control manager command line tool sc.exe, which does the same as the control panel "Services"
Only here, the Aris service name is not the display name "Aris Agent 9.x" but "ArisCloudAgent"
rem check if aris 9 service is running sc query "ArisCloudAgent" | find /i "running" rem output is " STATE : 4 RUNNING" rem or " STATE : STOPPED" rem if servicename not found then if errorlevel 1 sc start "ArisCloudAgent"
Regards, Martin
Firstly, Please accept my sincere thanks both of you, for reverting back to my query.
Secondly, i did not mean to spam the board, please pardon me for it !
Didier and Martin you have both really given wonderful responses, But now i am a bit wary and i am not sure what do follow to Schedule RESTART of Aris at desired time !
I currently have 2 server, One Designer and the other Publisher and i need to restart Aris on both !
Didier, Can you please let me know, what Aris file should i call from Windows scheduler to STOP/START Aris on my desired time, even if aris is running, i still need to restart it !
I could not find any of the those files on my server that you have mentioned above :(, Where can find them ?
Martin, I am guessing, Your instructions mean, IF ARIS is NOT running then start it, correct ?
On the other hand i need to RESTART it, no matter what !!
Can you guide me on Didier's line ?
Thank you both of you once again !!!
Hello Sayed,
We use a one-line .bat file similar to Didier's one, scheduled by Windows. It contains:
D:\SoftwareAG\ARIS9.7\server\acc\acc.bat -h DesignServerName -c "D:\SoftwareAG\ARIS9.7\server\generated.apptypes.cfg" -u Clous -p 9001 -pwd g3h31m startall > D:\ARIS9.7\Logs\ADS_START.log
DesignServerName is the name of the Designer server. D:\SoftwareAG\ARIS9.7 is the path to our ARIS installation on Windows Server 2012, g3h31m is the default password (we use another one). It logs into ADS_START,log
For publisher, we use:
D:\SoftwareAG\ARIS9.7\server\acc\acc.bat -h PublisherServerName -u Clous -p 9001 -pwd g3h31m start businesspublisher_m
This works even if the instances are already active.
Hope this helps, Thierry
Fantastic,
Thank you very very much "Thierry Caro" !!!
NOTE :- I have removed the so called junk response from my post that i had earlier !!
I have tested out the solution for my "Publisher" server and it is giving me an error saying my user and password is not correct !!!
(MultiAgentCommandLineCloudController.java:33)
Could not authenticate with the cloud node at http://MDARISPUBLISHER:9001/rest.
Make sure that you specified the correct username and password.
But i am sure i am using the correct user name and password, What else could be wrong ?
Any hints please !!!
Thank you everybody !!
Hello Caro,
I have gone ahead and tried to debug the issue and i guess i came close !!
I have modified the command a bit and i get a new error :-
I have issued the default user name and password and now i get this on screen :-
"Could not start runnable businesspublisher_l on node MDARISPUBLISHER: the runnable businesspublisher_l is already STARTED"
What could be missing not to NOT let it restart, I WANT TO restart it no matter what !!!
Any hints anybody !!!
Thank you
Further in my R&D, i have learnt i can call these 2 staements one by one and they work perfectly fine, if done manually...
acc.bat -h MDARISPUBLISHER -u Clous -p 9001 -pwd g2h31m stop businesspublisher_l
acc.bat -h MDARISPUBLISHER -u Clous -p 9001 -pwd g2h31m start businesspublisher_l
But when it comes to batch files, i nee to call them AFTER the first one has finished processing ....
How do we do that ?
Thank you
Hello Everybody,
I have finally settled for a batch file which i have created like this :-
@echo Off
acc.bat -h MDARISPUBLISHER -u Clous -p 9001 -pwd g2h31m stop businesspublisher_l && acc.bat -h MDARISPUBLISHER -u Clous -p 9001 -pwd g2h31m start businesspublisher_l
I have placed this file under this location :-
C:\SoftwareAG\ARIS9.7\server\acc\
I would request the admins on the board to please let me know of any unforeseen issues that i may face if my script has any issues. Please correct me and my script above OR if anybody can provide something better than the above.
Thank you everyone for reading and tolerating my updates again and again !!
NOW for some weird reason, My "Windows Task Scheduler" is giving me updates as :-
Task Scheduler did not launch task "\Aris Restart" because instance "{bca44687-db8f-402c-8eab-97c991d2858b}" of the same task is already running.
It refuses to restart it, Although if i start the script manually it works fine, BUT now through Scheduler it is giving reports as above !!
Somebody Please assist !!
Thank you
Hello Thierry Caro,
Every time my Windows scheduler tries to run this command :-
D:\SoftwareAG\ARIS9.7\server\acc\acc.bat -h PublisherServerName -u Clous -p 9001 -pwd g3h31m start businesspublisher_l
I get a message on screen and in the history of the scheduler, saying
"Task Scheduler did not launch task "\Aris Restart" because instance "{bca44687-db8f-402c-8eab-97c991d2858b}" of the same task is already running"
Can you help me modify this command to forcefully restart, no matter what !!!
Thank you
Hello Thierry,
Appreciate your assistance all this while :)
Yes, that is what i did, I did a STOP and START and it works fantastic :)
@echo off
acc.bat -h MDARISPUBLISHER -u Clous -p 9001 -pwd g3h31m stop businesspublisher_l && acc.bat -h MDARISPUBLISHER -u Clous -p 9001 -pwd g3h31m start businesspublisher_l | echo Successfully restarted Aris on %date% %time% >> C:\SoftwareAG\ARIS9.7\server\acc\aris_log.txt 2>&1
Can you let me know is it necessary to give a five minute gap ? or we can just stop and start as i have done above ?
Appreciate your clarification :)
Thank you
You may want to consider to call ACC only once but by a file with each command in a separate line:
acc.bat <the usual parameters> -f C:\Restart_Pulisher.txt
That file would contain the following ACC commands to stop Publisher, wait to complete the stop, and then start it and wait for that, too:
stop businesspublisher_l
wait for stopped businesspublisher_l
start businesspublisher_l
wait for started businesspublisher_l
And you could probe Publisher's current state via
get businesspublisher_l property state
Cheers
Rune
HelloRune,
Appreciate your input !!
Can you please let me know if it is technically wrong as to what i have done above >
Secondly, If i follow your instructions, Do I need to create 2 files like this :-
File1:-
stop businesspublisher_l
wait for stopped businesspublisher_l
File2:-
start businesspublisher_l
wait for started businesspublisher_l
echo Successfully restarted Aris on %date% %time% >> C:\SoftwareAG\ARIS9.7\server\acc\aris_log.txt 2>&1
Awaiting your update.
Thank you
You don't need two files unless you want to trigger both actions them separately. The "wait for" makes sure that the next command can't "overtake" the other one.
You may want to add some logic around in your batch for evaluating the status of Publisher before and after you triggered a stop/start (via get businesspublisher_l property state), because the "wait for" has a default timeout which applies if the runnable can't reach the desired state. In such a case it's likely that instead of STARTED or STOPPED it ended with DOWN or FAILED. That you should cover in your batch file to report at the end a qualified status.
Cheers
Rune