Mailing List Archive

New web app for setup and replacement for mythweb -- Force start in setup mode
mythtv-light_34~Pre-280-g3efbdee593-0_amd64_jammy

No problems encountered with a new clean database .

However I wanted to check that an upgrade of an existing database was ok.

On attempting to import my production datbase MythTV Schema Version
(DBSchemaVer): 1376.

I had issues which I could only rectify in mythtv-setup. This is to be
expected as the two machines have a different tuner configuration.

The problem was that the backend either wouldn't start due to

(UpgradeTVDatabaseSchema) Not allowed to upgrade the database.

Ran mythtv-setup, which did the schema upgrade fine.

The backend then crashed on startup due to the incompatible tuner
configuration.

Deleted all tuners in mythtv-setup then reconfigured using the web
interface without problems.

So a means of forcing the backend to start in configuration mode is needed.







_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 6/18/23 08:27, John wrote:
> mythtv-light_34~Pre-280-g3efbdee593-0_amd64_jammy
>
> No problems encountered with a new clean database .
>
> However I wanted to check that an upgrade of an existing database was ok.
>
> On attempting to import my production datbase MythTV Schema Version
> (DBSchemaVer): 1376.
>
> I had issues which I could only rectify in mythtv-setup. This is to be
> expected as the two machines have a different tuner configuration.
>
> The problem was that the backend either wouldn't start due to
>
> (UpgradeTVDatabaseSchema) Not allowed to upgrade the database.
>
> Ran mythtv-setup, which did the schema upgrade fine.
>
> The backend then crashed on startup due to the incompatible tuner
> configuration.
>
> Deleted all tuners in mythtv-setup then reconfigured using the web
> interface without problems.
>
> So a means of forcing the backend to start in configuration mode is
> needed.
>
>
>
If you start mythbackend with an out of date schema. it should update
the schema. It normally prompts the operator for whether to update the
schema. Perhaps that defaulted to "no" ?

For the crash due to incompatible tuner configuration - what you suggest
makes sense, you need a way to get into configuration mode. I will set
up a command line option for that.

Peter

_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 18/06/2023 14:40, Peter Bennett wrote:
>
> On 6/18/23 08:27, John wrote:
>> mythtv-light_34~Pre-280-g3efbdee593-0_amd64_jammy
>>
>> No problems encountered with a new clean database .
>>
>> However I wanted to check that an upgrade of an existing database was
>> ok.
>>
>> On attempting to import my production datbase MythTV Schema Version
>> (DBSchemaVer): 1376.
>>
>> I had issues which I could only rectify in mythtv-setup. This is to
>> be expected as the two machines have a different tuner configuration.
>>
>> The problem was that the backend either wouldn't start due to
>>
>> (UpgradeTVDatabaseSchema) Not allowed to upgrade the database.
>>
>> Ran mythtv-setup, which did the schema upgrade fine.
>>
>> The backend then crashed on startup due to the incompatible tuner
>> configuration.
>>
>> Deleted all tuners in mythtv-setup then reconfigured using the web
>> interface without problems.
>>
>> So a means of forcing the backend to start in configuration mode is
>> needed.
>>
>>
>>
> If you start mythbackend with an out of date schema. it should update
> the schema. It normally prompts the operator for whether to update the
> schema. Perhaps that defaulted to "no" ?
>
> For the crash due to incompatible tuner configuration - what you
> suggest makes sense, you need a way to get into configuration mode. I
> will set up a command line option for that.
>
> Peter
>
> _______________________________________________
> 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

Just did an in place update of my Production backend, worked fine.

Out of interest the backend refused to update the schema because of
"Couldn't upgrade database to new schema on slave backend." Whatever
that implies - I did have a slave backend in the past but as I said the
inplace upgrade worked.

Could you post on Orangedox a compatible android
mythfrontend-20230430-arm64-v34-Pre-126-g5ca1329491.apk

That version doesn't support schema version 1378

Many thanks

_______________________________________________
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: New web app for setup and replacement for mythweb -- General Layout [ In reply to ]
The web pages are great using a desktop with a large screen but on a
tablet there is a lot of static screen space lost.

Can the outer boarder with the mythtv logo and the sidebar with
home,settings and guide be made scroll-able.


