linuxserver / docker-tvheadend

GNU General Public License v3.0
167 stars 89 forks source link

Tag 172 and 173 Crash After Pulling Guide #91

Closed OtisPresley closed 6 years ago

OtisPresley commented 6 years ago

I am running Docker 18.03.1-ce on Ubuntu 18.04.1 LTS inside a Hyper-V VM with /config and /recordings being on a CIFS share to the underlying Server 2016 host. The TVHeadend Docker image with tag 165 is running perfectly using Schedules Direct as the EPG grabber. When I upgrade to images with tag 172 or 173, a crash occurs after the EPG grabber runs and TVHeadend reloads...it the continues to crash and reload. Here is the docker run command extracted from docker inspect:

docker run --name tvheadend \
   -v /mnt/SHARE/Containers/tvheadend:/config \
   -v /mnt/SHARE/Media/Recordings:/recordings \
   -p 9981:9981/tcp \
   -p 9982:9982/tcp -P \
   --net host \
   --restart always \
   -h docker \
   --expose 9981/tcp \
   --expose 9982/tcp \
   -e 'PGID=0' \
   -e 'PUID=0' \
   -e 'TZ=America/New_York' \
   -e 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
   -e 'PS1=$(whoami)@$(hostname):$(pwd)$ ' \
   -e 'HOME=/config' \
   -e 'TERM=xterm' -d \
   --entrypoint "/init" linuxserver/tvheadend:165

Here are the logs:

2018-08-01 11:02:35.480 [   INFO] scanfile: DVB-S - loaded 1 regions with 113 networks
2018-08-01 11:02:35.480 [   INFO] scanfile: DVB-T - loaded 44 regions with 1125 networks
2018-08-01 11:02:35.480 [   INFO] scanfile: DVB-C - loaded 18 regions with 60 networks
2018-08-01 11:02:35.480 [   INFO] scanfile: ATSC-T - loaded 2 regions with 12 networks
2018-08-01 11:02:35.480 [   INFO] scanfile: ATSC-C - loaded 1 regions with 5 networks
2018-08-01 11:02:35.480 [   INFO] scanfile: ISDB-T - loaded 2 regions with 1297 networks
2018-08-01 11:04:34.000 [   INFO] xmltv: /usr/bin/tv_grab_na_dd: grab /usr/bin/tv_grab_na_dd
2018-08-01 11:04:34.001 [   INFO] spawn: Executing "/usr/bin/tv_grab_na_dd"
2018-08-01 11:04:34.836 [  ERROR] spawn: using config filename /config/.xmltv/tv_grab_na_dd.conf
2018-08-01 11:04:43.327 [  ERROR] spawn: Fetching from Schedules Direct    Fetched 17135 k/bytes in 8 seconds
2018-08-01 11:05:18.968 [  ERROR] spawn: loading data: ##################################################
2018-08-01 11:05:18.968 [  ERROR] spawn: NOTE: Your subscription will expire: 2018-09-04T23:35:13Z
2018-08-01 11:05:50.618 [  ERROR] spawn: Writing schedule: #################################################
2018-08-01 11:05:50.618 [  ERROR] spawn: Downloaded 31038 programs in 76 seconds
2018-08-01 11:05:51.652 [   INFO] xmltv: /usr/bin/tv_grab_na_dd: grab took 78 seconds
2018-08-01 11:05:51.654 [  ALERT] CRASH: Signal: 11 in PRG: /usr/bin/tvheadend (4.3-1292~g9b9ee6859) [409f1b4611c4e57beba8a57d83f4fe8105ef3293] CWD: /run/s6/services/tvheadend  2018-08-01 11:05:52.039 [   INFO] main: Log started
2018-08-01 11:05:52.059 [   INFO] http: Starting HTTP server 0.0.0.0:9981
2018-08-01 11:05:52.059 [   INFO] htsp: Starting HTSP server 0.0.0.0:9982
2018-08-01 11:05:52.099 [   INFO] config: loaded
j0nnymoe commented 6 years ago

What happens when you spin up a those tags with a fresh /config folder? Wondering if it's an issue with the upgrade or the container from fresh.

Also, I don't think you need all those -e options and you don't need to list the ports if you are running in host mode.

OtisPresley commented 6 years ago

Thanks for your response!

It does stay up with a fresh /config folder, but a fresh folder means no config. I was able to enable the tuners and pull guide data after configuring tv_grab_na_dd without a crash.

Also did some cleanup of failed and missing recordings under the old /config, but the crash still happens. Looks like it will be a long process trying to figure out what in there is causing the crash without losing data.

You are right about not needing the -e and -p options. I keep the ports in case I want to switch to the bridge network. The environment options are there because I extracted the docker run command from the inspect output.

tobbenb commented 6 years ago

Also, don't run the container as root. Having the config on a cifs share is also not recommanded as al sort of issues might happen. If you have an issue with the two latest tags, it's most likely a tvheadend problem. Check their issue tracker for any bug reports.

As long as you don't need a feature or a bug fix in the development branch (that our latest tag follows), I suggest you use the stable realease-4.2 tag.

OtisPresley commented 6 years ago

Is there any issue with data migration from 4.3 to release-4.2, or would I have to start fresh?

tobbenb commented 6 years ago

It might or might not work. We don't follow the development of tvheadend that close, so can't say. Backup your /config mount and try.

OtisPresley commented 6 years ago

Here is what I have done:

  1. Moved the files onto the Docker host filesystem
  2. Changed the PGID to a regular user
  3. Mounted the CIFS share as that same regular user (The recordings still go there)

After doing that, the results are still the same, including with tag 174 and release-4.2. I am just going to stay on tag 165 until such a time as I can start over without losing the existing recordings and my wife being very unhappy.

Sp0rtsFr3ak commented 6 years ago

I have this same problem. Only fix was to revert back to 165. I am running this on Unraid and completely wiped the container and config folders and started from scratch. As soon as it finishes "writing" the schedule, it crashes. Problem is, it never actually writes the schedule. So after it restarts, it tries to fetch the schedule again and when it gets to the point of "writing" the schedule, it crashes again. The guide never has data in it and it enters a constant crash loop. It also makes watching live tv or recording anything, impossible. Because every 3-5 minutes, when it crashes and restarts, so does the stream.

tobbenb commented 6 years ago

When you are running latest, you are using the development branch and crashes and bugs are to be expected. Try running the stable tag instead.