EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=593)
-   -   World Crash Rebooter (https://www.eqemulator.org/forums/showthread.php?t=24621)

Richardo 03-12-2008 11:52 AM

World Crash Rebooter
 
(This one owns the one I wrote, it is by nosfentora.)
Quote:

Originally Posted by nosfentora (Post 149565)
Updated links, heard they were broken

Source:
http://70.183.172.217/EQTools/EQEmuTools.rar
Binaries:
http://70.183.172.217/EQTools/Release.rar

I've put together an auto-crash killer and auto server-restarter. It's written in VB.Net and seems to work fine. Here's the source and win32 binaries

The crash-killer should close any crashed window - whether or not you have a debugger installed.

The server restarted can be set to restart your server periodically, or stop and start your server with one click.

The only thing it needs is to know where your .bat file for launching the server is. It can be installed in any directory.

Here's the .bat I use:

@echo off
cls
echo *** CLEARING OLD LOGS ***
del "C:\EQEmu\logs\*.*" /q
echo *** STARTING EVERQUEST WORLD EMULATOR ***
start world.exe
ping -n 15 127.0.0.1 >nul
echo *** STARTING EVERQUEST ZONES ***
start eqlaunch.exe static
start eqlaunch.exe dynamic
exit

Feedback is greatly appreciated!


trevius 03-12-2008 11:20 PM

That is awesome! My world.exe never crashes, but I am sure this will be handy for many that might have lesser stability.

Do you think you could make one that restarts the world.exe on a timer? To have it close out the existing one and start a new one? And if possible give a 30 minute warning countdown in game? I am able to deal with daily server reboots manually to keep mine running in tip top shape, but lower maintenance is always appreciated :) Plus, that would be extra handy when the server owner goes on vacation for a week :P If you run a windows server, it would probably be unplayable after a week of heavy play.

Just a thought for something extra if you had time. I don't think it is in high demand, but if it wasn't much change from this app, it might not be a bad additional program to have :)

cavedude 03-13-2008 12:40 AM

I actually purposely kill the world process every now and again on TGC when it starts acting up. We have a world auto-restart built into our script (running Linux) so no need to worry about that. The cool thing is when world goes down, really the only people who get disconnected are the ones zoning. For the most part, it's business as normal for everybody else except for the zone reconnect spam.

It isn't just Windows servers that are effected by heavy load and such, Linux boxes have the same issues though not as bad I think.

This is a great tool for Windows users, though. Mind if I add it to the next version of the Installer?

Richardo 03-13-2008 04:42 AM

Quote:

Originally Posted by trevius (Post 144555)
That is awesome! My world.exe never crashes, but I am sure this will be handy for many that might have lesser stability.

Do you think you could make one that restarts the world.exe on a timer? To have it close out the existing one and start a new one? And if possible give a 30 minute warning countdown in game? I am able to deal with daily server reboots manually to keep mine running in tip top shape, but lower maintenance is always appreciated :) Plus, that would be extra handy when the server owner goes on vacation for a week :P If you run a windows server, it would probably be unplayable after a week of heavy play.

Just a thought for something extra if you had time. I don't think it is in high demand, but if it wasn't much change from this app, it might not be a bad additional program to have :)

I'll work on that right now. It sounds like a really fun project. :D

Cavedude: If you think my software is worthy, I'd be honored. :)

Richardo 03-23-2008 09:32 AM

Quote:

Originally Posted by trevius (Post 144555)
That is awesome! My world.exe never crashes, but I am sure this will be handy for many that might have lesser stability.

Do you think you could make one that restarts the world.exe on a timer? To have it close out the existing one and start a new one? And if possible give a 30 minute warning countdown in game? I am able to deal with daily server reboots manually to keep mine running in tip top shape, but lower maintenance is always appreciated :) Plus, that would be extra handy when the server owner goes on vacation for a week :P If you run a windows server, it would probably be unplayable after a week of heavy play.

Just a thought for something extra if you had time. I don't think it is in high demand, but if it wasn't much change from this app, it might not be a bad additional program to have :)

I'm almost done with this tool for you. :) It will actually telnet into your server... send a message to everyone telling them the world will shutdown... then after that grace period timer ends.. it will end the world process and restart it. All of the timers are completely customizable as well as the emote it sends out to the players (including the color of the emote). All customizations will be done through a single config file (Timers run by milliseconds 1000 = 1sec 60000 = 1minute etc... Maximum that you can run a timer is 1 week.).. I just need a tester to test this script for me. :)