_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 6/18/23 09:40, Peter Bennett wrote:
>
> On 6/18/23 08:27, John wrote:
>> mythtv-light_34~Pre-280-g3efbdee593-0_amd64_jammy
>>
>> No problems encountered with a new clean database .
>>
>> However I wanted to check that an upgrade of an existing database was
>> ok.
>>
>> On attempting to import my production datbase MythTV Schema Version
>> (DBSchemaVer): 1376.
>>
>> I had issues which I could only rectify in mythtv-setup. This is to
>> be expected as the two machines have a different tuner configuration.
>>
>> The problem was that the backend either wouldn't start due to
>>
>> (UpgradeTVDatabaseSchema) Not allowed to upgrade the database.
>>
>> Ran mythtv-setup, which did the schema upgrade fine.
>>
>> The backend then crashed on startup due to the incompatible tuner
>> configuration.
>>
>> Deleted all tuners in mythtv-setup then reconfigured using the web
>> interface without problems.
>>
>> So a means of forcing the backend to start in configuration mode is
>> needed.
>>
>>
>>
> If you start mythbackend with an out of date schema. it should update
> the schema. It normally prompts the operator for whether to update the
> schema. Perhaps that defaulted to "no" ?
>
> For the crash due to incompatible tuner configuration - what you
> suggest makes sense, you need a way to get into configuration mode. I
> will set up a command line option for that.
>
> Peter
>
I have added a new command line option webonly to mythbackend startup
that starts it in web server only mode. Can you test whether this solves
the problem?

Peter

_______________________________________________
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: New web app for setup and replacement for mythweb -- General Layout [ In reply to ]
On 6/18/23 14:04, John wrote:
> The web pages are great using a desktop with a large screen but on a
> tablet there is a lot of static screen space lost.
>
> Can the outer boarder with the mythtv logo and the sidebar with
> home,settings and guide be made scroll-able.
>
>
It removes the left nav bar when running on a tablet or phone. You get
an icon at the top that will display the left nav bar menu when you need
it. See picture.

https://photos.app.goo.gl/o9cn5nh9NN78ci5B7

The top bar does not disappear.

Peter

_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
I have added a new command line option webonly to mythbackend startup
that starts it in web server only mode. Can you test whether this solves
the problem?
>
> Peter
>
> _______________________________________________
>
Yes it successfully forces startup in web mode.

With my incompatible database the backend still exits with

Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
CoreContext schemawizard.cpp:117 (Compare) Current MythTV Schema Version
(DBSchemaVer): 1376
Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: W
CoreContext dbcheck.cpp:403 (UpgradeTVDatabaseSchema) Not allowed to
upgrade the database.
Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
CoreContext schemawizard.cpp:296 (PromptForUpgrade) Console is
non-interactive, can't prompt user...
Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: E
CoreContext mythbackend_main_helpers.cpp:562 (run_backend) Couldn't
upgrade database to new schema on slave backend.
Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
CoreContext mythpowerdbus.cpp:73 (~MythPowerDBus) PowerDBus: Closing
interfaces

I think this issue has always been there but it is always fixed by a run
of mythtv-setup

https://forum.mythtv.org/viewtopic.php?p=15895#p15895

Running mythtv-setup prompts the user and updates the schema. Maybe the
conditional code in the Backend which wont allow the update in obscure
circumstances needs removing.

After that the Backend starts in web mode and I can fix my incompatible
hardware configuration without problems.

Ax I mentioned previously the channel scan is quite flaky but always
works if you delete all channels, clear all flags apart from Unencrypted
Only and go for a full scan (tuned).

Otherwise only the channels in the first mux are found.

A scan of existing transports didn't do much either but this all may be
due to a database imported from another PC so its not unreasonable to go
for a full clearout and rescan.



