Mailing List Archive

web setup -- alternate port / slave backend
Hi All,

With current master, what is the correct way to set up a slave backend?

Are alternate ports supported? If so, what steps are needed? With
mythbackend starting up for the first time expecting a web connection, I
assume a "--port" option of some sort would be necessary to get mythbackend
listening on the correct port, but I don't see anything like that as an
option, so I assume that is not supported yet.

I would like to run multiple instances of mythbackend on the same hardware.
I have done this in the past with multiple master backends. This time I
want to do it with a combination of master and slave backends.

Thanks,

John
Re: web setup -- alternate port / slave backend [ In reply to ]
On Tue, 14 Nov 2023 18:30:34 -0800, you wrote:

>Hi All,
>
>With current master, what is the correct way to set up a slave backend?
>
>Are alternate ports supported? If so, what steps are needed? With
>mythbackend starting up for the first time expecting a web connection, I
>assume a "--port" option of some sort would be necessary to get mythbackend
>listening on the correct port, but I don't see anything like that as an
>option, so I assume that is not supported yet.
>
>I would like to run multiple instances of mythbackend on the same hardware.
>I have done this in the past with multiple master backends. This time I
>want to do it with a combination of master and slave backends.
>
>Thanks,
>
>John

Have you considered using network namespaces? That way each backend
can have a separate network running on the same machine, and each will
still use the same standard port numbers.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: web setup -- alternate port / slave backend [ In reply to ]
On Wed, Nov 15, 2023 at 12:17?AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Tue, 14 Nov 2023 18:30:34 -0800, you wrote:
>
> >Hi All,
> >
> >With current master, what is the correct way to set up a slave backend?
> >
> >Are alternate ports supported? If so, what steps are needed? With
> >mythbackend starting up for the first time expecting a web connection, I
> >assume a "--port" option of some sort would be necessary to get
> mythbackend
> >listening on the correct port, but I don't see anything like that as an
> >option, so I assume that is not supported yet.
> >
> >I would like to run multiple instances of mythbackend on the same
> hardware.
> >I have done this in the past with multiple master backends. This time I
> >want to do it with a combination of master and slave backends.
> >
> >Thanks,
> >
> >John
>
> Have you considered using network namespaces? That way each backend
> can have a separate network running on the same machine, and each will
> still use the same standard port numbers.


I had not. I have never done that before but it sounds like an interesting
solution. I will look into it.

Thanks!

John
Re: web setup -- alternate port / slave backend [ In reply to ]
On 11/14/23 21:30, John P Poet wrote:
> Hi All,
>
> With current master, what is the correct way to set up a slave backend?
>
> Are alternate ports supported? If so, what steps are needed? With
> mythbackend starting up for the first time expecting a web connection,
> I assume a "--port" option of some sort would be necessary to get
> mythbackend listening on the correct port, but I don't see anything
> like that as an option, so I assume that is not supported yet.
>
> I would like to run multiple instances of mythbackend on the same
> hardware. I have done this in the past with multiple master backends.
> This time I want to do it with a combination of master and slave backends.
>
> Thanks,
>
> John
>
>
> _______________________________________________

Hi John

If you start mythbackend in a new install with empty database, it will
listen on the default port, 6544 so that you can use the web app to
perform setup. You can then change the backend status port and other
ports as you need. After restarting it will use the new ports if you
changed them.

To set up a slave backend on the same machine with different ports, you
may have to shut down the master backend that uses default ports while
you do the setup on the slave backend and change its ports. Once changed
you could start both backends.

Alternatively you may be able to set an override on the port number via
the -O option on myhbackend and the appropriate setting strings for the
settings that hold  the port numbers.

Some method is needed to give the slave backend a different name, via a
different config.xml. Either it can run under a different user id or it
can use a MYTHCONFDIR environment variable to set a location where the
config.xml will be found.

For a test setup you can use my scripts that automate the creation of
multiple setups on one machine, at
https://github.com/MythTV/packaging/tree/master/deb-light#developing-and-testing


If there is a missing part in the web app setup,  please  let me know so
I can fix it.

Peter


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: web setup -- alternate port / slave backend [ In reply to ]
On Wed, Nov 15, 2023 at 8:15?PM Peter Bennett <pb.mythtv@gmail.com> wrote:

>
> On 11/14/23 21:30, John P Poet wrote:
> > Hi All,
> >
> > With current master, what is the correct way to set up a slave backend?
> >
> > Are alternate ports supported? If so, what steps are needed? With
> > mythbackend starting up for the first time expecting a web connection,
> > I assume a "--port" option of some sort would be necessary to get
> > mythbackend listening on the correct port, but I don't see anything
> > like that as an option, so I assume that is not supported yet.
> >
> > I would like to run multiple instances of mythbackend on the same
> > hardware. I have done this in the past with multiple master backends.
> > This time I want to do it with a combination of master and slave
> backends.
> >
> > Thanks,
> >
> > John
> >
> >
> > _______________________________________________
>
> Hi John
>
> If you start mythbackend in a new install with empty database, it will
> listen on the default port, 6544 so that you can use the web app to
> perform setup. You can then change the backend status port and other
> ports as you need. After restarting it will use the new ports if you
> changed them.
>
> To set up a slave backend on the same machine with different ports, you
> may have to shut down the master backend that uses default ports while
> you do the setup on the slave backend and change its ports. Once changed
> you could start both backends.
>
> Alternatively you may be able to set an override on the port number via
> the -O option on myhbackend and the appropriate setting strings for the
> settings that hold the port numbers.
>
> Some method is needed to give the slave backend a different name, via a
> different config.xml. Either it can run under a different user id or it
> can use a MYTHCONFDIR environment variable to set a location where the
> config.xml will be found.
>
> For a test setup you can use my scripts that automate the creation of
> multiple setups on one machine, at
>
> https://github.com/MythTV/packaging/tree/master/deb-light#developing-and-testing
>
>
> If there is a missing part in the web app setup, please let me know so
> I can fix it.
>
> Peter
>

Thank you Peter. I didn't want to shut down the running master and had
forgotten about the -O option. I should be able to get it all working and
will let you know if I run into any issues.

John