Jump to content

[RELEASE] Server Keepalive Batch Tool


uniflare

Recommended Posts

Thanks for helping theirongiant! I'll take a look at that later tonight...
 

How to use it on a multiserver? 2 arma3server.exe on one Database

Unfortunately - for now, you would need to modify the code to keep 2 arma instances alive.
Fortunately this is feasible to add/do yourself:
 
More Than One Arma Instance
The easiest method is to use notepad++ and do the following:

  • Make sure you have a full copy of Server keepalive on both arma installs. NOTE: The EXE names for both arma servers needs to be different!
  • Then open notepad++
  • Hit Ctrl+f
  • Click the find in files tab
  • In the folder location search for your #2 server batch_lib folder.
  • In the look for box put in exactly "c:\batch_settings.bat" (without the quotes..)
  • In the replace with box put the same but change the name of the settings file, eg "c:\batch_settings2.bat"
  • Then create a copy of the batch_settings.bat file to the new file you just named (eg, batch_setings2.bat)
  • Change the settings apropriately BUT be sure to disable ASM Keepalive and/or Teamspeak Keepalive in either one of the settings files if your using those tools.

Once you have done this both arma instances will be kept alive.

NOTE: The database may be started twice on restarts.

Solution: Just remove the lines between ":Stage1" and ":Stage2" - lines 283-288 - Inside the #2 batch_lib/core/server_keep alive.bat file to disable the db keepalive.
I think you need 2x BEC to run for two servers but if you only need one BEC then some more Jiggery Pokery will be required...

 

I will try to release an update tonight with options inside the settings to keep the BEC/DB (redis) processes alive or not, along with a fix for the above problem regarding initial settings/fatal error.

*Update released with revised config and ability to not keep db/bec running in that particular instance.

Thanks for the feedback so far guys n gals its nice to know my tools are useful to some people.
<3

Link to comment
Share on other sites

Pushed Release 0.9.3 *HOTFIX

 

*NEW: Can configure to keep db/bec alive.
*NEW: Reworked Config File (Should be a little clearer).
*NEW: Some new error checking at start. Should catch simple mistakes.
*FIXED: Some hard-coded paths (again).
*FIXED: Critical Error at start now shows the correct error message.

Link to comment
Share on other sites

Great post it works for me , thank you! does anyone have a 4 restart scheduler job they can share with me that would work with this addon?

 

I am stuck pretty please?

 

This is the 4 hourly scheduler I'm using, you'll probably have to change the path on the setauto.bat lines

 

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Scheduler>
	<!-- Midnight restart -->

	<job id="0">
		<day>1,2,3,4,5,6,7</day>
		<start>23:50:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 10 minutes</cmd>
	</job>

	<job id="1">
		<day>1,2,3,4,5,6,7</day>
		<start>23:55:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 5 minutes</cmd>
	</job>

	<job id="2">
		<day>1,2,3,4,5,6,7</day>
		<start>23:59:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 60 seconds</cmd>
	</job>

	<job id="3">
		<start>23:59:59</start>
		<runtime>000000</runtime>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\Games\Arma3\A3Master\batch_lib\lib\setauto.bat</cmd>	
	</job>

	<job id="4">
		<day>1,2,3,4,5,6,7</day>
		<start>00:00:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>


	<!-- 4 a.m. restart -->

	<job id="5">
		<day>1,2,3,4,5,6,7</day>
		<start>03:50:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 10 minutes</cmd>
	</job>

	<job id="6">
		<day>1,2,3,4,5,6,7</day>
		<start>03:55:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 5 minutes</cmd>
	</job>

	<job id="7">
		<day>1,2,3,4,5,6,7</day>
		<start>03:59:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 60 seconds</cmd>
	</job>

	<job id="8">
		<start>03:59:59</start>
		<runtime>000000</runtime>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\Games\Arma3\A3Master\batch_lib\lib\setauto.bat</cmd>	
	</job>

	<job id="9">
		<day>1,2,3,4,5,6,7</day>
		<start>04:00:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>


	<!-- 8 a.m. restart -->

	<job id="10">
		<day>1,2,3,4,5,6,7</day>
		<start>07:50:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 10 minutes</cmd>
	</job>

	<job id="11">
		<day>1,2,3,4,5,6,7</day>
		<start>07:55:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 5 minutes</cmd>
	</job>

	<job id="12">
		<day>1,2,3,4,5,6,7</day>
		<start>07:59:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 60 seconds</cmd>
	</job>

	<job id="13">
		<start>07:59:59</start>
		<runtime>000000</runtime>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\Games\Arma3\A3Master\batch_lib\lib\setauto.bat</cmd>	
	</job>

	<job id="14">
		<day>1,2,3,4,5,6,7</day>
		<start>08:00:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>


	<!-- 12 p.m. restart -->

	<job id="15">
		<day>1,2,3,4,5,6,7</day>
		<start>11:50:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 10 minutes</cmd>
	</job>

	<job id="16">
		<day>1,2,3,4,5,6,7</day>
		<start>11:55:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 5 minutes</cmd>
	</job>

	<job id="17">
		<day>1,2,3,4,5,6,7</day>
		<start>11:59:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 60 seconds</cmd>
	</job>

	<job id="18">
		<start>11:59:59</start>
		<runtime>000000</runtime>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\Games\Arma3\A3Master\batch_lib\lib\setauto.bat</cmd>	
	</job>

	<job id="19">
		<day>1,2,3,4,5,6,7</day>
		<start>12:00:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>


	<!-- 4 p.m. restart -->

	<job id="20">
		<day>1,2,3,4,5,6,7</day>
		<start>15:50:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 10 minutes</cmd>
	</job>

	<job id="21">
		<day>1,2,3,4,5,6,7</day>
		<start>15:55:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 5 minutes</cmd>
	</job>

	<job id="22">
		<day>1,2,3,4,5,6,7</day>
		<start>15:59:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 60 seconds</cmd>
	</job>

	<job id="23">
		<start>15:59:59</start>
		<runtime>000000</runtime>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\Games\Arma3\A3Master\batch_lib\lib\setauto.bat</cmd>	
	</job>

	<job id="24">
		<day>1,2,3,4,5,6,7</day>
		<start>16:00:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>


	<!-- 8 p.m. restart -->

	<job id="25">
		<day>1,2,3,4,5,6,7</day>
		<start>19:50:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 10 minutes</cmd>
	</job>

	<job id="26">
		<day>1,2,3,4,5,6,7</day>
		<start>19:55:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 5 minutes</cmd>
	</job>

	<job id="27">
		<day>1,2,3,4,5,6,7</day>
		<start>19:59:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Server restart in 60 seconds</cmd>
	</job>

	<job id="28">
		<start>19:59:59</start>
		<runtime>000000</runtime>
		<day>1,2,3,4,5,6,7</day>
		<loop>0</loop> 
		<cmd>C:\Games\Arma3\A3Master\batch_lib\lib\setauto.bat</cmd>	
	</job>

	<job id="29">
		<day>1,2,3,4,5,6,7</day>
		<start>20:00:00</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>



	<!-- Repeated Messages -->



