PiRSquared17 / mythbox

Automatically exported from code.google.com/p/mythbox
GNU General Public License v2.0
0 stars 1 forks source link

'NoneType' object has no attribute 'ipAddress' #231

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed Mythbox from Add-Ons
2. Configure mysql server 
3. Error appears on startup. Nothing works.

What is the expected output? What do you see instead?
I see error 'NoneType' object has no attribute 'ipAddress' on startup
Spinning icons on the video tiles. When I select Watch recordings or Watch TV I 
get an  error with title "Error: onInit" and text "'dbPool'" for Watch TV and 
TV Guide, "'connPool'" for Watch Recordings. 

What version of the product are you using? On what operating system?
Mythbox: 1.1.0
XBMC: 11.0-7
Scientific Linux 6.4

Please provide any additional information below.
Mythbackend is on same machine. mythfrontend application works.

I have tried various settings for Mysql host in Mythbox, including 127.0.0.1.

[fa2k@blackhole ~]$ netstat -an | grep 3306
tcp        0      0 127.0.0.1:3306              0.0.0.0:*                   
LISTEN

Mythbackend log "listening" entries:
2013-06-29 16:15:17.068388 I  Listening on TCP 127.0.0.1:6544
2013-06-29 16:15:17.068459 I  Listening on TCP [0:0:0:0:0:0:0:1]:6544
2013-06-29 16:15:17.068511 I  Listening on TCP 
[2a01:348:6:85cf:a60:6eff:fe44:22f6]:6544
2013-06-29 16:15:17.068554 I  Listening on TCP [2a01:348:6:85cf:0:0:0:2]:6544
2013-06-29 16:15:17.068604 I  Listening on TCP 
[fe80:0:0:0:a60:6eff:fe44:22f6%eth2]:6544
2013-06-29 16:15:17.068678 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:1%vmnet1]:6544
2013-06-29 16:15:17.068725 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:8%vmnet8]:6544
2013-06-29 16:15:17.073430 N  MediaServer:: Loopback address specified - 
127.0.0.1. Disabling UPnP
2013-06-29 16:15:17.073437 I  Main::Registering HttpStatus Extension
2013-06-29 16:15:17.074473 I  Listening on TCP 127.0.0.1:6543
2013-06-29 16:15:17.074528 I  Listening on TCP [0:0:0:0:0:0:0:1]:6543
2013-06-29 16:15:17.074575 I  Listening on TCP 
[2a01:348:6:85cf:a60:6eff:fe44:22f6]:6543
2013-06-29 16:15:17.074618 I  Listening on TCP [2a01:348:6:85cf:0:0:0:2]:6543
2013-06-29 16:15:17.074665 I  Listening on TCP 
[fe80:0:0:0:a60:6eff:fe44:22f6%eth2]:6543
2013-06-29 16:15:17.074720 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:1%vmnet1]:6543
2013-06-29 16:15:17.074777 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:8%vmnet8]:6543