_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 6/19/23 13:31, John wrote:
> I have added a new command line option webonly to mythbackend startup
> that starts it in web server only mode. Can you test whether this
> solves the problem?
>>
>> Peter
>>
>> _______________________________________________
>>
> Yes it successfully forces startup in web mode.
>
> With my incompatible database the backend still exits with
>
> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
> CoreContext schemawizard.cpp:117 (Compare) Current MythTV Schema
> Version (DBSchemaVer): 1376
> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: W
> CoreContext dbcheck.cpp:403 (UpgradeTVDatabaseSchema) Not allowed to
> upgrade the database.
> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
> CoreContext schemawizard.cpp:296 (PromptForUpgrade) Console is
> non-interactive, can't prompt user...
> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: E
> CoreContext mythbackend_main_helpers.cpp:562 (run_backend) Couldn't
> upgrade database to new schema on slave backend.
> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
> CoreContext mythpowerdbus.cpp:73 (~MythPowerDBus) PowerDBus: Closing
> interfaces
>
> I think this issue has always been there but it is always fixed by a
> run of mythtv-setup
>
> https://forum.mythtv.org/viewtopic.php?p=15895#p15895
>
> Running mythtv-setup prompts the user and updates the schema. Maybe
> the conditional code in the Backend which wont allow the update in
> obscure circumstances needs removing.
>
> After that the Backend starts in web mode and I can fix my
> incompatible hardware configuration without problems.
>
> Ax I mentioned previously the channel scan is quite flaky but always
> works if you delete all channels, clear all flags apart from
> Unencrypted Only and go for a full scan (tuned).
>
> Otherwise only the channels in the first mux are found.
>
> A scan of existing transports didn't do much either but this all may
> be due to a database imported from another PC so its not unreasonable
> to go for a full clearout and rescan.
>
>
>
The problem with it thinking it is a slave is caused by your hostname
not matching the setting for master server name.

Please explain the process you are following. Are you installing mythtv
on a new machine with a database from another machine with a different
name, or did your machine name change? This may be an unusual situation
and I can make changes as necessary so that people who hit it are not
left unable to fix their setup.

Peter

_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 19/06/2023 22:16, Peter Bennett wrote:
>
> On 6/19/23 13:31, John wrote:
>> I have added a new command line option webonly to mythbackend startup
>> that starts it in web server only mode. Can you test whether this
>> solves the problem?
>>>
>>> Peter
>>>
>>> _______________________________________________
>>>
>> Yes it successfully forces startup in web mode.
>>
>> With my incompatible database the backend still exits with
>>
>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
>> CoreContext schemawizard.cpp:117 (Compare) Current MythTV Schema
>> Version (DBSchemaVer): 1376
>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: W
>> CoreContext dbcheck.cpp:403 (UpgradeTVDatabaseSchema) Not allowed to
>> upgrade the database.
>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
>> CoreContext schemawizard.cpp:296 (PromptForUpgrade) Console is
>> non-interactive, can't prompt user...
>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: E
>> CoreContext mythbackend_main_helpers.cpp:562 (run_backend) Couldn't
>> upgrade database to new schema on slave backend.
>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
>> CoreContext mythpowerdbus.cpp:73 (~MythPowerDBus) PowerDBus: Closing
>> interfaces
>>
>> I think this issue has always been there but it is always fixed by a
>> run of mythtv-setup
>>
>> https://forum.mythtv.org/viewtopic.php?p=15895#p15895
>>
>> Running mythtv-setup prompts the user and updates the schema. Maybe
>> the conditional code in the Backend which wont allow the update in
>> obscure circumstances needs removing.
>>
>> After that the Backend starts in web mode and I can fix my
>> incompatible hardware configuration without problems.
>>
>> Ax I mentioned previously the channel scan is quite flaky but always
>> works if you delete all channels, clear all flags apart from
>> Unencrypted Only and go for a full scan (tuned).
>>
>> Otherwise only the channels in the first mux are found.
>>
>> A scan of existing transports didn't do much either but this all may
>> be due to a database imported from another PC so its not unreasonable
>> to go for a full clearout and rescan.
>>
>>
>>
> The problem with it thinking it is a slave is caused by your hostname
> not matching the setting for master server name.
>
> Please explain the process you are following. Are you installing
> mythtv on a new machine with a database from another machine with a
> different name, or did your machine name change? This may be an
> unusual situation and I can make changes as necessary so that people
> who hit it are not left unable to fix their setup.
>
> Peter
>
Yes i am installing on a new machine with a database from another
machine with a different name, tuners and ip addresses.

Import the database from the production  machine using.

     mythconverg_restore.pl --verbose --drop_database --create_database
--filename .....

Change the hostname to match the new machine

    mythconverg_restore.pl --change_hostname --old_hostname="tv"
--new_hostname="old-tv"

Running mythtv-setup to upgrade the schema.

Using the web app to change the ip address, set as master backend, set
up tuners for this machine, scan for channels, set up file structures

This ports to the new machine all my recordings and schedules.



to change the name in the database.

Then using the web interface to change the ip address ans set it as
Master Server.



