TenPlus1 wrote:Xanadu server runs on a script that does restart when server crashes or something happens... but... this STALL glitch does just that, it stalls server and makes it think everything is ok, but meanwhile no-one can do anything or sign on... I've given a solution for this on the github issue page so we'll see what can be fixed.
neozerosv wrote:Just as an idea, it would'nt be better for the script check minetest job runing and the server list in http://www.minetest.net/servers/ so it can restart minetest when its not listed?.
#!/bin/sh
ADDRESS="98.166.90.48"
SECONDS=1800
while true; do
sleep $SECONDS
LIST=`wget -qO- http://servers.minetest.net/list`
if [ "$?" = "0" ]; then
ENTRY=`echo "$LIST"|sed -e $'s:}:}\\\n:g'|grep "\"address\": \"$ADDRESS\""`
if [ "$ENTRY" = "" ]; then
echo "Server not found, killing it"
killall minetestserver
fi
else
echo "Unable to get server list"
fi
done
mystik wrote:You have to be careful with that --- sometimes the server list service does not respond correctly
mystik wrote:a better solution might be to (a) make a test connection to the server with an invalid account
mystik wrote:Killing the server violently like this can't possibly be good for the DB integrity.
#!/bin/sh
ADDRESS="98.166.90.48"
SECONDS=1800
while true; do
sleep $SECONDS
NOW="$(/bin/date +%Y)-$(/bin/date +%m)-$(/bin/date +%d) $(/bin/date +%H:%M:%S)"
LIST=`wget -qO- http://servers.minetest.net/list`
if [ "$?" = "0" ]; then
ENTRIES=`echo "$LIST"|sed -e $'s:}:}\\\n:g'`
V1=`echo "$ENTRIES"|head -n1|grep -E '{"total_max": {"servers": [0-9]+, "clients": [0-9]+}'`
V2=`echo "$ENTRIES"|tail -n2|grep -E '], "total": {"servers": [0-9]+, "clients": [0-9]+}'`
if [ "$V1" != "" -a "$V2" != "" ]; then
ENTRY=`echo "$ENTRIES"|grep "\"address\": \"$ADDRESS\""`
if [ "$ENTRY" = "" ]; then
echo "[$NOW] Server not found, killing it!!!"
killall minetestserver
else
echo "[$NOW] Server is okay"
fi
else
echo "[$NOW] Server list is corrupt!"
fi
else
echo "[$NOW] Unable to get server list!"
fi
done
minetestjosh wrote:I'm not sure if restarting scripts are the answer since the update happened there are certain areas that are affected. Anyone logging in in those areas will always make the server crash and unless they quickly type /spawn and log off it could result in a crashing loop. Just my theory, anyway. Like mystik said, you don't want to corrupt the DB either, Xanadu has had some serious building going on on all the paths, hundreds if not thousands of player hours spent making stuff.
minetestjosh wrote:I'm not sure if restarting scripts are the answer since the update happened there are certain areas that are affected. Anyone logging in in those areas will always make the server crash and unless they quickly type /spawn and log off it could result in a crashing loop.
afflatus wrote:A restart script is not the solution, it's a temporary workaround so we can all continue playing. Polling servers.minetest.net/list seems like taking a sledgehammer to a small moving target, I prefer amadin's idea of pinging the port directly, but it's a question of what works ultimately.
AFA restarts are concerned I run my own server via systemctl, so I would use systemctl restart, which I trust does the right thing. If minetest-server is running from a script you don't have much choice but to kill it. I don't know what the possibilities are of corrupting the db this way. That would be good to know.
mystik wrote:this is a workaround, not a fix.
amadin wrote:Tenplus1 why you not added script from Auouymous? You may write script wich will restart server every 3 hours (with "killall -9 minetestserver" or "killall -s KILL minetestserver") if you don't want use Auouymous's script.
Milan* wrote:just for interest: why no recording for youtube?
auouymous wrote:amadin wrote:Tenplus1 why you not added script from Auouymous? You may write script wich will restart server every 3 hours (with "killall -9 minetestserver" or "killall -s KILL minetestserver") if you don't want use Auouymous's script.
That is a VERY BAD idea. It would cause rollbacks and increase chances of data corruption.
Glorfindel wrote:Why should it cost more to be able to sell stuff?
If you don't like being able to get stuff cheaply I believe you are in the minority.
amadin wrote:Glorfindel wrote:Why should it cost more to be able to sell stuff?
If you don't like being able to get stuff cheaply I believe you are in the minority.
Because game is more interesting if player get most resources and things by himself.
Glorfindel wrote:amadin wrote:Glorfindel wrote:Why should it cost more to be able to sell stuff?
If you don't like being able to get stuff cheaply I believe you are in the minority.
Because game is more interesting if player get most resources and things by himself.
I see. Well, feel free to not use the shops :) but I prefer to be able to buy a stack or two for a build rather than spending hours collecting materials myself.
amadin wrote:Well, feel free to play on servers with creative mode :)
amadin wrote:Glorfindel wrote:Why should it cost more to be able to sell stuff?
If you don't like being able to get stuff cheaply I believe you are in the minority.
Because game is more interesting if player get most resources and things by himself.
Users browsing this forum: No registered users and 34 guests