<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-forward-container">
      <table class="moz-email-headers-table" cellspacing="0"
        cellpadding="0" border="0">
        <tbody>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
        </tbody>
      </table>
      On 20/06/2023 14:45, Peter Bennett wrote:<br>
      <blockquote type="cite"><br>
        On 6/20/23 08:44, John wrote:<br>
        <blockquote type="cite">On 19/06/2023 22:16, Peter Bennett
          wrote:<br>
          <blockquote type="cite"><br>
            On 6/19/23 13:31, John wrote:<br>
            <blockquote type="cite">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?<br>
              <blockquote type="cite"><br>
                Peter<br>
                <br>
                _______________________________________________<br>
                <br>
              </blockquote>
              Yes it successfully forces startup in web mode.<br>
              <br>
              With my incompatible database the backend still exits with<br>
              <br>
              Jun 19 16:45:07 rip-MS-7817 mythbackend:
              mythbackend[31215]: I CoreContext schemawizard.cpp:117
              (Compare) Current MythTV Schema Version (DBSchemaVer):
              1376<br>
              Jun 19 16:45:07 rip-MS-7817 mythbackend:
              mythbackend[31215]: W CoreContext dbcheck.cpp:403
              (UpgradeTVDatabaseSchema) Not allowed to upgrade the
              database.<br>
              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...<br>
              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.<br>
              Jun 19 16:45:07 rip-MS-7817 mythbackend:
              mythbackend[31215]: I CoreContext mythpowerdbus.cpp:73
              (~MythPowerDBus) PowerDBus: Closing interfaces<br>
              <br>
              I think this issue has always been there but it is always
              fixed by a run of mythtv-setup<br>
              <br>
              <a class="moz-txt-link-freetext" href="https://forum.mythtv.org/viewtopic.php?p=15895#p15895">https://forum.mythtv.org/viewtopic.php?p=15895#p15895</a><br>
              <br>
              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.<br>
              <br>
              After that the Backend starts in web mode and I can fix my
              incompatible hardware configuration without problems.<br>
              <br>
              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).<br>
              <br>
              Otherwise only the channels in the first mux are found.<br>
              <br>
              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.<br>
              <br>
              <br>
              <br>
            </blockquote>
            The problem with it thinking it is a slave is caused by your
            hostname not matching the setting for master server name.<br>
            <br>
            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.<br>
            <br>
            Peter<br>
            <br>
          </blockquote>
          Yes i am installing on a new machine with a database from
          another machine with a different name, tuners and ip
          addresses.<br>
          <br>
          Import the database from the production  machine using.<br>
          <br>
               mythconverg_restore.pl --verbose --drop_database
          --create_database --filename .....<br>
          <br>
          Change the hostname to match the new machine<br>
          <br>
              mythconverg_restore.pl --change_hostname
          --old_hostname="tv" --new_hostname="old-tv"<br>
          <br>
          Running mythtv-setup to upgrade the schema.<br>
          <br>
          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<br>
          <br>
          This ports to the new machine all my recordings and schedules.<br>
          <br>
          <br>
          <br>
          to change the name in the database.<br>
          <br>
          Then using the web interface to change the ip address ans set
          it as Master Server.<br>
          <br>
          <br>
          <br>
        </blockquote>
        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.<br>
        <br>
        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.<br>
        <br>
        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.<br>
        <br>
        It may then hang trying to connect to the nonexistant master
        server. You may need to use the webonly option to avoid this.<br>
        <br>
        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.<br>
        <br>
        Peter<br>
        <br>
        <br>
      </blockquote>
      mythbackend run from command line as user mythtv<br>
      <br>
       /usr/bin/mythbackend --quiet --syslog local7 -v record,channel
      --webonly<br>
      <br>
      This version of MythTV requires an updated database. (schema is 2
      versions behind)<br>
      <br>
      Please run mythtv-setup or mythbackend to update your database.<br>
      <br>
      Database Host: 192.168.0.135<br>
      Database Name: mythconverg<br>
      <br>
      <br>
    </div>
  </body>
</html>