( search forums )
Deleted Topic
Soldat Forums - -
Deleted User
November 30, 1999, 12:00 am

FliesLikeABrick
September 18, 2004, 10:44 pm
you guys are all morons...

you see the word hack, the double post, and the low post count and immediately disqualify him as a legit forum user, even though he has provided something useful. But oh wait, none of you know what it means or even does, so it must not matter.

Alamo
September 19, 2004, 12:20 am
I was so serious about this. ...
So would someone plz explain to us non-scripters what this is all about so we can praise him for his hack?

palloco
September 19, 2004, 9:18 am
Dude, I wonder why people had posted stupid stuff here, if you thought it was a flag report the post but not stupid things.

Script? It is a program, and he said that it makes logs, cant you read?
It seems to report the reasons why a server may have crashed and kill the proccesses still alive and restart the server.

LazehBoi
September 19, 2004, 10:04 am
Mm, don't understand, but palloco gave me a dist of it, sounds nice.

Edit: Hahah, i'm great, I actually read the whole post before accusing of hacks ;D

Tank
September 19, 2004, 2:02 pm
What a warm reception...

The perl script combined with the bash script is a solution to the linux server stability. It restarts the server whenever it crashes. People have spoken about such a script before but never implmented it, heres a reliable implementation.

Further more I believe I can code a solution for the lack of ASE query for linux and a live log parser with automated interaction. I can think of all sorts of mods for automated interaction based on server output.

All the above perl script does is interact with the Admin port on soldat server, if its responding correctly leaves it alone, if not kills the process (like it really should have died anyway) so that the server restarts.

Anyone know if the soldat-admin program is open source by any chance ? I'd really love to know how the format of the reply to the REFRESH command.

Mole_Incarnate
September 19, 2004, 2:12 pm
You people aught to be ashamed, here tank is, posting a solution to the linux instability, and because the word hack is in his post, you assume its a cheat!

Seriously...

If you want examples of this in action, well, sorta, go check out the iinet servers where good ol tank here made this :P.

Denacke
September 19, 2004, 3:29 pm
Tank <3

That's great! I sugested it to selfkill server admin :).

b00stA
September 19, 2004, 4:52 pm
quote:Originally, a hack meant a quick fix to a computer program problem, as in "That hack you made last night to the editor is working well".
(wikipedia.org -> hack)

n00bface
September 20, 2004, 1:57 am
Very useful script...was trying to make something similar to this, but I lack the required skill :o). I hope no one has a problem with me stickifying this? :S

edit:

Spam deleted (my first session! woo!)

quote:I was so serious about this. ...
So would someone plz explain to us non-scripters what this is all about so we can praise him for his hack?

It is basically what palloco said. It's a perl script that you run on a linux machine that checks the socket for any linux "crash" messages then kills the pid and restarts a the soldatserver.

another edit: oops, posted that before I saw that tank had already replied :P Anyways, I look forward to more of your scripts, this one is great..

btw, I tried this script and the the script didn't actually send the password right (I was all excited about it thinking you found a way :()...I never managed to write to the socket right either...but either way, it will still read from the socket because of a bug :| Maybe Michal would be so kind as to enlighten us with all the socket commands.

Dj-SAGI
September 20, 2004, 12:11 pm
tnx alot about teh scrpit nuubs ;]

Lemon
September 20, 2004, 1:44 pm
er....
sorry, i'm a newbie
Can you teach me how to run your script?

save the BIG script as a file(e.g. abc)
and then?
....

BIG THX

Lemon
September 22, 2004, 6:50 pm
anyone can teach me?

Lemon
September 24, 2004, 1:29 pm
er...

where should i run the script?
php website?
or just run it in server?

n00bface
September 24, 2004, 2:14 pm
Please use the edit function in the future rather than triple posting :|

Tank already answered your question in his second post..

quote:O btw this is used in conjunction with a script like this that starts soldat:
---
#!/bin/sh

while true; do
cd /home/games/soldat
./soldatserver
sleep 10
done


Balrog
September 26, 2004, 12:14 am
It seems unuseful until it can write the password to the server, because if it doesn't write the password it kills the server :(

Any idea?

The error is in

print $sock "$adminpassword\r\n";

n00bface
September 26, 2004, 8:34 am
It doesn't kill the server. As I said, there's a bug that allows you to connection without a password and still have it read from the socket.

Mole_Incarnate
September 26, 2004, 9:26 am
Im sure tank wont mind me posting this -

