Remapping channel numbers

i know the devs are crazy busy, and they've mentioned a few times now when many of us have asked for the ability to do this that it's on their agenda...but they don't know when (and probably not anytime soon). so, i decided to work this out on my own to give us all the ability to do so until they get a chance to do it themselves...

enjoy!

7 Likes

That's awesome. I took a different approach but get the same results. Nice job.

2 Likes

working on an enhancement to this that will by default use the docker container names for linking between containers rather than IP address (which should improve the speed a bit), but will also still allow for creating an external M3U that will use the server IP for the individual channel links (for outputting to emby or similar). should have it ready shortly.

3 Likes

I am having a problem when trying to access the main app. I can access the backend and frontend containers by IP and PORT. But when I go to the PHP app it fails when trying to communicate with the backend container.

use the actual server IP as the backend ip in the .env file, not 127.0.0.1 or localhost.

127.0.0.1 won't work because it's being called from the container, not the server itself. the backend is a different container from the mapper. the enhancement I mentioned earlier to use container names will fix this.

if you want to test the enhanced version, pull the internalExternal branch.

i changed the CHANNELS_BACKEND_IP env var to CHANNELS_SERVER_IP for better clarity on what it actually does, and there should be an option for both internal and external playlists (the internal one is what will feed the channels frontend, and should have the same URL as it did previously).

1 Like

How can this run on the synology server in docker

i have no idea, i don't have a synology NAS to know how their docker is different. if anyone else can help, feel free...

this might help...

1 Like

I get this error after I build:

sudo docker-compose up --build -d

Step 8/13 : RUN useradd -G www-data,root -u $uid -d /home/$user $user
---> Running in 83edb7ed6338
useradd: invalid user ID '-d'
ERROR: Service 'mapper' failed to build: The command '/bin/sh -c useradd -G www-data,root -u $uid -d /home/$user $user' returned a non-zero code: 3

if that's in synology they must be doing something different somewhere. i tested this before putting it up on two different linux distros from start to finish, and it worked perfectly on both of them.

does anyone else here know what kind of differences synology has in place as far as how their docker implementation differs from a standard linux distro?

On my Mac Docker it runs to the end but not on the DS720+

i'm guessing that the fact you're building it as root has something to do with it. does synology require you to run docker-compose as root?

other than that, i wonder if docker on the synology NAS is having a hard time expanding the variables there, for whatever reason.

if you can run docker-compose as a regular user, try that first. if you absolutely have to run it as root, try changing that line in the Dockerfile to this:

RUN useradd -G www-data,root -u 1000 -d /home/mapper mapper

and then run the docker-compose up --build -d again.

if I run as a reg user this is what I originally got:

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

1 Like

that sounds like the regular user isn't part of the docker group. try this (from the last post in the following link - i believe these have to be run as root):

Add user to docker group:

# synogroup --add docker <your_username>

Change ownership of docker socket to the docker group:

# chown root:docker /var/run/docker.sock

you might have to reboot after that, not sure. at the very least, you'll probably have to restart docker.

It ran to the end with the first change but with some error. Just got to go through them.

issues with the channels-frontend and channels-mapper containers

1st error
debconf: delaying package configuration, since apt-utils is not installed

2nd
warning: mbstring (mbstring.so) is already loaded!

at the end

Status: Downloaded newer image for fancybits/channels-dvr:tve
Creating channels-mapper ... error
Creating channels-frontend ...
Creating channels-mapper-db ...
Creating channels-backend ...
Creating channels-frontend ... error
Creating channels-mapper-db ... done
8d0afbd4a5f2a7c89780e8c61): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use

ERROR: for channels-frontend Cannot start service channels-frontend: driver failed programming external connectivity on endpoint channels-frontend (cf5b2efc39c7ae610297e69dCreating channels-backend ... done

ERROR: for mapper Cannot start service mapper: driver failed programming external connectivity on endpoint channels-mapper (ef3164d7f6361e5220c701257a096a5bc7dc88a8d0afbd4a5f2a7c89780e8c61): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use

ERROR: for channels-frontend Cannot start service channels-frontend: driver failed programming external connectivity on endpoint channels-frontend (cf5b2efc39c7ae610297e69dc74cdeed8a7afea4cc83d930624653898da7a21d): Error starting userland proxy: listen tcp 0.0.0.0:8089: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Docker log

Start container channels-mapper failed: {"message":"driver failed programming external connectivity on endpoint channels-mapper (fd26f4a300ac75a92a64daa219da0c9494e849b82d08ffbff71a0ad95803bfbb): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use"}.

12/02/2020 07:06:47 pm Error Carlos

My biggest problem I am already runnin Channels dvr outside of docker

those errors are telling you that you already have stuff running on those ports, so docker can't attach to them. the other instance of channels you have running is why it can't do port 8089, do you have some other web service on port 80?

can you access the backend instance at port 8090?

turned off my channels server 8089 and still looking for port 80
I guess it can't run with a non docker channels dvr?