Mailing List Archive

Fwd: New web app for setup and replacement for mythweb -- Force start in setup mode
On 20/06/2023 14:45, Peter Bennett wrote:
>
> 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
>
>
mythbackend run from command line as user mythtv

 /usr/bin/mythbackend --quiet --syslog local7 -v record,channel --webonly

This version of MythTV requires an updated database. (schema is 2
versions behind)

Please run mythtv-setup or mythbackend to update your database.

Database Host: 192.168.0.135
Database Name: mythconverg
Re: Fwd: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 6/20/23 12:41, John wrote:
> mythbackend run from command line as user mythtv
>
>  /usr/bin/mythbackend --quiet --syslog local7 -v record,channel --webonly
>
> This version of MythTV requires an updated database. (schema is 2
> versions behind)
>
> Please run mythtv-setup or mythbackend to update your database.
>
> Database Host: 192.168.0.135
> Database Name: mythconverg

John

Thank you for testing this. I re-created the situation and  I see there
is still a problem with this. I need to do some more testing to figure
out the best way to handle it.

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: Fwd: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 6/21/23 09:45, Peter Bennett wrote:
>
> On 6/20/23 12:41, John wrote:
>> mythbackend run from command line as user mythtv
>>
>>  /usr/bin/mythbackend --quiet --syslog local7 -v record,channel
>> --webonly
>>
>> This version of MythTV requires an updated database. (schema is 2
>> versions behind)
>>
>> Please run mythtv-setup or mythbackend to update your database.
>>
>> Database Host: 192.168.0.135
>> Database Name: mythconverg
>
> John
>
> Thank you for testing this. I re-created the situation and  I see
> there is still a problem with this. I need to do some more testing to
> figure out the best way to handle it.
>
> Peter
>
I have added support for slave backends in the web app and instructions
for what to do if a server is incorrectly identified as a slave backend.
Hopefully it is now OK.

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: Fwd: New web app for setup and replacement for mythweb -- Force start in setup mode [ In reply to ]
On 23/06/2023 17:50, Peter Bennett wrote:
>
> On 6/21/23 09:45, Peter Bennett wrote:
>>
>> On 6/20/23 12:41, John wrote:
>>> mythbackend run from command line as user mythtv
>>>
>>>  /usr/bin/mythbackend --quiet --syslog local7 -v record,channel
>>> --webonly
>>>
>>> This version of MythTV requires an updated database. (schema is 2
>>> versions behind)
>>>
>>> Please run mythtv-setup or mythbackend to update your database.
>>>
>>> Database Host: 192.168.0.135
>>> Database Name: mythconverg
>>
>> John
>>
>> Thank you for testing this. I re-created the situation and  I see
>> there is still a problem with this. I need to do some more testing to
>> figure out the best way to handle it.
>>
>> Peter
> I have added support for slave backends in the web app and
> instructions for what to do if a server is incorrectly identified as a
> slave backend. Hopefully it is now OK.
>
> Peter
>
> __

yes it works ....

mythbackend version: master [v34-Pre-309-gf08f21853c]

the console output is confusingly the same as before

This version of MythTV requires an updated database. (schema is 2
versions behind)

Please run mythtv-setup or mythbackend to update your database.

the log is clear however

(run_setup_webserver) ***** MythBackend starting in webapp only mode for
initial setup




_______________________________________________
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