Hes working on a nice compiled version, that will be easier to implement then just this straight script, it will also no longer screw up trying to use admin tool, as it will only log in-out when it absolutly needs to, no more booting you. Soooo. Yeh.

One other thing, I didnt put this on iiNet servers, Tank did, he's the main admin type guy with server access at iinet, along with wob, im just a lowly admin :).

Balrog
September 26, 2004, 10:51 am
quote:Originally posted by n00bface
It doesn't kill the server. As I said, there's a bug that allows you to connection without a password and still have it read from the socket.


The problem is that it kills the server, but it kills it everytime it checks if the server is online, because it can't send the password correctly and it thinks the server is down. I have implemented one line so the script can open the server

system("/********/soldatserver &");

and it only opens and kills the server everytime. We wait impatiently for Tank's fix [8)]

Balrog
October 3, 2004, 9:04 pm
Noone knows how to send the password correctly for the program don't be opening and closing the soldat server everytime?? This is important... I think with this program running correctly there will be more servers because they will be up 24 hours without admins having to watch to the server everytime... I will have 2 or 3 servers up since the program run correctly, but I can't put them up until the program can check them because I have another server, much more important than the soldat servers I will have up, and I need to spend my time in the other server... Thank you very much.

arcatan
October 6, 2004, 9:29 am
quote:Originally posted by n00bface
btw, I tried this script and the the script didn't actually send the password right (I was all excited about it thinking you found a way :()...


Umm.. I haven't tested the script so I don't know if this bug is still there, but what is so hard in sending the password right way? I just made a PHP script to poll the status of server, and I had no problems with sending password, and I'm able to shutdown or do REFRESH query. The REFRESH reply is surely cryptic, I would love to know how to decrypt it.

