Sometimes my prosody instance restarts, and there is nothing interesting in even the debug log to say why, for example here is the most recent one:
Jun 10 13:40:07 stanzarouter debug Unhandled s2sin stanza: presence; xmlns=jabber:client
Jun 10 13:40:07 s2sout5559c9f4dc90 debug Sending[s2sout]: <presence from='...' type='error' id='9e38cd7f-3d4e-4306-a8e2-678e0476f0cd' to='...'>
Jun 10 13:40:08 s2sin5559bdbf64d0 debug Received[s2sin]: <presence id='d191a707-8664-4079-b488-7b7099c83500' from='...' xml:lang='en' to='...'>
Jun 10 13:40:08 stanzarouter debug Unhandled s2sin stanza: presence; xmlns=jabber:client
Jun 10 13:40:08 s2sout5559c9f4dc90 debug Sending[s2sout]: <presence from='...' type='error' id='d191a707-8664-4079-b488-7b7099c83500' to='...'>
Jun 10 13:40:09 c2s5559babe09a0 debug Received[c2s]: <iq from='...' type='get' id='c2s1' to='...'>
Jun 10 13:40:09 c2s5559babe09a0 debug Sending[c2s]: <iq from='...' type='result' id='c2s1' to='...'>
Jun 10 13:40:09 s2sin5559bdbf64d0 debug Received[s2sin]: <presence id='b16c1d21-6a36-4ba9-8368-586177c65da3' from='...' xml:lang='en' to='...'>
Jun 10 13:40:09 stanzarouter debug Unhandled s2sin stanza: presence; xmlns=jabber:client
Jun 10 13:40:09 s2sout5559c9f4dc90 debug Sending[s2sout]: <presence from='...' type='error' id='b16c1d21-6a36-4ba9-8368-586177c65da3' to='...'>
Jun 10 13:40:11 startup info Hello and welcome to Prosody version 0.11.
Now, of course, there is a small chance that something on the system may have sent SIGTERM or similar instead of this being caused by a crash, but in that case I would expect to find a log line saying "Shutting down..." or similar.
# Version information
# Prosody directories
Data directory: /var/lib/prosody
Config directory: /etc/prosody
Source directory: /usr/lib/prosody
/usr/local/lib/prosody/modules/ - prosody-modules rev: e3964f876b5d
# Lua environment
Lua version: Lua 5.2
Lua module search paths:
Lua C module search paths:
LuaRocks: Not installed
Backend: libevent epoll
# Lua module versions
lfs: LuaFileSystem 1.6.3
lxp: LuaExpat 1.3.0
socket: LuaSocket 3.0-rc1
Hello. I'm confused as to what this issue is about.
Prosody already logs a number of messages about shutting down if it's done normally, so the log snippet looks either like a crash followed by an automatic restart, or another instance being started and writing to the same log file.
If it crashed, there should be a hint of this in the system or kernel logs, so look there.
Stephen Paul Weber
wouldn't I expect to see a backtrace if it crashed?
No, backtraces on crashes are very rare. An error severe enough to cause a crash would not leave any room for writing to the log file. If this happens in Lua land, there may be a traceback printed on standard output, which isn't the log file, but this is very rare. Most Lua errors are handled and logged, and then Prosody keeps going, which means it does *not* crash. Errors in C land on the other hand may result in a segmentation fault, which means the process dies, leaving no room for preparing a traceback or even logging anything. That may however produce a core dump, from which a stack trace could be extracted. It definitely should be logged in the system or kernel log however, so, again, look there.