Forum archive
Fileserver Forensics - Services that Stop
This is a new thread born out of another one about webmin: failure to log on, after Jeremy Davis provided some useful help.
So I have Turnkey file server running on an ancient 386 PC, trying to be a music server. The only modifications I have made have been to add the services minimserver and bubbleupnpserver (oh, and java7 as a platform for the other 2). I am a Windows user (and previously CP/M, MS-DOS, PRIMOS, HP MPE etc.) and was able to carry out these installs just from the suppliers' instructions, and very little linux knowledge. These applications have been working for a couple of months with no issues.
But I have found that webmin periodically crashes and, more seriously, the samba functionality recently stopped and I was unable to access the music data from windows. This last problem is a potential deal breaker and inclines me to revert to windows for the server functionality.
I have created an alarm (in windows) which alerts me to the webmin failure by polling the URL where it should appear. I have yet to devise an alarm for the samba problem - maybe a windows batch file which looks for a file on the server on a regular basis. Ideas welcome.
So Turnkey was rebooted last night 21:30 and webmin crashed this morning at 09:01. The webmin and stunnel statuses looked like this after the reboot:
root@fileserver ~# service stunnel4 status
* stunnel4.service - LSB: Start or stop stunnel 4.x (SSL tunnel for network daemons)
Loaded: loaded (/etc/init.d/stunnel4)
Active: active (running) since Tue 2017-05-30 21:26:27 BST; 23min ago
Process: 554 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/stunnel4.service
`-667 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
May 30 21:37:06 fileserver stunnel[667]: LOG5[1554]: Service [webmin] connected remote server from 127.0...5697
May 30 21:37:06 fileserver stunnel[667]: LOG5[1557]: Service [webmin] accepted connection from 192.168.0...2099
May 30 21:37:06 fileserver stunnel[667]: LOG5[1557]: s_connect: connected 127.0.0.1:10000
May 30 21:37:06 fileserver stunnel[667]: LOG5[1557]: Service [webmin] connected remote server from 127.0...5700
May 30 21:37:06 fileserver stunnel[667]: LOG5[1557]: Connection closed: 0 byte(s) sent to SSL, 0 byte(s)...cket
May 30 21:37:06 fileserver stunnel[667]: LOG5[1559]: Service [webmin] accepted connection from 192.168.0...2100
May 30 21:37:06 fileserver stunnel[667]: LOG5[1559]: s_connect: connected 127.0.0.1:10000
May 30 21:37:06 fileserver stunnel[667]: LOG5[1559]: Service [webmin] connected remote server from 127.0...5701
May 30 21:37:06 fileserver stunnel[667]: LOG5[1554]: Connection closed: 34777 byte(s) sent to SSL, 753 b...cket
May 30 21:37:07 fileserver stunnel[667]: LOG5[1559]: Connection closed: 18996 byte(s) sent to SSL, 1877 ...cket
Hint: Some lines were ellipsized, use -l to show in full.
root@fileserver ~# service webmin status
* webmin.service - LSB: Webmin
Loaded: loaded (/etc/init.d/webmin)
Active: active (running) since Tue 2017-05-30 21:26:47 BST; 8min ago
Process: 546 ExecStart=/etc/init.d/webmin start (code=exited, status=0/SUCCESS )
CGroup: /system.slice/webmin.service
|- 951 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/min...
|-1349 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/min...
|-1362 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/min...
`-1363 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/min...
May 30 21:26:42 fileserver perl[553]: pam_unix(webmin:auth): authentication...ot
May 30 21:26:44 fileserver webmin[553]: Webmin starting
May 30 21:26:47 fileserver webmin[546]: Starting webmindone.
May 30 21:26:47 fileserver systemd[1]: Started LSB: Webmin.
Hint: Some lines were ellipsized, use -l to show in full
And the statuses after the crash:
root@fileserver ~# service stunnel4 status * stunnel4.service - LSB: Start or stop stunnel 4.x (SSL tunnel for network daemons) Loaded: loaded (/etc/init.d/stunnel4) Active: active (running) since Tue 2017-05-30 21:26:27 BST; 11h ago Process: 554 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=0/SUCCESS) CGroup: /system.slice/stunnel4.service `-667 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf May 31 09:16:07 fileserver stunnel[667]: LOG5[29675]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket May 31 09:16:12 fileserver stunnel[667]: LOG5[29676]: Service [webmin] accepted connection from 192.168.0.132:11865 May 31 09:16:12 fileserver stunnel[667]: LOG3[29676]: s_connect: connect 127.0.0.1:10000: Connection refused (111) May 31 09:16:12 fileserver stunnel[667]: LOG5[29676]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket May 31 09:16:28 fileserver stunnel[667]: LOG5[29694]: Service [webmin] accepted connection from 192.168.0.132:11879 May 31 09:16:28 fileserver stunnel[667]: LOG3[29694]: s_connect: connect 127.0.0.1:10000: Connection refused (111) May 31 09:16:28 fileserver stunnel[667]: LOG5[29694]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket May 31 09:16:33 fileserver stunnel[667]: LOG5[29695]: Service [webmin] accepted connection from 192.168.0.132:11883 May 31 09:16:33 fileserver stunnel[667]: LOG3[29695]: s_connect: connect 127.0.0.1:10000: Connection refused (111) May 31 09:16:33 fileserver stunnel[667]: LOG5[29695]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket root@fileserver ~# service webmin status * webmin.service - LSB: Webmin Loaded: loaded (/etc/init.d/webmin) Active: active (exited) since Tue 2017-05-30 21:26:47 BST; 11h ago Process: 546 ExecStart=/etc/init.d/webmin start (code=exited, status=0/SUCCESS) Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
I issued a journalctl command, as suggested by Jeremy, after the crash. This is an extract for the period when it happened for stunnel4:
May 31 08:59:37 fileserver stunnel[667]: LOG5[28466]: Service [webmin] accepted connection from 192.168.0.132:11013 May 31 08:59:37 fileserver stunnel[667]: LOG5[28466]: s_connect: connected 127.0.0.1:10000 May 31 08:59:37 fileserver stunnel[667]: LOG5[28466]: Service [webmin] connected remote server from 127.0.0.1:56361 May 31 08:59:38 fileserver stunnel[667]: LOG5[28466]: Connection closed: 6413 byte(s) sent to SSL, 210 byte(s) sent to socket May 31 08:59:55 fileserver stunnel[667]: LOG5[28475]: Service [webmin] accepted connection from 192.168.0.132:11016 May 31 08:59:55 fileserver stunnel[667]: LOG5[28475]: s_connect: connected 127.0.0.1:10000 May 31 08:59:55 fileserver stunnel[667]: LOG5[28475]: Service [webmin] connected remote server from 127.0.0.1:56393 May 31 08:59:55 fileserver stunnel[667]: LOG5[28475]: Connection closed: 6413 byte(s) sent to SSL, 210 byte(s) sent to socket May 31 09:00:11 fileserver stunnel[667]: LOG5[28483]: Service [webmin] accepted connection from 192.168.0.132:11017 May 31 09:00:11 fileserver stunnel[667]: LOG5[28483]: s_connect: connected 127.0.0.1:10000 May 31 09:00:11 fileserver stunnel[667]: LOG5[28483]: Service [webmin] connected remote server from 127.0.0.1:56419 May 31 09:00:11 fileserver stunnel[667]: LOG5[28483]: Connection closed: 6413 byte(s) sent to SSL, 210 byte(s) sent to socket May 31 09:00:27 fileserver stunnel[667]: LOG5[28632]: Service [webmin] accepted connection from 192.168.0.132:11022 May 31 09:00:27 fileserver stunnel[667]: LOG5[28632]: s_connect: connected 127.0.0.1:10000 May 31 09:00:27 fileserver stunnel[667]: LOG5[28632]: Service [webmin] connected remote server from 127.0.0.1:56447 May 31 09:00:27 fileserver stunnel[667]: LOG5[28632]: Connection closed: 6413 byte(s) sent to SSL, 210 byte(s) sent to socket May 31 09:00:42 fileserver stunnel[667]: LOG5[28933]: Service [webmin] accepted connection from 192.168.0.132:11026 May 31 09:00:42 fileserver stunnel[667]: LOG3[28933]: s_connect: connect 127.0.0.1:10000: Connection refused (111) May 31 09:00:42 fileserver stunnel[667]: LOG5[28933]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket May 31 09:00:47 fileserver stunnel[667]: LOG5[29336]: Service [webmin] accepted connection from 192.168.0.132:11027 May 31 09:00:47 fileserver stunnel[667]: LOG3[29336]: s_connect: connect 127.0.0.1:10000: Connection refused (111) May 31 09:00:47 fileserver stunnel[667]: LOG5[29336]: Connection reset: 0 byte(s) sent to SSL, 0 byte(s) sent to socket
You can see when it happened, but no clues for me. 192.168.0.132 is a Windows PC, which was polling the webmin URL every 15 secs. And the same command for webmin yielded very little information:
root@fileserver ~# journalctl -u webmin -- Logs begin at Wed 2017-05-31 03:14:24 BST, end at Wed 2017-05-31 10:41:36 BST. --
If I can get to the bottom of this, I might stand a chance of finding out what went wrong with samba. But at the moment I am struggling to find clues which might solve the problem for webmin. Any suggestions welcome. Am I being unreasonable in attempting to do this with some IT experience, but no linux experience? Happy to learn some useful bash/debian commands and principles (I already have done), but I am wondering where it will stop.
Marmite
Otherwise, how much RAM has this system got? You mention that you're running 2 java apps?! Java is a pretty RAM thirsty platform and your issues would be consistent with running out of RAM. I'm only guessing of course, but seems possible.
I know that you're probably trying to make do with old hardware, but seriously you could probably get a 7 or 8 year old 64 bit system and 4 GB+ RAM pretty cheap. It'd run Linux servers sweet and you'd probably save the cost of it in power in no time.