_______________________________________________
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: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 6/20/23 08:44, John wrote:
> On 19/06/2023 22:16, Peter Bennett wrote:
>>
>> On 6/19/23 13:31, John wrote:
>>> I have added a new command line option webonly to mythbackend
>>> startup that starts it in web server only mode. Can you test whether
>>> this solves the problem?
>>>>
>>>> Peter
>>>>
>>>> _______________________________________________
>>>>
>>> Yes it successfully forces startup in web mode.
>>>
>>> With my incompatible database the backend still exits with
>>>
>>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
>>> CoreContext schemawizard.cpp:117 (Compare) Current MythTV Schema
>>> Version (DBSchemaVer): 1376
>>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: W
>>> CoreContext dbcheck.cpp:403 (UpgradeTVDatabaseSchema) Not allowed to
>>> upgrade the database.
>>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
>>> CoreContext schemawizard.cpp:296 (PromptForUpgrade) Console is
>>> non-interactive, can't prompt user...
>>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: E
>>> CoreContext mythbackend_main_helpers.cpp:562 (run_backend) Couldn't
>>> upgrade database to new schema on slave backend.
>>> Jun 19 16:45:07 rip-MS-7817 mythbackend: mythbackend[31215]: I
>>> CoreContext mythpowerdbus.cpp:73 (~MythPowerDBus) PowerDBus: Closing
>>> interfaces
>>>
>>> I think this issue has always been there but it is always fixed by a
>>> run of mythtv-setup
>>>
>>> https://forum.mythtv.org/viewtopic.php?p=15895#p15895
>>>
>>> Running mythtv-setup prompts the user and updates the schema. Maybe
>>> the conditional code in the Backend which wont allow the update in
>>> obscure circumstances needs removing.
>>>
>>> After that the Backend starts in web mode and I can fix my
>>> incompatible hardware configuration without problems.
>>>
>>> Ax I mentioned previously the channel scan is quite flaky but always
>>> works if you delete all channels, clear all flags apart from
>>> Unencrypted Only and go for a full scan (tuned).
>>>
>>> Otherwise only the channels in the first mux are found.
>>>
>>> A scan of existing transports didn't do much either but this all may
>>> be due to a database imported from another PC so its not
>>> unreasonable to go for a full clearout and rescan.
>>>
>>>
>>>
>> The problem with it thinking it is a slave is caused by your hostname
>> not matching the setting for master server name.
>>
>> Please explain the process you are following. Are you installing
>> mythtv on a new machine with a database from another machine with a
>> different name, or did your machine name change? This may be an
>> unusual situation and I can make changes as necessary so that people
>> who hit it are not left unable to fix their setup.
>>
>> Peter
>>
> Yes i am installing on a new machine with a database from another
> machine with a different name, tuners and ip addresses.
>
> Import the database from the production  machine using.
>
>      mythconverg_restore.pl --verbose --drop_database
> --create_database --filename .....
>
> Change the hostname to match the new machine
>
>     mythconverg_restore.pl --change_hostname --old_hostname="tv"
> --new_hostname="old-tv"
>
> Running mythtv-setup to upgrade the schema.
>
> Using the web app to change the ip address, set as master backend, set
> up tuners for this machine, scan for channels, set up file structures
>
> This ports to the new machine all my recordings and schedules.
>
>
>
> to change the name in the database.
>
> Then using the web interface to change the ip address ans set it as
> Master Server.
>
>
>
The reason you have the problem with not being able to upgrade the
database is that the master backend is not set to your current backend
name. This leads mythbackend to conclude, incorrectly, that this is a
slave backend.

I believe the basic problem here is that you were running mythbackend as
a service, so that it could not prompt for upgrading the database.

Instead of running mythtv-setup to upgrade the database, you can run
mythbackend from a command line, with or without the --webonly option,
and it will tell you on the command line that you are running a slave
backend and ask if you would like to upgrade the database, keep the old
schema, and possibly other options. Respond that you want to upgrade the
database.

It may then hang trying to connect to the nonexistant master server. You
may need to use the webonly option to avoid this.

If this doesn't work I could change it to go into the webserver only
mode when it cannot upgrade the database, but I am reluctant because
that means you are running the webserver setup against an old schema,
and also it means possibly incorrect behavior for people who are
upgrading with a real slave backend.

Peter


_______________________________________________
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