Opened 11 years ago

Closed 11 years ago

#4611 closed defect (fixed)

Autodiscovery broken

Reported by: stuartm Owned by: Nigel
Priority: major Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by Nigel)

Autodiscovery no longer seems to work for me when I pass the -p param. I get the selection screen but no servers are listed, although there are two master backends on the network. Worked fine the last time I used -p a few weeks ago.

mythfrontend -p -v upnp
2008-02-07 19:20:12.811 Using runtime prefix = /usr/local, libdir = /usr/local/lib
2008-02-07 19:20:12.812 UPnp - Constructor
2008-02-07 19:20:12.812 MediaRenderer::Begin
2008-02-07 19:20:12.814 ThreadPool:AddWorkerThread - HTTP_WorkerThread
2008-02-07 19:20:12.815 HttpServer( 6547 ) - SharePath = /usr/local/share/mythtv/
2008-02-07 19:20:12.815 UPnp::Initialize - Begin
2008-02-07 19:20:12.815 UPnp::Initialize - Starting TaskQueue
2008-02-07 19:20:12.816 UPnp::Initialize - Creating SSDP Thread at port 6547
2008-02-07 19:20:12.856 UPnp::Initialize - End
2008-02-07 19:20:12.856 MediaRenderer::Creating UPnp Description
2008-02-07 19:20:12.856 MediaRenderer::Registering CMGR Service.
2008-02-07 19:20:12.857 UPnp::Start - Starting SSDP Thread (Multicast)
2008-02-07 19:20:12.865 UPnp::Start - Enabling Notifications
2008-02-07 19:20:12.866 SSDP::EnableNotifications() - creating new task
2008-02-07 19:20:12.866 SSDP::EnableNotifications() - sending NTS_byebye
2008-02-07 19:20:12.866 LookupUDN(urn:schemas-upnp-org:device:MediaRenderer:1) sName=UPnP/UDN/MediaRenderer, sUDN=9c05bdb3-0b24-4735-b55a-4952534255d9
2008-02-07 19:20:14.192 SSDP::EnableNotifications() - sending NTS_alive
2008-02-07 19:20:14.193 SSDP::EnableNotifications() - Task added to UPnP queue
2008-02-07 19:20:14.193 UPnp::Start - Returning
2008-02-07 19:20:14.193 MediaRenderer::End
2008-02-07 19:20:14.452 DPMS is disabled.
2008-02-07 19:20:14.453 Empty LocalHostName.
2008-02-07 19:20:14.453 Using localhost value of stanage_edge
2008-02-07 19:20:14.519 New DB connection, total: 1
DisplaResX: Unable to XRRgetScreenInfo
2008-02-07 19:20:14.543 Total desktop dim: 2720x900, with 2 screen[s].
2008-02-07 19:20:14.545 Using screen 0, 1280x800 at 1440,0
2008-02-07 19:20:14.547 Switching to square mode (blue)
2008-02-07 19:20:14.653 Using the Qt painter
2008-02-07 19:20:16.974 DB Error (Clear setting):
Query was:

No error type from QSqlError?  Strange...
2008-02-07 19:20:16.974 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError?  Strange...
2008-02-07 19:20:16.974 DB Error (Clear setting):
Query was:

No error type from QSqlError?  Strange...
2008-02-07 19:20:16.975 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError?  Strange...
2008-02-07 19:20:16.975 Putting up the UPnP backend chooser

Change History (9)

comment:1 Changed 11 years ago by stuartm

Version: unknownhead

comment:2 Changed 11 years ago by Nigel

Description: modified (diff)

I have had that error a few times over the last 3 months. Suspected a networking, or UPnP timing, issue.

1) Does the backend appear in the chooser if you go on to the host, stop and start it?

2) Are the two hosts listed in the -v upnp output if you start without -p ? (so that it attempts autoconfigure)

comment:3 Changed 11 years ago by stuartm

2) No. But when I just deleted both the config.xml and mysql.txt files it started working again.

It must have been working before we stored host info in config.xml otherwise I would never have been able to connect to my primary backend. The mysql.txt pointed to the other backend, so wasn't being used.

comment:4 Changed 11 years ago by stuartm

Priority: minormajor

1) Yes, if I restart the backend then it appears in the list.

comment:5 Changed 11 years ago by Nigel

Owner: changed from Isaac Richards to Nigel
Status: newaccepted

Have reproduced the problem. Running mythbackend -v upnp reveals:

2008-02-15 14:57:44.194 HTTPRequest::ProcessSOAPPayload : "urn:schemas-mythtv-org:service:MythTv:1#GetConnectionInfo" : 
2008-02-15 14:57:44.195 MythXML::ProcessRequest: GetConnectionInfo : POST /Myth HTTP/1.1

2008-02-15 14:57:44.197 HTTPRequest::SendResponse(xml/html) () :500 Internal Server Error -> 149.135.128.112: 1

Reverting the frontend (-r14964) and backend (-r15903) have not changed the behaviour. Still trying to narrow the fault down.

comment:6 Changed 11 years ago by Nigel

Status: acceptedstarted

This change should work in -p situations, but I haven't tested with multiple backends env. yet.

% svn diff libmyth/backendselect.* libmyth/mythcontext.cpp
Index: libmyth/backendselect.cpp
===================================================================
--- libmyth/backendselect.cpp   (revision 16050)
+++ libmyth/backendselect.cpp   (working copy)
@@ -22,7 +22,8 @@
 
     UPnp::AddListener(this);
 
-    FillListBox();
+    UPnp::PerformSearch(gBackendURI);
+    //FillListBox();
 
     m_backends->setFocus();
 }

comment:7 Changed 11 years ago by stuartm

That fix seems to work just fine. Both master backends appear as expected.

comment:8 Changed 11 years ago by Nigel

(In [16145]) Ensure UPnP search is always under way before putting up chooser. See #4611

comment:9 Changed 11 years ago by Nigel

Resolution: fixed
Status: startedclosed

(In [16146]) Ensure UPnP search is always under way before putting up chooser. Closes #4611

Note: See TracTickets for help on using tickets.