[mythtv-users] Mythbackend not starting automatically

Jack McGee jack at greendesk.net
Fri Sep 16 02:26:00 UTC 2016


On 09/15/2016 01:54 PM, Mike Bibbings wrote:
> On 15/09/16 19:05, Jack McGee wrote:
>> This is Mythtv .28 on Ubuntu 16.04. separate backend and frontend. 
>> Many fits and starts after upgrade to 16.04 but finally got it running.
>> It still does not want to start automatically:
>>
>> I can start mythbackend after startup with systemctl start 
>> mythtv-backend but it will not start automatically. It appear it is 
>> starting before mysql?
>>
>>
>
> This has been recently discussed on a mythtv thread:
> http://www.gossamer-threads.com/lists/mythtv/users/602276
>
> Here is the solution I used (it is similar to that in the mythtv 
> thread but is slightly easier to setup, no creation of directory and 
> file, it uses systemd built-in functionality). This change should 
> continue to work when mythtv is updated.
>
> In a terminal on the machine running mythtv backend:
>
> sudo systemctl enable NetworkManager-wait-online.service
> sudo systemctl edit mythtv-backend.service
>
> Then paste the following 2 lines
> [Unit]
> After=NetworkManager-wait-online.service
>
> Then exit from the edit screen (it uses nano by default, so Ctrl+x, 
> then y, then Return key)
>
> Now reboot the system (sudo reboot)
>
> Mike
>


That did not work for me:

mythuser at amethi:/var/log/mythtv$ sudo systemctl cat mythtv-backend.service
# /lib/systemd/system/mythtv-backend.service
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
After=mysqld.service network.target

[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/mythtv-backend.service.d/override.conf
[Unit]
After=NetworkManager-wait-online.service

and after reboot:

ythuser at amethi:/var/log/mythtv$ systemctl status mythtv-backend
● mythtv-backend.service - MythTV Backend
    Loaded: loaded (/lib/systemd/system/mythtv-backend.service; enabled; 
vendor preset: enabled)
   Drop-In: /etc/systemd/system/mythtv-backend.service.d
            └─override.conf
    Active: inactive (dead) (Result: exit-code) since Thu 2016-09-15 
21:12:42 CDT; 5min ago
      Docs: https://www.mythtv.org/wiki/Mythbackend
   Process: 3427 ExecStart=/usr/bin/mythbackend --quiet --syslog local7 
$ADDITIONAL_ARGS (code=exited, status=130)
  Main PID: 3427 (code=exited, status=130)


mythuser at amethi:/var/log/mythtv$ sudo systemctl status 
NetworkManager-wait-online.service
● NetworkManager-wait-online.service - Network Manager Wait Online
    Loaded: loaded 
(/lib/systemd/system/NetworkManager-wait-online.service; enabled; vendor 
preset: enabled)
    Active: active (exited) since Thu 2016-09-15 21:12:28 CDT; 10min ago
      Docs: man:nm-online(1)
  Main PID: 1037 (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/NetworkManager-wait-online.service

Sep 15 21:12:23 amethi systemd[1]: Starting Network Manager Wait Online...
Sep 15 21:12:28 amethi systemd[1]: Started Network Manager Wait Online.


I guess I don't understand why network manager has to start if mysql and 
mythbackend are on same machine.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160915/e4feaeb0/attachment-0001.html>


More information about the mythtv-users mailing list