</Scheduler>

Link to comment
Share on other sites

got problem

the autorestart server thing just went well

bue everytime when server  is on, all joined player got "epoch autoban#"

 

what happened.....

This batch does nothing with the game mod/code or game core itself, it entirely separate and non interactable.

 

Would be interesting though if this was the case for you, would be pretty wierd stuff :L

 

thanks again guys

Link to comment
Share on other sites

It worked for me until I added @Taviana and @aia, i added them to the config so its loaded with @epoch and @epochhive, 

now i have got Taviana map working on a none Kepalive batch tool and without BEC, however one my server with Kepalive batch tool and BEC on, i get kick everytime i go in the game here is my error

 

19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];


_logicType = typeof _logic;
_logic hideobject true;


_functionPriority = getnumber (configfile >> "cfgv"
19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];
_logicType = typeof _logic;
_logic hideobject true;


_functionPriority = getnumber (configfile >> "cfgv"
19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];
_logicType = typeof _logic;
_logic hideobject true;


_functionPriority = getnumber (configfile >> "cfgv"
19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];
_logicType = typeof _logic;
_logic hideobject true;


_functionPriority = getnumber (configfile >> "cfgv"
19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];
_logicType = typeof _logic;
_logic hideobject true;


_functionPriority = getnumber (configfile >> "cfgv"
19:45:31 : Player #0 DrGentleFingers (98f2d055e6d2f6271b74028) has been kicked by BattlEye: Script Restriction #6

Link to comment
Share on other sites

It worked for me until I added @Taviana and @aia, i added them to the config so its loaded with @epoch and @epochhive,

now i have got Taviana map working on a none Kepalive batch tool and without BEC, however one my server with Kepalive batch tool and BEC on, i get kick everytime i go in the game here is my error

19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];

_logicType = typeof _logic;

_logic hideobject true;

_functionPriority = getnumber (configfile >> "cfgv"

19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];

_logicType = typeof _logic;

_logic hideobject true;

_functionPriority = getnumber (configfile >> "cfgv"

19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];

_logicType = typeof _logic;

_logic hideobject true;

_functionPriority = getnumber (configfile >> "cfgv"

19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];

_logicType = typeof _logic;

_logic hideobject true;

