Mailing List Archive

mythtv-setup without UPNP searching for backend?
When I'm working on building a test mythtv BE/FE combo to test something, I
have mythtv-setup fail due to it finding another backend like my production
one. The only way I've found to recover from this is reformat the HD and
start over with O/S install. I know that you could spend a year or so
digging into what files need to be removed, but I can't find them all so in
the interest of time, I just start over.

What I'd like is a way to tell mythtv-setup to not go looking for anything,
just stay on localhost and make all assumptions as localhost. Does that
exist??

When I can remember I shutdown all backends before running mythtv-setup on
the new system and it works as expected. When I leave one up, it's a
disaster.

Jim A
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On Sun, Jan 9, 2022, 10:03 James Abernathy <jfabernathy@gmail.com> wrote:

> When I'm working on building a test mythtv BE/FE combo to test something,
> I have mythtv-setup fail due to it finding another backend like my
> production one. The only way I've found to recover from this is reformat
> the HD and start over with O/S install. I know that you could spend a year
> or so digging into what files need to be removed, but I can't find them all
> so in the interest of time, I just start over.
>

/var/lib/mysql even for Maria DB is the canonical place for database files.
If you wipe out that directory, and reinstall the database package from
your distribution, it should perform the setup steps again (creating the
database root user password etc) and you would save about 95% of the
reinstallation steps.


> What I'd like is a way to tell mythtv-setup to not go looking for
> anything, just stay on localhost and make all assumptions as localhost.
> Does that exist??
>

I would just unplug the network cable..


>
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
> On 10 Jan 2022, at 2:34 am, Mike Hodson <mystica@gmail.com> wrote:
>
>
>
> On Sun, Jan 9, 2022, 10:03 James Abernathy <jfabernathy@gmail.com <mailto:jfabernathy@gmail.com>> wrote:
> When I'm working on building a test mythtv BE/FE combo to test something, I have mythtv-setup fail due to it finding another backend like my production one. The only way I've found to recover from this is reformat the HD and start over with O/S install. I know that you could spend a year or so digging into what files need to be removed, but I can't find them all so in the interest of time, I just start over.
>
> /var/lib/mysql even for Maria DB is the canonical place for database files. If you wipe out that directory, and reinstall the database package from your distribution, it should perform the setup steps again (creating the database root user password etc) and you would save about 95% of the reinstallation steps.
>
>
> What I'd like is a way to tell mythtv-setup to not go looking for anything, just stay on localhost and make all assumptions as localhost. Does that exist??
>
> I would just unplug the network cable..

For me I use ssh lots so no-can-do but what does work is a firewall. I often use opensuse (for my playing) and it defaults to a firewall, 1 click during install to add ssh and open firewall

Having been bitten I backup master DB first BUT I also have just emptied the offending items from database

Just had another nip:
ISP failed for days. Using PhoneHotspot. (OT I've been trying to setup another machine as a gateway but so far I'm beaten) During the switching LAN / hotspot the frontend NAME changed (need dhcp for hotspot, but manual for mythtv)
dhcpname is setup all wrong, rebooted, realname setup is now all wrong !!

In case it piques interest my ot bit is
Was
ISPMODEM----------------mythbackend------------mythfrontend with BE and FE using ISP as gateway

What I'm trying to do

ISPMODEN-------------GWBOX--------BE--------FE both using GWBOX as gateway
PhoneHotspot ) ) ) ) ) )

Linux:trivially easy:so-far-impossible

James
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On Mon, 10 Jan 2022 07:06:48 +0800, you wrote:

>Just had another nip:
>ISP failed for days. Using PhoneHotspot. (OT I've been trying to setup another machine as a gateway but so far I'm beaten) During the switching LAN / hotspot the frontend NAME changed (need dhcp for hotspot, but manual for mythtv)
>dhcpname is setup all wrong, rebooted, realname setup is now all wrong !!
>
>In case it piques interest my ot bit is
>Was
>ISPMODEM----------------mythbackend------------mythfrontend with BE and FE using ISP as gateway
>
>What I'm trying to do
>
>ISPMODEN-------------GWBOX--------BE--------FE both using GWBOX as gateway
>PhoneHotspot ) ) ) ) ) )
>
>Linux:trivially easy:so-far-impossible
>
>James

