Mailing List Archive

Two master backends on the same network?
Is it possible to have 2 master backends on the same network? Although
the reason why is kind of a long story, I'm trying to do this
temporarily. But when I start the backend on the new computer it says
it's starting in slave mode. It also can not connect to the database,
which makes sense because it uses a different password.

I've gone into the settings and put in either 127.0.0.1 for the ip
address for that computer, but it didn't help. Can mythtv find other
instances of the backend over the network even without being told the
ip address for it? Any way I can get this backend to run as a master
even with the other one still present?

Thanks,
Jon
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
On 2/15/2014 5:38 PM, Jon N wrote:
> Is it possible to have 2 master backends on the same network? Although
> the reason why is kind of a long story, I'm trying to do this
> temporarily. But when I start the backend on the new computer it says
> it's starting in slave mode. It also can not connect to the database,
> which makes sense because it uses a different password.
>
> I've gone into the settings and put in either 127.0.0.1 for the ip
> address for that computer, but it didn't help. Can mythtv find other
> instances of the backend over the network even without being told the
> ip address for it? Any way I can get this backend to run as a master
> even with the other one still present?

Each cluster has only one database, and that database defines one master
backend. If you intend to operate two master backends, they will need
separate databases and will operate separate clusters. The two will be
unable to share content between each other.

The only issue with running two clusters on one common network is in the
UPnP auto-detection. When no database is specified, frontends and
backends alike will attempt to find the master backend using UPnP. When
successful, they then query the master backend for the database
credentials it is using, and try to use that themselves. The PIN number
you can configure in mythtv-setup is intended to prevent
auto-configuration from hooking into the wrong cluster. A PIN of 0000
turns off protection, and allows anything to query those credentials.
An empty PIN disables auto-configuration entirely, and allows nothing to
query those credentials.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
> On 16 Feb 2014, at 9:16 am, "Raymond Wagner" <raymond@wagnerrp.com> wrote:
>
..snip..
>
> The only issue with running two clusters on one common network is in the UPnP auto-detection. When no database is specified, frontends and backends alike will attempt to find the master backend using UPnP. When successful, they then query the master backend for the database credentials it is using, and try to use that themselves. The PIN number you can configure in mythtv-setup is intended to prevent auto-configuration from hooking into the wrong cluster. A PIN of 0000 turns off protection, and allows anything to query those credentials. An empty PIN disables auto-configuration entirely, and allows nothing to query those credentials.
> _______________________________________________
So is that the correct way to build a new replacement BE while the old BE is in operation (or alternatively to have a test BE and a production BE)? Clear the pin from all BE's and just make sure the FE's have the correct configuration present? Like the OP I want to have two Master BE present on the network - at least until cutover. Once cutover I was half thinking of keeping the old BE as a testbed provided it wasn't going to cause me undue problems.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
On 2/15/2014 6:18 PM, Mark Perkins wrote:
> So is that the correct way to build a new replacement BE while the old BE is in operation

If you wish to test out all the hardware and software ahead of time, yes.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
On Sat, Feb 15, 2014 at 6:33 PM, Raymond Wagner <raymond@wagnerrp.com> wrote:
> On 2/15/2014 6:18 PM, Mark Perkins wrote:
>>
>> So is that the correct way to build a new replacement BE while the old BE
>> is in operation
>
>
> If you wish to test out all the hardware and software ahead of time, yes.
>

It was set to 0000 on the old box, removing it did the trick.
Although I still have a least a couple of other problems with the new
box, but that is for a new thread I think.

Thanks,
Jon
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
Hoi Jon,

Sunday, February 16, 2014, 2:11:41 AM, you wrote:

> On Sat, Feb 15, 2014 at 6:33 PM, Raymond Wagner <raymond@wagnerrp.com> wrote:
>> On 2/15/2014 6:18 PM, Mark Perkins wrote:
>>>
>>> So is that the correct way to build a new replacement BE while the old BE
>>> is in operation
>>
>>
>> If you wish to test out all the hardware and software ahead of time, yes.
>>

> It was set to 0000 on the old box, removing it did the trick.
> Although I still have a least a couple of other problems with the new
> box, but that is for a new thread I think.

> Thanks,
> Jon
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


You have by your previous action contaminated your database. I would
appreciate input by people who know how how to solve it.
The contamination is not desastreus. But the not belonging backends
are now in there. And could cause problems in the future.

Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens
--

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
A suggestion to the developers:
Add an option to te masterbackend to remove a front or backend from
the database. Only to the master and with all the questions about
being sure in duplex.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
Hoi Hika,

Sunday, February 16, 2014, 5:14:49 AM, you wrote:

> A suggestion to the developers:
> Add an option to te masterbackend to remove a front or backend from
> the database. Only to the master and with all the questions about
> being sure in duplex.



