LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 12-24-2020, 07:56 AM   #1
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Mythtv Backend in Docker. Trouble with starting service.


Got it into a Docker, mostly. One problem is remaining though.

When the container starts and runs my entrypoint.sh it does everything except start the myth backend itself. All configuration, and the other services are started properly. If I enter the container to run the command manually.

Code:
service mythtv-backend start
It tells me the it's already running. If I try to stop it it says there is no process. It also isn't showing up on the top command inside the container. If I run

Code:
service mythtv-backend restart
It first complains that the service isn't running. Then it starts and away it goes like it's supposed to.

I'm probably not doing my entrypoint correctly. Here are my entrypoint & Dockerfile. Posting via ubuntupaste. I'm sure my service && bash is the wrong way to do it. It's worked on my other services thus far. I added that sleep thinking maybe it just needed to wait till the sql was fully running or something.

Dockerfile - https://paste.ubuntu.com/p/mpCnV3dBMv/
Entrypoint - https://paste.ubuntu.com/p/jDDSNFStCZ/

I'd appreciate any suggestions.

Last edited by jmgibson1981; 12-24-2020 at 07:59 AM.
 
Old 12-24-2020, 09:06 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Have you tried using systemctl instead of service?

I'd be interested in the output of
Code:
systemctl status mythtv-backend
systemctl start mythtv-backend
systemctl stop mythtv-backend
Also, I don't know where Mythtv's log files are, but it must have some. Perhaps the systemd journal. I would find out where they are and check for error messages. Furthermore, you can add set -x to your entrypoint script; it will show you each step that the script goes through. You can probably see its output by docker logs <CONTAINER-ID>.

Last edited by berndbausch; 12-24-2020 at 09:08 AM.
 
Old 12-29-2020, 09:09 AM   #3
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Sorry, took a few days. The reason I don't use Systemd is it is not normally used in Docker containers. I did however rebuild with rsyslog. Here is where the problem seems to be, rather the only Errors in the log.

Code:
Dec 29 15:04:32 mythsql mysqld: 2020-12-29 15:04:32 50 [ERROR] mysqld: Table './mythconverg/tvchain' is marked as crashed and should be repaired
Dec 29 15:04:32 mythsql mysqld: 2020-12-29 15:04:32 50 [Warning] Checking table:   './mythconverg/tvchain'
Dec 29 15:04:32 mythsql mysqld: 2020-12-29 15:04:32 80 [ERROR] mysqld: Table './mythconverg/oldprogram' is marked as crashed and should be repaired
Dec 29 15:04:32 mythsql mysqld: 2020-12-29 15:04:32 80 [Warning] Checking table:   './mythconverg/oldprogram'
Going to look into having a repair run before starting the myth backend.
 
Old 01-19-2021, 04:55 AM   #4
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Original Poster
Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
So I was way off on the error above. That turns out to be meaningless near as I can tell. I did however find the issue with the pid file not being removed on container stop. Existing pid file means failed restart requiring a manual service restart. Added this line to my entrypoint before the service start.

Code:
[ -f /run/mythtv/mythbackend.pid ] && rm /run/mythtv/mythbackend.pid
Have stopped and started several times now without issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Brother HL-2240-R Stopped - Backend /usr/lib/cups/backend/usb does not exist! jet222jet Linux - Hardware 2 12-28-2020 06:32 PM
How to access from docker worker node to service from docker manager node? burgas Linux - Newbie 2 11-29-2020 12:19 PM
[SOLVED] Starting File System .. Starting File System .. Starting File System .. Starting File rmknox Linux - Newbie 3 08-15-2010 11:30 PM
Turn KnoppMyth backend/frontend into backend only nebbus Linux - General 0 09-09-2007 01:57 AM
Mythtv backend server doesn't capture sound ranjo Linux - Software 2 08-26-2004 05:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 05:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration