Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

mythbackend and mythlcdserver broken at the moment?

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


mythtv at dsl

Jul 1, 2008, 5:55 AM

Post #1 of 8 (705 views)
Permalink
mythbackend and mythlcdserver broken at the moment?

Anybody else having problems with mythbackend and mythlcdserver? They
don't seem to accept connections anymore?

mythzmserver is working but it uses it's own socket code so it looks
like the server side of things is broken bit the client side is still
working.

Broken by http://cvs.mythtv.org/trac/changeset/17665 ?

I'm using Qt 4.3.3 in case its important.

Paul H.
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mythtv at dsl

Jul 1, 2008, 7:19 AM

Post #2 of 8 (675 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

Paul Harrison wrote:
> Anybody else having problems with mythbackend and mythlcdserver? They
> don't seem to accept connections anymore?
>
> mythzmserver is working but it uses it's own socket code so it looks
> like the server side of things is broken bit the client side is still
> working.
>
> Broken by http://cvs.mythtv.org/trac/changeset/17665 ?
>
> I'm using Qt 4.3.3 in case its important.
>
> Paul H.
>
>

OK - The problem is actually the reverse of what I originally thought -
mythbackend and mythlcdserver are accepting connections and processing
the requests fine if you use telnet to connect to them. It's
mythfrontend and mythwelcome that cannot connect to them if they are on
the same machine - remote connections work fine which is why
MythZoneMinder was working fine for me, it's on another machine.

I think the problem is QHostAddress cannot resolve 'localhost'. If the
master IP address setting is changed from localhost to 127.0.0.1 then
mythfrontend etc can connect OK. The same has to be done to get
mythfrontend/mythwelcome to connect to mythlcdserver unfortunately there
is not GUI setting to change the IP address they should use to connect
to mythlcdserver, localhost has always worked in the past, so you have
to edit the DB and change the 'LCDServerHost' setting to '127.0.0.1'.

Paul H.
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at case

Jul 1, 2008, 9:57 AM

Post #3 of 8 (669 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

On Tuesday 01 July 2008 10:19:25 am Paul Harrison wrote:
> Paul Harrison wrote:
> > Anybody else having problems with mythbackend and mythlcdserver? They
> > don't seem to accept connections anymore?
> >
> > mythzmserver is working but it uses it's own socket code so it looks
> > like the server side of things is broken bit the client side is still
> > working.
> >
> > Broken by http://cvs.mythtv.org/trac/changeset/17665 ?
> >
> > I'm using Qt 4.3.3 in case its important.
> >
> > Paul H.
>
> OK - The problem is actually the reverse of what I originally thought -
> mythbackend and mythlcdserver are accepting connections and processing
> the requests fine if you use telnet to connect to them. It's
> mythfrontend and mythwelcome that cannot connect to them if they are on
> the same machine - remote connections work fine which is why
> MythZoneMinder was working fine for me, it's on another machine.
>
> I think the problem is QHostAddress cannot resolve 'localhost'. If the
> master IP address setting is changed from localhost to 127.0.0.1 then
> mythfrontend etc can connect OK. The same has to be done to get
> mythfrontend/mythwelcome to connect to mythlcdserver unfortunately there
> is not GUI setting to change the IP address they should use to connect
> to mythlcdserver, localhost has always worked in the past, so you have
> to edit the DB and change the 'LCDServerHost' setting to '127.0.0.1'.

I'm pretty sure we've not had actual hostname lookups in there for a very long
time.. There may have been some special-casing for localhost, but I'm not
seeing it anywhere.

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mythtv at dsl

Jul 1, 2008, 11:36 AM

Post #4 of 8 (657 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

Isaac Richards wrote:
> I'm pretty sure we've not had actual hostname lookups in there for a very long
> time.. There may have been some special-casing for localhost, but I'm not
> seeing it anywhere.
>
> Isaac
>
>
No I couldn't see anything either but something must have changed
because lcddevice.cpp has *always* used 'localhost' it's hard coded that
way unless you manually edit the DB. The only thing I can think of is
the old QSocketDevice::connect() defaulted to use 127.0.0.1 if the
QHostAddress passed in was invalid but the new MSocketDevice::connect()
doesn't but that's just a guess. Like I said I'm using Qt4.3.3 where did
you rip MSocketDevice from?

There is of cause some easy fixes for this - change the default in
lcddevice.cpp to use 127.0.0.1 or a more generic fix would be to add a
special case in MythSocket::connect(const QString &host, Q_UINT16 port)
to check host for 'localhost' or maybe do a QHostInfo::fromName () if
the QHostAddress::setAddress() fails?

Paul H.
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at case

Jul 1, 2008, 12:51 PM

Post #5 of 8 (654 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