Your problem is likely the "ISPMODEM" - a really good router should be
able to support WAN failover. You still get problems with delegated
address spaces though - you really want to keep on using the same
addresses on your network, but just change the external ones. With
NAT on IPv4 in theory there is no problem (except configuring it
correctly), but with IPv6 you will get a different address range from
your hotspot and that makes life very difficult. I have been
experimenting with using a form of NAT on IPv6 where the router
translates the delegated prefix part as necessary, and I think I have
made it work. This is with a Ubiquiti ERL router. But even there, I
can not do it with router CLI commands - I have to do it using
iptables commands to the underlying Linux kernel. The same sort of
translations should be possible in your Linux GWBOX, but there is not
much documentation on how to do it and I have yet to succeed with IPv4
(not that I have put much effort into it recently). The keywords to
use in Internet searches are "NPT" (Network Prefix Translation),
"NPTv4" and "NPTv6". Google will helpfully assume you really mean NTP
so enclose them in quotes.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On 09/01/2022 17:00, James Abernathy wrote:
> When I'm working on building a test mythtv BE/FE combo to test
> something, I have mythtv-setup fail due to it finding another backend
> like my production one. The only way I've found to recover from this is
> reformat the HD and start over with O/S install.  I know that you could
> spend a year or so digging into what files need to be removed, but I
> can't find them all so in the interest of time, I just start over.
>
> What I'd like is a way to tell mythtv-setup to not go looking for
> anything, just stay on localhost and make all assumptions as localhost.
> Does that exist??
>

If you override the environment variable MYTHCONFDIR to a different
directory, then the you can separate out the configuration data between
dev/test/prod instance even on the same machine.

start with MYTHCONFDIR pointing to an empty dir, and then run
mythtv-setup and start from the beginning.....

You will probably need to let it timeout on the search, and then select
manual setup.

Regards
Stuart

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
> On 11 Jan 2022, at 8:30 pm, Stuart Auchterlonie <stuarta@squashedfrog.net> wrote:
>
> On 09/01/2022 17:00, James Abernathy wrote:
>> When I'm working on building a test mythtv BE/FE combo to test something, I have mythtv-setup fail due to it finding another backend like my production one. The only way I've found to recover from this is reformat the HD and start over with O/S install. I know that you could spend a year or so digging into what files need to be removed, but I can't find them all so in the interest of time, I just start over.
>> What I'd like is a way to tell mythtv-setup to not go looking for anything, just stay on localhost and make all assumptions as localhost. Does that exist??
>
> If you override the environment variable MYTHCONFDIR to a different
> directory, then the you can separate out the configuration data between
> dev/test/prod instance even on the same machine.
>
> start with MYTHCONFDIR pointing to an empty dir, and then run
> mythtv-setup and start from the beginning.....
>
> You will probably need to let it timeout on the search, and then select
> manual setup.

Stuart that does not answer the question. IE fresh install mythtv-setup - ooops

I've got a new machine I want to play with.
I don't want that machine messing up my master db.
I don't want that frontend talking to or displaying recordings from the 'real' master backend
I don't want that backend to be a slave.

Great Myth: I do not have any fire wall in my network. The only port forward is ssh. Bad Guys can reach my modem then do nothing. It violates RFC to route private IPs.
So every router between bad guys and me needs to be broken AND my modem need to be broken for Bad Guys to get to me. So a flaw allows them to get to me, why is a fire wall going to help.
[firewalls do stop infected windows machines from calling OUT]