trevius 03-23-2008 09:57 AM

Woot, sounds very awesome! I wouldn't mind giving it a test run if you need :) I know for sure that this will help when Admins need to go away for the weekend (yes, it happens)!

One more question; Will this tool restart the world server automatically after a #worldshutdown is issued? Are both the reset on a timer and the crash restarter combined together in the new tool? This way, guides or GMs on the server can restart it anytime it needs one. I have a GM account on another server other than my own and could have definitely used that option over this past weekend. If I could have just don't a #worldshutdown and it would automatically restart, it would have helped server performance there considerably while their GM was away. So, does the crash restarter only work on a crash, or anytime the world server is shut down?

I notice that you mention it watches for "World.exe has encountered an error". And I am not sure of the message given if it is shut down with the #worldshutdown command.

Thanks for all of your work on this. I am sure it will be well appreciated by both server admins and players :D

Richardo 03-26-2008 06:00 AM

Well I can do many things... Right now it waits for an error, closes the error and reopens world. I could code a guide world rebooter/zone rebooter in 20 minutes if you want. I'll encorperate them all into a large pack and let you select which ones you want enabled.

trevius 03-26-2008 07:35 AM

You are the man! With a tool like this, I think options are the key. With the ones you have planned so far for the package, I think it should be a pretty complete tool that any server admin would find useful when it is needed.

Thank you!

circuitdragon 03-26-2008 10:17 AM

Here is a quick question for you. Will this affect only the world.exe file, or the zone.exe also, and thus doing a complete restart? If the zone.exe is included, then I have another question. When I use the shutdown command in game, it will close everything but the zone.exe's (plural, one for statics, one for dynamic zones). Just tossing out the ideas here, if this is something that will be included. Now the zone files themselves seem to "close down" all the zones they are running, just leaving a blank window open. Anyhow, just my thoughts/suggestions. :)

nosfentora 05-29-2008 02:15 PM

I've put together an auto-crash killer and auto server-restarter. It's written in VB.Net and seems to work fine. Here's the source and win32 binaries

The crash-killer should close any crashed window - whether or not you have a debugger installed.

The server restarted can be set to restart your server periodically, or stop and start your server with one click.

The only thing it needs is to know where your .bat file for launching the server is. It can be installed in any directory.

Here's the .bat I use:

@echo off
cls
echo *** CLEARING OLD LOGS ***
del "C:\EQEmu\logs\*.*" /q
echo *** STARTING EVERQUEST WORLD EMULATOR ***
start world.exe
ping -n 15 127.0.0.1 >nul
echo *** STARTING EVERQUEST ZONES ***
start eqlaunch.exe static
start eqlaunch.exe dynamic
exit

Feedback is greatly appreciated!

spider661 06-04-2008 01:27 AM

this is not working on my pc it loads and everything but does not boot the server up and seeing as i have not been able to get it to boot the server i have not found if it will reboot after a crash. anyways though i would say something mabie there is a fix or something someone else wants to post that works?

im running windows xp sp3 just in case thats the issue.

im talking about the last post seems the one from the first guy has been taken down because he quit on it?

trevius 06-04-2008 07:51 AM

I could never get the one that Richardo wrote to work either. My world server would crash and the popup would come up about the crash, but it never restarted the world or seemed to do anything other than run in my system tray. So, I dunno.

nosfentora 06-04-2008 01:16 PM

I've updated a few things, the links above contain the updated versions - it should also kill hung zones (zone.exe that stays at 50% for more than 30 minutes)

spider661 - does your .bat file boot the server?
also - clicking 'start' from the file menu doesn't start the server, it starts the process monitoring. you'd need to click 'start server now' from the file menu first, then click start. i havent had time to put in a check to see if world.exe, eqlaunch.exe or zone.exe are running yet - so that clicking 'start' also starts the server if it's not running.

spider661 06-04-2008 08:34 PM

yes my bat file starts the server fine on its own but i did not start server first then hit start mabie that was the prob ill give it a try thanks

spider661 06-04-2008 08:39 PM

well it seems to be working now.. thanks.. another thing when it resets the server does it give an in game warning? and if not would it be hard to do that? maybe telnet to the server and broadcast server coming down half hour before and maybe 10 and 1 mins before?

