The server turns itself off

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,483
Reaction score
207
Location
Chile
pretty weird , i ran out of ideas.. hopefully someone else would help you
 

Perun

GET SHIT DONE
Premium User
Joined
May 1, 2009
Messages
256
Reaction score
78
And are you pointing me where this log is located? because at /var/ log / I do not have the log you wrote me
Man.. as i said on pm, show us console screen, what you see after that crash/shutdown. When engine going offline or crash happen linux screen still is online, so just enter putty, type 'screen -r' and show what you see there. Segmentation fault = crash, Shutdown done - shutdown. Is it really that hard to enter screen and look last engine console message?
 

Erexo

Kage
Joined
Mar 27, 2010
Messages
708
Reaction score
124
Location
Pr0land
launch your server with such command
ulimit -c unlimited && screen -LS srv ./server_binary

then after crash do gdb server_binary core preferably followed by bt and show us the results.
Additionally you can attach the screenlog.0 file that will be generated afterwards.
 
Last edited:
OP
D

Dorianek

Member
Joined
Nov 29, 2018
Messages
203
Reaction score
4
Location
Poland
someone will explain to me how to enter correctly

gdb server_binary core or bt ? an example?
 

Perun

GET SHIT DONE
Premium User
Joined
May 1, 2009
Messages
256
Reaction score
78
someone will explain to me how to enter correctly

gdb server_binary core or bt ? an example?
yy? You closed screen as you can see on your own ss.
backtrace is gdb function, so you call this after enter gdb.
 
OP
D

Dorianek

Member
Joined
Nov 29, 2018
Messages
203
Reaction score
4
Location
Poland
Log
ScreenLog.0

Otservlist.org
Last online server : June 19, 2019, 5:54 am CET

Saved house items in: 0.375 s
Saving server...
Saved house items in: 0.299 s
Shutting down...Saving server...
Saved house items in: 0.358 s
done!

Autosave

C++:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false


local function serverSave()
    if shutdownAtServerSave then
        Game.setGameState(GAME_STATE_SHUTDOWN)
    else
        Game.setGameState(GAME_STATE_CLOSED)

        if cleanMapAtServerSave then
            cleanMap()
        end

        Game.setGameState(GAME_STATE_NORMAL)
    end
end

local function secondServerSaveWarning()
    broadcastMessage("Server is saving game in one minute.", MESSAGE_STATUS_WARNING)
    addEvent(serverSave, 60000)
end

local function firstServerSaveWarning()
    broadcastMessage("Server is saving game in 3 minutes.", MESSAGE_STATUS_WARNING)
    addEvent(secondServerSaveWarning, 120000)
end


function onThink(interval, lastExecution)

    broadcastMessage("Server is saving game in 5 minutes.", MESSAGE_STATUS_WARNING)
    Game.setGameState(GAME_STATE_STARTUP)
    addEvent(firstServerSaveWarning, 120000)
    return not shutdownAtServerSave
end
 
Last edited:
Top