The only solution that works for me is to firewall the play machine (and you can do wonderous stuff eg a play frontend machine and a play backend. With ssh tunnels you can create magic,

As an alternative to Stuarts MYTHCONFDIR suggestion I use a .mythtv_a .mythtv_b and an alias (a mv .mythtv_a .mythtv) to switch a front end (same version) from real to play.

I've not tried, and mac with their bundle system make it trivally easy, to run 2 frontends say a 31 and a 32,

Building mythtv with different PREFIX would work together with the alias solution
James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On Tue, Jan 11, 2022 at 4:48 PM James <jam@tigger.ws> wrote:

>
>
> > On 11 Jan 2022, at 8:30 pm, Stuart Auchterlonie <
> stuarta@squashedfrog.net> wrote:
> >
> > On 09/01/2022 17:00, James Abernathy wrote:
> >> When I'm working on building a test mythtv BE/FE combo to test
> something, I have mythtv-setup fail due to it finding another backend like
> my production one. The only way I've found to recover from this is reformat
> the HD and start over with O/S install. I know that you could spend a year
> or so digging into what files need to be removed, but I can't find them all
> so in the interest of time, I just start over.
> >> What I'd like is a way to tell mythtv-setup to not go looking for
> anything, just stay on localhost and make all assumptions as localhost.
> Does that exist??
> >
> > If you override the environment variable MYTHCONFDIR to a different
> > directory, then the you can separate out the configuration data between
> > dev/test/prod instance even on the same machine.
> >
> > start with MYTHCONFDIR pointing to an empty dir, and then run
> > mythtv-setup and start from the beginning.....
> >
> > You will probably need to let it timeout on the search, and then select
> > manual setup.
>
> Stuart that does not answer the question. IE fresh install mythtv-setup -
> ooops
>
> I've got a new machine I want to play with.
> I don't want that machine messing up my master db.
> I don't want that frontend talking to or displaying recordings from the
> 'real' master backend
> I don't want that backend to be a slave.
>
> Great Myth: I do not have any fire wall in my network. The only port
> forward is ssh. Bad Guys can reach my modem then do nothing. It violates
> RFC to route private IPs.
> So every router between bad guys and me needs to be broken AND my modem
> need to be broken for Bad Guys to get to me. So a flaw allows them to get
> to me, why is a fire wall going to help.
> [firewalls do stop infected windows machines from calling OUT]
>
> The only solution that works for me is to firewall the play machine (and
> you can do wonderous stuff eg a play frontend machine and a play backend.
> With ssh tunnels you can create magic,
>
> As an alternative to Stuarts MYTHCONFDIR suggestion I use a .mythtv_a
> .mythtv_b and an alias (a mv .mythtv_a .mythtv) to switch a front end (same
> version) from real to play.
>
> I've not tried, and mac with their bundle system make it trivally easy, to
> run 2 frontends say a 31 and a 32,
>
> Building mythtv with different PREFIX would work together with the alias
> solution
> James
>

What would make the connection of a Frontend to a backend easier the first
time is when you select Search, it should show more data. There is no
difference in the list of the backends unless they are on different
versions of Mythtv? If it could show the IP address or something else
unique that would help

JIm A
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On 12/01/2022 01:16, James Abernathy wrote:
>
>
> On Tue, Jan 11, 2022 at 4:48 PM James <jam@tigger.ws
> <mailto:jam@tigger.ws>> wrote:
>
>
>
> > On 11 Jan 2022, at 8:30 pm, Stuart Auchterlonie
> <stuarta@squashedfrog.net <mailto:stuarta@squashedfrog.net>> wrote:
> >
> > On 09/01/2022 17:00, James Abernathy wrote:
> >> When I'm working on building a test mythtv BE/FE combo to test
> something, I have mythtv-setup fail due to it finding another
> backend like my production one. The only way I've found to recover
> from this is reformat the HD and start over with O/S install.  I
> know that you could spend a year or so digging into what files
> need to be removed, but I can't find them all so in the interest
> of time, I just start over.
> >> What I'd like is a way to tell mythtv-setup to not go looking
> for anything, just stay on localhost and make all assumptions as
> localhost.  Does that exist??
> >
> > If you override the environment variable MYTHCONFDIR to a different
> > directory, then the you can separate out the configuration data
> between
> > dev/test/prod instance even on the same machine.
> >
> > start with MYTHCONFDIR pointing to an empty dir, and then run
> > mythtv-setup and start from the beginning.....
> >
> > You will probably need to let it timeout on the search, and then
> select
> > manual setup.
>
> Stuart that does not answer the question. IE fresh install
> mythtv-setup - ooops
>
> I've got a new machine I want to play with.
> I don't want that machine messing up my master db.
> I don't want that frontend talking to or displaying recordings
> from the 'real' master backend
> I don't want that backend to be a slave.
>
> Great Myth: I do not have any fire wall in my network. The only
> port forward is ssh. Bad Guys can reach my modem then do nothing.
> It violates RFC to route private IPs.
> So every router between bad guys and me needs to be broken AND my
> modem need to be broken for Bad Guys to get to me. So a flaw
> allows them to get to me, why is a fire wall going to help.
> [firewalls do stop infected windows machines from calling OUT]
>
> The only solution that works for me is to firewall the play
> machine (and you can do wonderous stuff eg a play frontend machine
> and a play backend. With ssh tunnels you can create magic,
>
> As an alternative to Stuarts MYTHCONFDIR suggestion I use a
> .mythtv_a .mythtv_b and an alias (a mv .mythtv_a .mythtv) to
> switch a front end (same version) from real to play.
>
> I've not tried, and mac with their bundle system make it trivally
> easy, to run 2 frontends say a 31 and a 32,
>
> Building mythtv with different PREFIX would work together with the
> alias solution
> James
>
>
> What would make the connection of a Frontend to a backend easier the
> first time is when you select Search, it should show more data.  There
> is no difference in the list of the backends unless they are on
> different versions of Mythtv? If it could show the IP address or
> something else unique that would help
>
> JIm A
>
>

What I do is create a new devicemaster.xml so I can tell which backend
is which.

Some basic instructions here on the UPnP page in the wiki "Overriding
the default devicemaster.xml file" section.

https://www.mythtv.org/wiki/UPnP#Overriding_the_default_devicemaster.xml_file


Paul H.
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On 1/11/22 8:55 PM, Paul Harrison wrote:
>
> What I do is create a new devicemaster.xml so I can tell which backend
> is which.
>
> Some basic instructions here on the UPnP page in the wiki "Overriding
> the default devicemaster.xml file" section.
>
> https://www.mythtv.org/wiki/UPnP#Overriding_the_default_devicemaster.xml_file
>
>
> Paul H.
>

Paul,

This is what I'm looking for, Thanks. However, I must had implemented it
wrong. I think I have the devicemaster.xml setup right, but the sql
command must be wrong for my setup.

Here's the diff between the official devicemaster.xml and mine:

diff -Naur /usr/share/mythtv/devicemaster.xml
/home/mythtv/.mythtv/devicemaster.xml
--- /usr/share/mythtv/devicemaster.xml    2021-11-08 18:25:26.000000000
-0500
+++ /home/mythtv/.mythtv/devicemaster.xml    2022-01-12
05:45:25.284823621 -0500
@@ -6,13 +6,13 @@
     </specVersion>
     <device>
         <!-- UDN auto generated -->
-        <friendlyName>MythTV AV Media Server</friendlyName>
+        <friendlyName>MythTV Production Backend</friendlyName>
<deviceType>urn:schemas-upnp-org:device:MediaServer:4</deviceType>
         <manufacturer>MythTV</manufacturer>
<manufacturerURL>http://www.mythtv.org/</manufacturerURL>
-        <modelName>MythTV AV Media Server</modelName>
+        <modelName>MythTV Production Backend</modelName>
         <!-- uncomment to override defaults
<modelNumber>0.20</modelNumber> -->
-        <modelDescription>MythTV AV Media Server</modelDescription>
+        <modelDescription>MythTV Production Backend</modelDescription>
         <modelURL>http://www.mythtv.org/</modelURL>
         <presentationURL>/</presentationURL>
         <dlna:X_DLNADOC
xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.51</dlna:X_DLNADOC>
@@ -21,13 +21,13 @@
         <deviceList>
             <device>
             <!-- UDN auto generated -->
-            <friendlyName>MythTV Master Media Server</friendlyName>
+            <friendlyName>MythTV Production Backend</friendlyName>
<deviceType>urn:schemas-mythtv-org:device:MasterMediaServer:1</deviceType>
             <manufacturer>MythTV</manufacturer>
<manufacturerURL>http://www.mythtv.org/</manufacturerURL>
-            <modelName>MythTV Master Media Server</modelName>
+            <modelName>MythTV Production Backend</modelName>
             <!-- uncomment to override defaults
<modelNumber>0.20</modelNumber> -->
-            <modelDescription>MythTV AV Media Server</modelDescription>
+            <modelDescription>MythTV Production Backend</modelDescription>
<modelURL>http://www.mythtv.org/</modelURL>
             <presentationURL>/</presentationURL>
             <!-- uncomment to override defaults
<serialNumber>MYTHTV-UPNP-01</serialNumber> -->

Not knowing any better, I did the mysql commands exactly as listed. 
Maybe I should have changed the syntax???

INSERT INTO settings (value, data, hostname) VALUES ('upnpDescXmlPath',
'/home/mythtv/.mythtv/', 'HOSTNAME');

What should 'HOSTNAME' have been???

Jim A


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On 12/01/2022 11:08, Jim Abernathy wrote:
>
> On 1/11/22 8:55 PM, Paul Harrison wrote:
>>
>> What I do is create a new devicemaster.xml so I can tell which
>> backend is which.
>>
>> Some basic instructions here on the UPnP page in the wiki "Overriding
>> the default devicemaster.xml file" section.
>>
>> https://www.mythtv.org/wiki/UPnP#Overriding_the_default_devicemaster.xml_file
>>
>>
>>
>> Paul H.
>>
>
> Paul,
>
> This is what I'm looking for, Thanks. However, I must had implemented
> it wrong. I think I have the devicemaster.xml setup right, but the sql
> command must be wrong for my setup.
>
> Here's the diff between the official devicemaster.xml and mine:
>
> diff -Naur /usr/share/mythtv/devicemaster.xml
> /home/mythtv/.mythtv/devicemaster.xml
> --- /usr/share/mythtv/devicemaster.xml    2021-11-08
> 18:25:26.000000000 -0500
> +++ /home/mythtv/.mythtv/devicemaster.xml    2022-01-12
> 05:45:25.284823621 -0500
> @@ -6,13 +6,13 @@
>      </specVersion>
>      <device>
>          <!-- UDN auto generated -->
> -        <friendlyName>MythTV AV Media Server</friendlyName>
> +        <friendlyName>MythTV Production Backend</friendlyName>
> <deviceType>urn:schemas-upnp-org:device:MediaServer:4</deviceType>
>          <manufacturer>MythTV</manufacturer>
> <manufacturerURL>http://www.mythtv.org/</manufacturerURL>
> -        <modelName>MythTV AV Media Server</modelName>
> +        <modelName>MythTV Production Backend</modelName>
>          <!-- uncomment to override defaults
> <modelNumber>0.20</modelNumber> -->
> -        <modelDescription>MythTV AV Media Server</modelDescription>
> +        <modelDescription>MythTV Production Backend</modelDescription>
>          <modelURL>http://www.mythtv.org/</modelURL>
>          <presentationURL>/</presentationURL>
>          <dlna:X_DLNADOC
> xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.51</dlna:X_DLNADOC>
> @@ -21,13 +21,13 @@
>          <deviceList>
>              <device>
>              <!-- UDN auto generated -->
> -            <friendlyName>MythTV Master Media Server</friendlyName>
> +            <friendlyName>MythTV Production Backend</friendlyName>
> <deviceType>urn:schemas-mythtv-org:device:MasterMediaServer:1</deviceType>
>
>              <manufacturer>MythTV</manufacturer>
> <manufacturerURL>http://www.mythtv.org/</manufacturerURL>
> -            <modelName>MythTV Master Media Server</modelName>
> +            <modelName>MythTV Production Backend</modelName>
>              <!-- uncomment to override defaults
> <modelNumber>0.20</modelNumber> -->
> -            <modelDescription>MythTV AV Media Server</modelDescription>
> +            <modelDescription>MythTV Production
> Backend</modelDescription>
> <modelURL>http://www.mythtv.org/</modelURL>
>              <presentationURL>/</presentationURL>
>              <!-- uncomment to override defaults
> <serialNumber>MYTHTV-UPNP-01</serialNumber> -->
>
> Not knowing any better, I did the mysql commands exactly as listed. 
> Maybe I should have changed the syntax???
>
> INSERT INTO settings (value, data, hostname) VALUES
> ('upnpDescXmlPath', '/home/mythtv/.mythtv/', 'HOSTNAME');
>
> What should 'HOSTNAME' have been???
>
> Jim A
>
>

It will typically be the hostname of the backend. The same name you get
if you run the command 'hostname'.

You can see a list of the hostnames being used in the settings table by
running this mysql query

SELECT DISTINCT hostname FROM settings;


If you have just one combined  backend and frontend on the same machine
you will likely just have one result. If you run multiple remote
frontends then each one should be listed.


Paul H.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythtv-setup without UPNP searching for backend? [ In reply to ]
On 1/12/22 6:28 AM, Paul Harrison wrote:
>
> It will typically be the hostname of the backend. The same name you
> get if you run the command 'hostname'.
>
> You can see a list of the hostnames being used in the settings table
> by running this mysql query
>
> SELECT DISTINCT hostname FROM settings;
>
>
> If you have just one combined  backend and frontend on the same
> machine you will likely just have one result. If you run multiple
> remote frontends then each one should be listed.
>
>
> Paul H.


Thanks, that fixed it. On the Production backend, /etc/hostname =
'mythbuntu'. When I add that to the INSERT command and reboot I now see
the two backends currently running on my network, but only one has the
friendlyName I created.

This actually solves a secondary problem of connecting frontends to the
right backend. However, when I create a new test backend, I need to make
sure the other backends or offline at that moment. mythtv-setup seems to
always find the backend that is NOT 127.0.0.1.

Jim A


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org