nosfentora 06-05-2008 08:10 AM

When I get a chance I'll change the code so that clicking 'Start' also starts the server if it's stopped.

spider661 06-06-2008 04:51 AM

nosfentora sorry to bug you but you never answered my last question i figer you may have missed it sense it was on a new page of the topic.. could you read up a post above your last and let me know what you think maybe?

nosfentora 06-06-2008 08:14 AM

At present it doesn't broadcast. I'm looking into how to get that done and have it broadcast 2 or three times, like you said, before the server will reboot.

nosfentora 06-06-2008 10:59 AM

Ok. I've added code that should start the server when you click 'start' if the server is stopped (if it doesn't find world.exe running.)
clicking 'stop' will not stop the server, but will stop my program only.
to stop the server, you need to click 'stop server now'

i've also added code to broadcast a message at 30, 15, 5 and 1 minute before reboot. the broadcast msg can be customized but will always end in 'X minutes' where X is the timer remaining.

Links: source and win32 binaries

spider661 06-11-2008 02:16 PM

great program found a problem though.. the test telnet worked just fine. but when it whent to broadcast for the real shutdown i got an error.. this this is what it says.

Code:

Error brodcasting: system.invalidoperationexception: sendkeys cannot run inside this application becuase the applacation in not handling windows messages.
Either change the applicacation to handle messages, or use sendkeys.sendwait method.
at system.windows.forms.sendkeys.send(string keys, Control control, boolean wait)
at system.windows.forms.sendkeys.send(string keys)
at eqemutools.eqemutools.brodcast(string delay)

also in case it matters. i set the restart time to 0.15 so i could see how it works kinda a test. i don't know if that would have caused it or not but figured i would let you know.

nosfentora 06-12-2008 08:26 AM

Yea I've been getting that too - and i'm trying to figure out what i missed.

putting in .15 will just make it restart in 9 minutes (60*.15), it'll accept any numerical value - though i'm not sure what would happen with a negative value.

nosfentora 06-12-2008 08:34 AM

OK, updated the code - it shouldn't hang at that point anymore.
i also included a debugging line so that if it does, it should tell you at what point it's having problems.

Links: source and win32 binaries

spider661 06-12-2008 09:51 AM

its working great now.. i did notice one problem it brodcast the same message 2 times and the 1 min broadcast is saying it 2 times also once at 1 min then again right before it shuts down.. it did it for 5 mins also.

not a big deal it works great but figured you may wish to know.

John Adams 06-12-2008 09:57 AM

I cannot seem to d/l from your links. Mind if I mirror them from my site when I do get them? Unless they are changing rapidly, we could mirror when you are done.

nosfentora 06-12-2008 03:16 PM

Spider,
Yea I noticed that too - and I think I know why - i'm actualy surprised it's not broadcasting 3 times tbh.

I'll work on playing with that and get it to broadcast only once.

I guess it could be seen as a 'feature' in that if you're in the midst of battle-spam you may not see the 1st one! =)

John,
the links aren't changing. they're from my server, I just keep posting them so folks don't have to go hunting through the threads - but you're welcome to mirror them. Let me know if you're still having problems.

John Adams 06-12-2008 03:37 PM

I got them that time, thanks! I'll throw a link to them in my d/l section and try and keep them updated with your releases.

nosfentora 06-12-2008 03:38 PM

Sounds good. The link should always be the same - so that should make it easier for you too!

spider661 06-13-2008 01:13 AM

noticed a problem i had a zone crash today and when i looked the box was up saying zone.exe crashed it was my static zone it reloaded as dynamic but still it did not kill the crash message or restart the zone i only had 20 out of 21 loaded.

i don't know if its something with the static zones or if its a bug though i have not had time to even look at the code.

anyways thought i would let you know.

note when i told it don't send to the error message it reopened the static zone. alone with the dynamic of the same name because someone was in the zone when it restarted.. but im pretty sure that was eqemu rebooting the crashed zone after i closed the error message.

Aramid 06-13-2008 05:20 AM

Quote:

Originally Posted by spider661 (Post 150535)
noticed a problem i had a zone crash today and when i looked the box was up saying zone.exe crashed it was my static zone it reloaded as dynamic but still it did not kill the crash message or restart the zone i only had 20 out of 21 loaded.

This is a known problem in eqemu. Any crashed Static Zone will reboot as dynamic on the next highest port number that has not been used yet. Was told that it would take some major work to correct this problem.