Balrog
October 9, 2004, 11:00 pm
It kills soldat without the server being failing. The server usually is 10-15 minutes online and then it kills the server and restart it. This is a problem because people must log in again and they are playing always in the same map :(

Debian woody 2.4

Any fix?

Tank
October 18, 2004, 6:05 pm
This may sound strange, but my script works perfectly for myself when I enabled ASE_Register, it says sorry thats disabled in this version but when it crashes it crashes much cleaner for recovering from. Thats really a flaw because it shouldnt matter how it crashes my perl should be independant, but as a temporary its definately worth try.

Dj-SAGI
October 23, 2004, 12:11 pm
i am going to test in on my servers now...
btw when will be scrpit for teh ase that we can linux servers in ASE ?

Dj-SAGI
October 23, 2004, 12:25 pm
perl soldatmonitor.pl
Can't locate Expect.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at soldatmonitor.pl line 4.
BEGIN failed--compilation aborted at soldatmonitor.pl line 4


oki my friend try to run this scrpit but no ida that what he told me to say
"i have no idea tell them its the eror you get"
some one can hlp us what next?

Tank
October 27, 2004, 7:03 pm
SAGI:
To fix the error your friend gets try the new 1.0 binary version, it doesnt require the perl modules and will save you installing them, otherwise the modules are listed on the webpage I just slapped together.

In regards to the ASE first step is making the server respond to ASE type game queries so that you can add it to your favourites in ASE.
Once i have the above working I can try adding in master update support so that ASE lists it when you search for soldat servers.
I should be able to get the first part working within the next 1 - 2 weeks thanks to most of the work being already done by the qstat(http://www.qstat.org) guys.

Feedback on 1.0 is appreciated.

cooz
October 28, 2004, 7:06 pm
omg, working ase in dedi servers, it would be genious, go man go, u're the best!

STEELIX
October 30, 2004, 5:50 pm
I'm confused, is this program serious, or like I understood from flieslikeabrick in his post it doesnt work?

DeafBox
October 31, 2004, 2:11 am
Tank, gw with the program!!!! I love ASE so much more than the lobby, seriously good work

*hugs Tanks*

Unfortunately the soivas are on the other side of this island.... and sky still hasnt passworded one of the servers.. but still, gw mate (Y)

Tank
October 31, 2004, 7:29 am
STEELIX: Yes this really works, check it out, all the iiNet servers now appear in the ASE master list even though there all linux dedicated machines. It restarts soldat properly when it crashes and creates a more secure admin port for multiple admins.

The posts on the first page are from versions .1 and .2 which weren't great. 0.3+ handled soldat crashes pretty well. 1.0+ added the secure admin port and 1.1+ adds ASE support

STEELIX
October 31, 2004, 8:30 am
kk, cheers. I've been trying to host a linux server for a while ya see, so I think I might use this :)

Optik
November 24, 2004, 3:36 pm
dunno i saw people posting about not sending admin pass etc... maybe that was fixed dunno but it still crashes (restarts) more than soldat is supposed to i can keep soldat running for up to a week without any big problems that would require a restart and most with this monitor i'v egotten was like 2 hours with like 4 people playing max then get weird errors that probably wouldn't even crash soldat but dunno here's a few ex.

[Wed Nov 24 07:34:56 2004] Exception raised while sending
[Wed Nov 24 07:34:56 2004] Registering server @ lobby.soldat.pl
[Wed Nov 24 07:35:22 2004] Admin disconnected.
[Wed Nov 24 07:35:22 2004] Admin connected.
[Wed Nov 24 07:35:46 2004] Admin disconnected.
[Wed Nov 24 07:35:46 2004] Admin connected.
[Wed Nov 24 07:35:46 2004] Runtime error 231 at 08058B11
[Wed Nov 24 07:35:46 2004] Soldat process exiting.
23892 EXIT: Soldat server exited
[Wed Nov 24 07:35:47 2004] Process ID: 29507
[Wed Nov 24 07:35:47 2004] Soldat process exiting.

-----------------------------

[Wed Nov 24 07:35:54 2004] Registering server @ lobby.soldat.pl
[Wed Nov 24 07:35:55 2004] Game server added to lobby server @ 65.113.210.3
[Wed Nov 24 07:36:11 2004] Admin connected.
[Wed Nov 24 07:36:29 2004] Admin disconnected.
[Wed Nov 24 07:36:29 2004] Soldat process exiting.
23892 EXIT: Soldat server exited
[Wed Nov 24 07:36:30 2004] Process ID: 29522
[Wed Nov 24 07:36:30 2004] Soldat process exiting.

-----------------------------

[Wed Nov 24 04:25:41 2004] Linked gets a ping warning
[Wed Nov 24 04:25:56 2004] Admin disconnected.
[Wed Nov 24 04:25:56 2004] Admin connected.
[Wed Nov 24 04:25:56 2004] Runtime error 231 at 08058B11
[Wed Nov 24 04:25:56 2004] Soldat process exiting.
23892 EXIT: Soldat server exited
[Wed Nov 24 04:26:12 2004] Process ID: 27589


-----------------------------

i don't know what err 231 is but it seems to be dominant probably admin just can't connect or a stall for few sec and blocks it so it restarts it dunno but there's lots more these are just recent...

also one thing to be implemented would be good on a restart etc.. make some delay before you restart it because to restart the server it takes soldatmonitor like 3-4 times to start up soldatserver now because can't bind socket and crap like that so that would be a good idea but fixing it first also would be good heh
btw running rh9,512mb ram,2.4ghz box loads are very low

there goes one more after like 4 hours

[Wed Nov 24 10:06:32 2004] Admin disconnected.
[Wed Nov 24 10:06:33 2004] Admin connected.
[Wed Nov 24 10:06:33 2004] Runtime error 0 at BEFFFA98
[Wed Nov 24 10:06:33 2004] Runtime error 231 at B8058B11
23892 EXIT: Soldat server exited
[Wed Nov 24 10:06:33 2004] Soldat process exiting.
[Wed Nov 24 10:06:38 2004] Failed to connect to 127.0.0.1 on Port 64000
[Wed Nov 24 10:06:56 2004] Process ID: 31924

Import Killer
December 6, 2004, 5:46 am
Can anyone please give me a clear understanding of how u run this program? do i ytpe /soldatmonitor into my server after it says the game has registered? can someone please write like a soldatmonitor for dummies instructions here on how to start it?
Thanks

Phalanx
January 31, 2005, 12:33 am
quote:Originally posted by BalrogIt kills soldat without the server being failing. The server usually is 10-15 minutes online and then it kills the server and restart it. This is a problem because people must log in again and they are playing always in the same map :(

Debian woody 2.4

Any fix?


I have this exact problem also, running Debian woody 2.4.xx kernel, using the perl version.

Is there any fix or suggestion for this?

TIA

n00bface
March 6, 2005, 2:47 am
Just got this lovely message while I was playing (I'm using the perl script that vostok made minor changes to, but I think this is most likely something the original doesn't catch)

quote:[Sat Mar 5 22:39:26 2005] Exception EAccessViolation in module soldatserver at 08058B3D.
[Sat Mar 5 22:39:26 2005] Access violation at address 0804CF2A, accessing address FF5151D7.

Vostok 4
March 6, 2005, 3:26 am
Just FYI, people might not bother checking my other thread, I have created a fix to soldatmonitor.pl restarting the script unnecessarily, you can get the new script here, full credit goes to Tank.

[url]http://vostok4.info/soldat/files/soldatmonitor1.24.tar.gz

n00bface, I've never had any sort of access violation on my box at all... is this the first time it happened? If it happens a lot you can code soldatmonitor to just restart when it gets that message in the console, wouldn't be a problem. Maybe tell Michal about this since it looks like a specific soldat binary error, and not the script.

n00bface
March 6, 2005, 4:30 am
Yeah I already recoded it to do that..It's happened twice now. I was just adding it here so it could be fixed in case anyone else might be having this problem. Also, thanks for the revised script, Vostok.

Tank
March 18, 2005, 9:04 pm
quote:Originally posted by n00bfaceJust got this lovely message while I was playing (I'm using the perl script that vostok made minor changes to, but I think this is most likely something the original doesn't catch)

quote:[Sat Mar 5 22:39:26 2005] Exception EAccessViolation in module soldatserver at 08058B3D.
[Sat Mar 5 22:39:26 2005] Access violation at address 0804CF2A, accessing address FF5151D7.



Thats the most common error. You can cause it via a single ctrl-c and yes even beta 1 picked that one up :)

If anyone else is still having troubles, I'd suggest taking MM's advice and disabling logging and make sure your running 2.2.6 and soldatmonitor-1.2

Deleted User
March 18, 2005, 10:33 pm
Question about the "insecure" admin port. Is it insecure in the sense that it allows in-game hacks, or is there a more serious exploit? I've been running a soldat server on my linux hardware for a few days without the admin port blocked by the firewall; should I be concerned? Anyplace I can look for more info?

Thanks.

FliesLikeABrick
March 19, 2005, 12:06 am
the "admin port" is the standard game port, so you cant block it without blocking players from your server.

The exploit that people are talking about is one that allows people to "login" without a password by telnetting to your server. This is fixed and 100% secure in 2.2.6 If you are running an older version, it is strongly suggest that you update ASAP

Deleted User
March 19, 2005, 12:17 am
OK, glad to hear that it's fixed. I'm still confused about the exploit though -- were people able to get OS shell access without a password or just access to the game as an admin?

Also, you can block admin port without affecting the standard game port since admin is TCP and game is UDP.

FliesLikeABrick
March 19, 2005, 2:25 am
ah didnt think about the TCP/UDP thing, good call

the admin hole allowed someone to simply telnet and get control over the soldat server, not full OS shell access

Iceman
April 4, 2005, 3:43 pm
what exactly is this?

makes it 2.2.8 publicserver stable at linux? (password servers usually dont crash so fast)

n00bface
April 4, 2005, 8:45 pm
No, the server is still very unstable, this just restarts the server when it crashes.

Deleted User
May 1, 2005, 1:27 pm
Well this link is dead now, plz somone post up this thing so i can dl.

Mole_Incarnate
May 2, 2005, 1:41 pm
The iinet games website recently got revamped and I guess this got killed in the process, ill get tank to put it back up.

Edit: Its back.

http://games.ii.net/dev/soldatmonitor.cgi

KeFear
June 19, 2005, 7:23 pm
This is a cool script, i had no problem with it at all, nicely restarts my server when it is down. Like i want to restart it and i only have to send a shutdown message from admin and it will restart it. Nice job.

EDIT: Hmm.. i just experienced some problem.. it restarts the server all the time.. or maybe my server crashes too often or something...

Deleted User
August 9, 2005, 12:39 pm
eh well, every time I try to run this script through SSH using 'nohup ./soldatmonitor' it quits as soon as I quit the terminal, and './soldatmonitor >/dev/null &' doesnt work either, any solution?

*lol, old bumpage*

skc.r0adkill
November 12, 2005, 5:47 pm
please update the script for the new soldat version.
thx :)

Tank
November 18, 2005, 6:15 am
EnEsCe: the whole script is designed around terminal interaction using expect. I would have to rewrite it to make it suited for daemonizing and of course you would loose all terminal interaction features. I run our servers in screen.

skc.r0adkill: whats the problem, is it just version numbers or does it not work at all ?

Leo
November 18, 2005, 10:07 am
I would love love and love to have this feature for my servers :D