_functionPriority = getnumber (configfile >> "cfgv"

19:45:31 : Script Log: #0 DrGentleFingers (98f2d055e6d2f6271b74028) - #6 "uleInit_status",false];

_logicType = typeof _logic;

_logic hideobject true;

_functionPriority = getnumber (configfile >> "cfgv"

19:45:31 : Player #0 DrGentleFingers (98f2d055e6d2f6271b74028) has been kicked by BattlEye: Script Restriction #6

That is battleye, not this tool.

You say you run a server without BEC? Then you are exposed to hackers big time. Make sure you can run your server with bec without any problems. Then see if the batch tool works.

Just to clarify, this is not a problem to do with my tool, rather a server or tool misconfiguration.

Good Luck.

Link to comment
Share on other sites

That is battleye, not this tool.

You say you run a server without BEC? Then you are exposed to hackers big time. Make sure you can run your server with bec without any problems. Then see if the batch tool works.

Just to clarify, this is not a problem to do with my tool, rather a server or tool misconfiguration.

Good Luck.

 

 I only run test server, you are right thought it was BE filter issue, the weird thing is it worked in server A but not B, I had to add exception to the BE filter. nothing wrong with this tool it works great, I love it!

 

 just a question with backups, what the best way to restore/roll back server using the backup files your tool creates?  sorry i knew how to to work on SQL stuff but still new to Redis!

Link to comment
Share on other sites

 I only run test server, you are right thought it was BE filter issue, the weird thing is it worked in server A but not B, I had to add exception to the BE filter. nothing wrong with this tool it works great, I love it!

 

 just a question with backups, what the best way to restore/roll back server using the backup files your tool creates?  sorry i knew how to to work on SQL stuff but still new to Redis!

Thanks! I'm glad it all worked out for you in the end :).

 

 

The backups are basically just the database file, depending on whether you have chosen to compress them (store the backups in zip files) or keep them as raw files (just copy plain files to backup folders);

 

Compressed/Zipped

Stop Redis-Server (Close Keepalive tool and close redis-server.exe)

Locate your backup folder (by default "C:\apps\epoch_redis_backups")

Open the appropriate zip file (depending on which time you want to restore). (note: You may need 7zip installed).

Extract the "dump.rdb" file to your redis folder (e.g, C:\A3Server\Games\A3Master\DB)

Start the Keepalive tool.

 

No Zip/Raw Backups

Even easier!

Stop Redis-Server (Close Keepalive tool and close redis-server.exe)

Find your backup folder just like above.

Open the appropriate folder (depending on which time you want to restore).

Copy the "dump.rdb" file to your redis folder (e.g, C:\A3Server\Games\A3Master\DB)

Start the Keepalive tool.

 

 

Hope this helps, any problems feel free to PM me. I try to check the forums as often as possible, I will eventually get back to you :).

Thanks again for the feedback everyone.

Link to comment
Share on other sites

Very good comprehensive set of scripts, I especially like the archival of all logs and db backups.

 

I have modified ours with some search and replace to suit two separate instances on arma3server, bec and redis.

 

Some tips.

 

1. If you need to run two BEC with one renamed arma3server.exe then you will need to use this parameter in your BEC config.

[Misc]
ServerExeName = myAwesomeServer.exe
Link to comment
Share on other sites

Very good comprehensive set of scripts, I especially like the archival of all logs and db backups. I have modified ours with some search and replace to suit two separate instances on arma3server, bec and redis. Some tips. 1. If you need to run two BEC with one renamed arma3server.exe then you will need to use this parameter in your BEC config.

[Misc]
ServerExeName = myAwesomeServer.exe

Its nice to hear feedback, even better when its not a bug :).

Thanks for the tip!

Link to comment
Share on other sites

This tool works great, thank you very much for creating it! I'm experiencing a small problem though: after planned (through BEC scheduler) restarts of my Arma 3 Epoch server, the "arma3server.exe" isn't closing. It stays active with the message "Arma 3 is not responding" every single time and I have to click "Close the program" manually. Then your awesome script kicks in again and it does start the server again. Is there a way that your tool can kill the crashed application?

Link to comment
Share on other sites

pm sent,  admin mode did not work

I'm sorry I couldn't help you, hope you get something working for you :).

 

 

This tool works great, thank you very much for creating it! I'm experiencing a small problem though: after planned (through BEC scheduler) restarts of my Arma 3 Epoch server, the "arma3server.exe" isn't closing. It stays active with the message "Arma 3 is not responding" every single time and I have to click "Close the program" manually. Then your awesome script kicks in again and it does start the server again. Is there a way that your tool can kill the crashed application?

Thanks for the great feedback! hmm, there maybe a way... I'll take a look tonight..

 

Thankyou for this great tool. Being an amature server set up guy this has helped much!!

Your very welcome!

Link to comment
Share on other sites

This tool works great, thank you very much for creating it! I'm experiencing a small problem though: after planned (through BEC scheduler) restarts of my Arma 3 Epoch server, the "arma3server.exe" isn't closing. It stays active with the message "Arma 3 is not responding" every single time and I have to click "Close the program" manually. Then your awesome script kicks in again and it does start the server again. Is there a way that your tool can kill the crashed application?

I am having the same issue. HAs anyone got a fix for this yet?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...