nosfentora 06-13-2008 08:23 AM

Yea i've seen that too even before I started this proggy, so I'm sure Aramid's right. Sometimes I look at the status page and there are say 29 out of 33 zones running. clicking on '29 zones booted' and it shows 33 zones up. still haven't figured that one out yet. =)


When you say it didn't kill the crash message - are you talking about the popup error message box that windows shows?
If so, next time you see one, look at task manager and see if you see a process 'DW20.exe', or 'VSJITDEBUGGER.EXE'. Let me know which one you find, and also what buttons are on the popup window - ie SEND, DON'T SEND, etc etc (and which - if any) letters are underlined. I'll need that info to adjust my code to make sure it clicks on the appropriate button.

spider661 06-13-2008 10:52 AM

ok to see the error yourself make a static zone with a npc that sends you to poair.

if you changed the zone table for that zone set flag_needed to 1
then send to this loc
Code:

#A conversation to Teleport Player to a new zone (poair)
sub EVENT_SAY
{
if ($text =~/Hail/i)
 {
quest::say ("Hello $name. if you would like to travel to {PoA] let me know and I will take you there.");
 }
if ($text =~/^poa$/i)
 {
quest::say ("Off you go!");
quest::movepc(215, 532.0,884.0,-92.6);
 }
 }

this will crash the zone when talking to the npc with a lvl 1 char.

here is the answer to your question.

i see dwwin.exe not sure if thats it but i don't see either of the other 2 and if I end task it closes the pop up. and it has (send error report) and (don't send) none are underlined.

the error box is titles zone.exe and says zone.exe has encountered a problem and needs to close.

John Adams 06-13-2008 12:35 PM

In short, I do not believe "flag_needed" is working properly, or it is so poorly documented that people try 1's and 0's instead of plain text (PoAFlag for instance) and once you use the #flags command or quest script to add the flag to the players, zoning in crashes the zone.

This has been my experience while trying to create flagged custom content. Search the source, you can see what values it's expecting.

spider661 06-13-2008 12:50 PM

Quote:

Originally Posted by John Adams (Post 150560)
In short, I do not believe "flag_needed" is working properly, or it is so poorly documented that people try 1's and 0's instead of plain text (PoAFlag for instance) and once you use the #flags command or quest script to add the flag to the players, zoning in crashes the zone.

This has been my experience while trying to create flagged custom content. Search the source, you can see what values it's expecting.

ya i understand that i think it should be 1's or 0's though thats how its set from the peq database. poair is set to 1 on the flag_needed section.. i changed it to not need any flags but before i did i noticed it was crashing the zone so i used that as an example to show the error i was getting with the crash.. its only an example i don't care about he flags really :P

but anyways thats how you force a crash.

nosfentora 06-13-2008 01:27 PM

I'll look into it and see what i can come up with.
dw20.exe should be the app you're looking for in task manager.

i'm not sure what dwwin.exe is - unless that's drwatson, but i thought that was drwatson.exe

spider661 06-13-2008 02:18 PM

confirmed dwwin.exe is the error message possess.

the possess information

it is related to Dr Watson which is used by the error reporting tool

when i end the prossess the popup goes away and the static zone goes down and reloads as a dynamic.

nosfentora 06-13-2008 02:21 PM

hmmm ... interesting.
i'll have to add that to the code then.

and you're sure that the 'send' and 'don't send' buttons do NOT have any letters underlined (like shortcut keys? ie the File menu usually has F underlined)

nosfentora 06-13-2008 02:29 PM

Ok, i've added dwwin to the code and checking for 'Close' and 'Don't Send' buttons without underlines (shortcut)

Links: source and win32 binaries

let me know how it works.

spider661 06-13-2008 06:52 PM

actually its (send error report) and (don't send) buttons and yes im sure there are no underlines under them.. ill give it a try.

spider661 06-13-2008 07:02 PM

yep it took a few secs but it closed the error message and my static zone is still running i did not noticed if it opened a new one or not the window was up the whole time but the site says all the zones are loaded. it did open my server folder but i think that is part of the server restart zone code.. not sure but it seems to be working ill let you know if i find more problems

nosfentora 06-14-2008 01:39 PM

Cool. It's the 'Don't Send', 'OK','Close' buttons that i'm working with.


All times are GMT -4. The time now is 09:01 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.