[mythtv] writeStringList: Error, called with unconnected socket.

Andrew Meredith andrew at anvil.org
Sat Jan 6 11:09:46 UTC 2007


Hi Folks,

I have had develop some quite extensive self healing scripts for my 
mythtv setup. They are based on the presence of the mythbackend process 
and the visibility of the recorders through the mythbackend services. I 
have a master server on the machine with the mysql server that has no 
recorders and two slave backends with 3 DVB-T and 1 PVR350 respectively.

Recently the self healing scripts have failed to work around a new 
effect. The master and slaves seem to fall out with each other and 
refuse to retry their connections.

Previously if the slave lost the master server it would aggressively 
retry until it came back. Now there seems to be a mode where this does 
not happen.

I have included some log snippets from the master and one of the slaves 
to illustrate.


Master:

2007-01-06 03:41:54.075 adding: coliseum.ch.anvil.org as a slave backend 
server
2007-01-06 03:41:58.239 mythbackend: Running housekeeping thread
2007-01-06 03:41:59.058 AutoExpire: Found 0 recorders w/max rate of 0 
MiB/min
2007-01-06 03:41:59.068 AutoExpire: Required Free Space: 1.0 GB w/freq: 
10 min
2007-01-06 03:42:28.004 Slave backend: coliseum.ch.anvil.org no longer 
connected
2007-01-06 03:42:28.006 New DB connection, total: 4
2007-01-06 03:42:30.474 New DB connection, total: 5
2007-01-06 03:42:30.504 Connected to database 'mythconverg' at host: chaven
2007-01-06 03:42:27.450 Scheduled 1269 items in 35.7 = 1.88 match + 
33.84 place
2007-01-06 03:42:30.504 MythSocket(9edc6c8:-1): writeStringList: Error, 
socket went unconnected.

Slave:

2007-01-06 03:41:53.505 Connecting to master server: 10.103.15.1:6543
2007-01-06 03:41:54.054 Connected successfully
2007-01-06 03:42:24.086 MythSocket(95519b8:33): readStringList: Error, 
timeout.
2007-01-06 03:42:30.626 AutoExpire: Found 3 recorders w/max rate of 416 
MiB/min
2007-01-06 03:42:31.650 AutoExpire: Required Free Space: 4.3 GB w/freq: 
5 min
2007-01-06 03:43:29.664 EITScanner: Added 63 EIT Events
2007-01-06 03:43:30.138 MythSocket(95519b8:-1): writeStringList: Error, 
called with unconnected socket.



The master then just wanders on without the slave and does nothing out 
of the ordinary. It gets killed every few minutes by the self healers, 
but then fires up again and continues unabashed. The self healing 
scripts cannot see the recorders through the master backend http ports, 
so they are killing it in case of another failure mode.

The slaves however exhibit the symptom shown in the subject line. Every 
3 to 6 minutes they log:

MythSocket(95519b8:-1): writeStringList: Error, called with unconnected 
socket.

As an idea of the interval, the log entries following the sequence shown 
above is:

2007-01-06 03:46:02.932
2007-01-06 03:51:08.492
2007-01-06 03:56:32.654
2007-01-06 04:01:27.230
2007-01-06 04:07:01.767
2007-01-06 04:12:50.110
2007-01-06 04:17:30.477

and so on until I manually killed the slave server earlier on this morning.

I am assuming that this is the master/slave mythbackend connection and 
that it has somehow gone stale on the slave end, but has not been 
cleaned off. The master end is long since dead as by the time the sun 
rises the master has been executed by the self healing scripts a couple 
of dozen times.

In this mode the slaves do not record anything as they have no 
connection to the master and the frontends cannot play anything that 
resides on the slaves that are in this condition.

Would it not be sensible to either kill and restart the socket or kill 
the entire backend in this mode.

Thanks for your help.

Andy M

PS Here's the versions and such:

Master and Slaves are all but clones of each other in terms of hardware 
(AMD 32 bit 1.5->2GHz, 512M RAM), OS (Fedora 5 with atrpms, patched up 
to date) and MythTV

mythtv-theme-purplegalaxy-0.20031214-4.at
mythdvd-0.20-149.fc5.at
mythtv-theme-ProjectGrayhem-1.7-2.at
mythtv-0.20-149.fc5.at
libmyth-devel-0.20-149.fc5.at
mythmkmovie-1.1.4-5.fc5.at
myththemes-0.20-110.at
mythmusic-0.20-149.fc5.at
mythweather-0.20-149.fc5.at
mythgame-0.20-149.fc5.at
mythphone-0.20-149.fc5.at
mythbrowser-0.20-149.fc5.at
mythtv-suite-0.20-149.fc5.at
mythtv-theme-photo-4-7.at
mythtv-setup-0.20-149.fc5.at
mythflix-0.20-149.fc5.at
mythvideo-0.20-149.fc5.at
mythtv-theme-visor-0.16.2-6.at
mythtv-frontend-0.20-149.fc5.at
mythnews-0.20-149.fc5.at
mythplugins-debuginfo-0.20-0.10599.svn
mythtv-theme-MediaCenter-0.17-5.at
mythweb-0.20-149.fc5.at
mythgallery-0.20-149.fc5.at
mythplugins-0.20-149.fc5.at
mythcontrols-0.20-149.fc5.at
mythtv-debuginfo-0.20-0.11013.svn
mytharchive-0.20-149.fc5.at
mythtv-theme-abstract-0.20040910-3.at
libmyth-0.20-149.fc5.at
mythtv-theme-sleek-0.35-3.at
mythtv-themes-0.20-149.fc5.at
mythtv-backend-0.20-149.fc5.at



-- 
____________________________________________________________

          Andrew Meredith BEng CEng CITP MBCS MIET
                 The Anvil Organisation Ltd
                          Director
____________________________________________________________



More information about the mythtv-dev mailing list