I'm a developer myself and I see it with questions asked about
possible transverse to a new name.?

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
On Sat, Feb 15, 2014 at 11:02 PM, Hika van den Hoven <hikavdh@gmail.com> wrote:
> Hoi Jon,
>
>
> You have by your previous action contaminated your database. I would
> appreciate input by people who know how how to solve it.
> The contamination is not desastreus. But the not belonging backends
> are now in there. And could cause problems in the future.
>
> Tot mails,
> Hika mailto:hikavdh@gmail.com
>

So just by attempting to start the backend when it 'saw' the other
backend on the network caused an entry in the database that may in the
future cause problems? Well, in this case I am lucky. When I get
ready to use the new machine as the only front/backend I hope to just
replace whatever current database it has with a backup (using the
backup/restore scripts that come with MythTV) from the old computer.

Although I have to admit I haven't researched this thoroughly, so at
this point I am guessing doing a restore of a database will completely
replace anything already there. And I have been having enough problems
with both the old and new systems that I would probably uninstall and
reinstalled MythTV on the new computer if necessary to get things
working well. Still, there are other hurtles to jump first.

Thanks,
Jon

PS. Now that I think of it, I would like to know how to fix it
anyway. My old and new computers have different hostnames and that is
something I was already warned would need changing when moving over
the existing database. I'm guessing the problem I already caused may
have some parallels.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
On 2/16/2014 12:03 AM, Jon N wrote:
> So just by attempting to start the backend when it 'saw' the other
> backend on the network caused an entry in the database that may in the
> future cause problems?

If the database is configured to accept connections remotely, and if the
database is configured to allow login from the remote machine using the
same credentials as the master backend, and if the master backend and
the new _frontend_ are running the same version of the database schema,
it might add a handful of options to the settings table. If you're
connecting a new _backend_ to the cluster, it should outright refuse to
run, since it has no configured IP address to listen on.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
> On 16 Feb 2014, at 3:48 pm, "Raymond Wagner" <raymond@wagnerrp.com> wrote:
>
>> On 2/16/2014 12:03 AM, Jon N wrote:
>> So just by attempting to start the backend when it 'saw' the other
>> backend on the network caused an entry in the database that may in the
>> future cause problems?
>
> If the database is configured to accept connections remotely, and if the database is configured to allow login from the remote machine using the same credentials as the master backend, and if the master backend and the new _frontend_ are running the same version of the database schema, it might add a handful of options to the settings table. If you're connecting a new _backend_ to the cluster, it should outright refuse to run, since it has no configured IP address to listen on.
> _______________________________________________
I think this can be checked easy enough. Someone else (hopefully) will confirm the command line syntax shortly (it was posted only a week or two ago in relation to a similar problem) but essentially a MySQL select distinct hostname from settings will show a list of hostnames present.

Where care will be required is if your desired hostname is already present (I believe) you will need to use mythconverg_backup.pl to move all those entries to a different placeholder name first, then use mythconverg_backup.pl a second time to move old hostname to new hostname. All this assumes that you will be migrating existing recordings over to the new system.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
>
>
>> On 16 Feb 2014, at 3:48 pm, "Raymond Wagner" <raymond@wagnerrp.com> wrote:
>>
>>> On 2/16/2014 12:03 AM, Jon N wrote:
>>> So just by attempting to start the backend when it 'saw' the other
>>> backend on the network caused an entry in the database that may in the
>>> future cause problems?
>>
>> If the database is configured to accept connections remotely, and if the database is configured to allow login from the remote machine using the same credentials as the master backend, and if the master backend and the new _frontend_ are running the same version of the database schema, it might add a handful of options to the settings table. If you're connecting a new _backend_ to the cluster, it should outright refuse to run, since it has no configured IP address to listen on.

The master backend was refusing the connection, the password is different.



On Sun, Feb 16, 2014 at 12:41 AM, Mark Perkins <perkins1724@hotmail.com> wrote:

> I think this can be checked easy enough. Someone else (hopefully) will confirm the command line syntax shortly (it was posted only a week or two ago in relation to a similar problem) but essentially a MySQL select distinct hostname from settings will show a list of hostnames present.
>
> Where care will be required is if your desired hostname is already present (I believe) you will need to use mythconverg_backup.pl to move all those entries to a different placeholder name first, then use mythconverg_backup.pl a second time to move old hostname to new hostname. All this assumes that you will be migrating existing recordings over to the new system.

OK, I think I got similar advice to this about a month ago when I
first thought I would be moving the database. But the database on the
original backend is corrupted and I am going to have to learn mysql
admin to fix it. I am not very confident of this, but I have no
choice, mythconveng_backup.pl exits with an error. If I can learn
enough to fix this problem changing the hostname when moving the
database between computers should be easy :-).

Thanks,
Jon
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Two master backends on the same network? [ In reply to ]
> But the database on the
> original backend is corrupted and I am going to have to learn mysql
> admin to fix it.
I think I remember that thread now you mention it. Are you still looking for help to resolve? I was interested in what the fix was (will be) as you never know when something similar will happen.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org