Original issue reported on code.google.com by pmbjorns...@gmail.com on 29 Jun 2013 at 3:16

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The "config.xml" file above is ~/.mythtv/config.xml . I have changed the 
LocalHostName to blackhole.lan.fa2k.net (it was set to some default value.

Here is the mythbackend log:

2013-06-29 16:33:24.899058 C  mythbackend version:  [v0.26.0] www.mythtv.org    

2013-06-29 16:33:24.899084 C  Qt version: compile: 4.6.2, runtime: 4.6.2        

2013-06-29 16:33:24.899087 N  Enabled verbose msgs:  general                    

2013-06-29 16:33:24.899101 N  Setting Log Level to LOG_INFO                     

2013-06-29 16:33:24.899715 I  Setup Interrupt handler                           

2013-06-29 16:33:24.899725 I  Setup Terminated handler                          

2013-06-29 16:33:24.899731 I  Setup Segmentation fault handler
2013-06-29 16:33:24.899740 I  Setup Aborted handler
2013-06-29 16:33:24.899746 I  Setup Bus error handler
2013-06-29 16:33:24.899753 I  Setup Floating point exception handler
2013-06-29 16:33:24.899760 I  Setup Illegal instruction handler
2013-06-29 16:33:24.899767 I  Setup Real-time signal 0 handler
2013-06-29 16:33:24.899808 N  Using runtime prefix = /usr/local
2013-06-29 16:33:24.899819 N  Using configuration directory = /home/fa2k/.mythtv
2013-06-29 16:33:24.899905 I  Assumed character encoding: en_US.utf8
2013-06-29 16:33:24.899912 W  This application expects to be running a locale 
that specifies a UTF-8 codeset, and many features may behave improperly with 
your current language settings. Please set the LC_ALL or LC_CTYPE, and LANG 
variable(s) in the environment in which this program is executed to include a 
UTF-8 codeset (such as 'en_US.UTF-8').
2013-06-29 16:33:24.900297 I  Using localhost value of blackhole.lan.fa2k.net
2013-06-29 16:33:24.902127 I  Added logging to the console
2013-06-29 16:33:24.917226 N  Setting QT default locale to en_GB
2013-06-29 16:33:24.917240 I  Current locale en_GB
2013-06-29 16:33:24.917291 N  Reading locale defaults from 
/usr/local/share/mythtv//locales/en_gb.xml
2013-06-29 16:33:24.924498 I  Current MythTV Schema Version (DBSchemaVer): 1307
2013-06-29 16:33:24.924973 I  Loading en_us translation for module mythfrontend
2013-06-29 16:33:24.925465 N  MythBackend: Starting up as the master server.
2013-06-29 16:33:25.125776 I  Added logging to mythlogserver at TCP:35327
2013-06-29 16:33:26.922787 I  Found 12 distinct programid authorities
2013-06-29 16:33:26.924093 I  New static DB connectionSchedCon
2013-06-29 16:33:26.925935 I  Listening on TCP 127.0.0.1:6544
2013-06-29 16:33:26.926000 I  Listening on TCP [0:0:0:0:0:0:0:1]:6544
2013-06-29 16:33:26.926053 I  Listening on TCP 
[2a01:348:6:85cf:a60:6eff:fe44:22f6]:6544
2013-06-29 16:33:26.926099 I  Listening on TCP [2a01:348:6:85cf:0:0:0:2]:6544
2013-06-29 16:33:26.926150 I  Listening on TCP 
[fe80:0:0:0:a60:6eff:fe44:22f6%eth2]:6544
2013-06-29 16:33:26.926224 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:1%vmnet1]:6544
2013-06-29 16:33:26.926273 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:8%vmnet8]:6544
2013-06-29 16:33:26.927611 N  MediaServer:: Loopback address specified - 
127.0.0.1. Disabling UPnP
2013-06-29 16:33:26.927616 I  Main::Registering HttpStatus Extension
2013-06-29 16:33:26.929799 I  Listening on TCP 127.0.0.1:6543
2013-06-29 16:33:26.929849 I  Listening on TCP [0:0:0:0:0:0:0:1]:6543
2013-06-29 16:33:26.929899 I  Listening on TCP 
[2a01:348:6:85cf:a60:6eff:fe44:22f6]:6543
2013-06-29 16:33:26.929943 I  Listening on TCP [2a01:348:6:85cf:0:0:0:2]:6543
2013-06-29 16:33:26.929988 I  Listening on TCP 
[fe80:0:0:0:a60:6eff:fe44:22f6%eth2]:6543
2013-06-29 16:33:26.930041 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:1%vmnet1]:6543
2013-06-29 16:33:26.930087 I  Listening on TCP 
[fe80:0:0:0:250:56ff:fec0:8%vmnet8]:6543
2013-06-29 16:33:26.931501 N  AutoExpire: CalcParams(): Max required Free 
Space: 20.0 GB w/freq: 15 min
2013-06-29 16:33:29.988156 I  Reschedule requested for MATCH 0 0 0 - 
SchedulerInit
2013-06-29 16:33:36.413477 I  Scheduled 454 items in 6.2 = 5.02 match + 0.98 
check + 0.21 place
2013-06-29 16:33:36.522751 I  Scheduler: Seem to be woken up by USER

Original comment by pmbjorns...@gmail.com on 29 Jun 2013 at 3:41

GoogleCodeExporter commented 9 years ago
I found the problem, but I don't know if my database is broken somehow. The 
master server is set to a hostname, for some reason. The problem is with 
getMasterBackend() in src/mythbox/mythtv/db.py . My database has:
+-----------------------------------+-------------------------------------------
--------------+------------------------+
| value                             | data                                      
              | hostname               |
+-----------------------------------+-------------------------------------------
--------------+------------------------+
| MasterServerIP                    | blackhole.lan.fa2k.net                    
              | NULL                   |
| MasterServerPort                  | 6543                                      
              | NULL                   |
| BackendServerIP                   | 127.0.0.1                                 
              | blackhole.lan.fa2k.net |
| BackendServerIP6                  | blackhole.lan.fa2k.net                    
              | blackhole.lan.fa2k.net |

So problem #1 is MasterServerIP doesn't match any BackendServerIP. I changed 
the SQL string to
            sql = """
                select 
                    c.data as ipaddr,
                    b.data as port,
                    c.hostname as hostname
                from 
                    settings a, 
                    settings b,
                    settings c
                where 
                    a.value = 'MasterServerIP' and
                    b.value = 'MasterServerPort' and
                    c.value = 'BackendServerIP' and
                    c.hostname  = a.data
                """
Don't know if this is a general fix or if it introduces other bugs. 

At this point I got a different error while connecting and these messages in my 
mythbackend log,
2013-07-01 23:07:50.657000 C  MainServer::HandleVersion - Client speaks 
protocol version 8 but we speak 75!
2013-07-01 23:07:50.657084 W  MainServer: Unknown socket closing 
MythSocket(0x21937c0)
2013-07-01 23:07:50.658389 W  MainServer: Unknown socket closing 
MythSocket(0x2190ed0)
2013-07-01 23:07:53.582574 W  MainServer: Unknown socket closing 
MythSocket(0x20c3f50)

Now I'm giving up..

Original comment by pmbjorns...@gmail.com on 1 Jul 2013 at 10:10

GoogleCodeExporter commented 9 years ago
(Seems that it would introduce bugs if MasterServerIP is indeed an IP address 
and the hostname column is a hostname)

Original comment by pmbjorns...@gmail.com on 1 Jul 2013 at 10:15