On Tuesday 01 July 2008 2:36:51 pm Paul Harrison wrote:
> Isaac Richards wrote:
> > I'm pretty sure we've not had actual hostname lookups in there for a very
> > long time.. There may have been some special-casing for localhost, but
> > I'm not seeing it anywhere.
> >
> > Isaac
>
> No I couldn't see anything either but something must have changed
> because lcddevice.cpp has *always* used 'localhost' it's hard coded that
> way unless you manually edit the DB. The only thing I can think of is
> the old QSocketDevice::connect() defaulted to use 127.0.0.1 if the
> QHostAddress passed in was invalid but the new MSocketDevice::connect()
> doesn't but that's just a guess. Like I said I'm using Qt4.3.3 where did
> you rip MSocketDevice from?

It's QSocketDevice from 4.4.0 with minor changes to compile without
qt3support.. There are only minor differences (the Q_BEGIN_NAMESPACE/etc)
defines 4.3.5->4.4.0 in this code, too.

> There is of cause some easy fixes for this - change the default in
> lcddevice.cpp to use 127.0.0.1 or a more generic fix would be to add a
> special case in MythSocket::connect(const QString &host, Q_UINT16 port)
> to check host for 'localhost' or maybe do a QHostInfo::fromName () if
> the QHostAddress::setAddress() fails?

I'm planning on just adding a localhost workaround to MythSocket::connect.
Or, maybe the hostname lookup stuff isn't broken in qt4 like the qt3 version
was..

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at case

Jul 1, 2008, 1:20 PM

Post #6 of 8 (657 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

On Tuesday 01 July 2008 3:51:42 pm Isaac Richards wrote:
> On Tuesday 01 July 2008 2:36:51 pm Paul Harrison wrote:
> > There is of cause some easy fixes for this - change the default in
> > lcddevice.cpp to use 127.0.0.1 or a more generic fix would be to add a
> > special case in MythSocket::connect(const QString &host, Q_UINT16 port)
> > to check host for 'localhost' or maybe do a QHostInfo::fromName () if
> > the QHostAddress::setAddress() fails?
>
> I'm planning on just adding a localhost workaround to MythSocket::connect.
> Or, maybe the hostname lookup stuff isn't broken in qt4 like the qt3
> version was..

Yeah, it looks like we can use QHostInfo::fromName() - it's blocking and
doesn't involve the Qt event loop like the qt3 version did.

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at case

Jul 1, 2008, 1:35 PM

Post #7 of 8 (653 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

On Tuesday 01 July 2008 4:20:43 pm Isaac Richards wrote:
> On Tuesday 01 July 2008 3:51:42 pm Isaac Richards wrote:
> > On Tuesday 01 July 2008 2:36:51 pm Paul Harrison wrote:
> > > There is of cause some easy fixes for this - change the default in
> > > lcddevice.cpp to use 127.0.0.1 or a more generic fix would be to add a
> > > special case in MythSocket::connect(const QString &host, Q_UINT16 port)
> > > to check host for 'localhost' or maybe do a QHostInfo::fromName () if
> > > the QHostAddress::setAddress() fails?
> >
> > I'm planning on just adding a localhost workaround to
> > MythSocket::connect. Or, maybe the hostname lookup stuff isn't broken in
> > qt4 like the qt3 version was..
>
> Yeah, it looks like we can use QHostInfo::fromName() - it's blocking and
> doesn't involve the Qt event loop like the qt3 version did.

Does the attached patch work? I can't test at the moment.

Isaac
Attachments: lookup.diff (0.84 KB)


mythtv at dsl

Jul 1, 2008, 2:12 PM

Post #8 of 8 (655 views)
Permalink
Re: mythbackend and mythlcdserver broken at the moment? [In reply to]

Isaac Richards wrote:
> On Tuesday 01 July 2008 4:20:43 pm Isaac Richards wrote:
>
>> On Tuesday 01 July 2008 3:51:42 pm Isaac Richards wrote:
>>
>>> On Tuesday 01 July 2008 2:36:51 pm Paul Harrison wrote:
>>>
>>>> There is of cause some easy fixes for this - change the default in
>>>> lcddevice.cpp to use 127.0.0.1 or a more generic fix would be to add a
>>>> special case in MythSocket::connect(const QString &host, Q_UINT16 port)
>>>> to check host for 'localhost' or maybe do a QHostInfo::fromName () if
>>>> the QHostAddress::setAddress() fails?
>>>>
>>> I'm planning on just adding a localhost workaround to
>>> MythSocket::connect. Or, maybe the hostname lookup stuff isn't broken in
>>> qt4 like the qt3 version was..
>>>
>> Yeah, it looks like we can use QHostInfo::fromName() - it's blocking and
>> doesn't involve the Qt event loop like the qt3 version did.
>>
>
> Does the attached patch work? I can't test at the moment.
>
> Isaac
>
Yes thanks Isaac - Changed everything back to use localhost and it is
working fine. I can see from the '-v network,socket' output the lookup
is working OK.

Paul H.


_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.