CMS with Traefik

CMS Version

4.0.6

Installation Method

Docker Method

Operating System

Docker on Unraid

Issue

Hello.

Could I please have an example of how to correctly setup a traefik 2 rule for use with CMS? Does anyone here have a full working setup I could please see the docker compose for please? Plus the rules/ middleware you used for traefik or the labels within the the docker compose for traefik use with CMS?

Im currently running a operational traefik proxy that works fine for my sites, however I’m a bit lost on what im missing for the case of CMS.

I have setup a basic no auth or middleware rule to just forward xibo.domain to port 10200 of docker host, which is pointing to port 80 of the CMS-web container.

I have not looked how this would work with XMR yet, perhaps more complexity? How does the screen software know to look for the XMR domain name?

On the local network to the docker host, going to 192.168.2.4:10200 displays the xibo web UI and I can login successfully. However when connecting with a device off the LAN, LTE connection phone (wifi off) I can see the login, but when I select to login I get.

“Sorry the form has expired. Please refresh.”

For my test screen, I’m using the android apk with the phone connected via WAN LTE (not on the wifi) and was provided a key for entering into the CMS webui Add Screen.

This worked fine, the domain and code is shown in the android app and the phone shows up in displays on CMS
I then authorised the screen in CMS.
Clicked Connect to CMS on the phone, and I get http error 500.
Connecting the phone to WiFi, i can select in the android app Connect to CMS successfully (the prompt appears asking for license key for start trial).

I have run the troubleshoot debug capture tool. I can login fine on my phone when connect via wifi, through the traefik router fine. When connecting via LTE / non local connection is when I hit issues. From the debug log included below. Plus I have uploaded the zip file here: https://file.io/ZsrVp7KQEW3J. This log shows the success login via wifi, then failed attempts via LTE on the same device.

Login with username xibo_admin
Password checked out OK
xibo_admin user logged in.
Error reading session: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'remoteAddr' at row 1
Audit Trail message recorded for User with id 1. Message: Login Granted from IP 2001:8004:12c2:9f19:4006:97bf:1dee:9268
Redirect to /
"Request stats: {
    "default": {
        "select": 4,
        "update": 2,
        "commit": 1
    },
    "log": {
        "insert": 8
    },
    "audit": {
        "insert": 1
    },
    "connections": 1,
    "length": 0.1212458610534668,
    "memoryUsage": 3212536,
    "peakMemoryUsage": 3256696
}."
Error reading session: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'remoteAddr' at row 1
not in public routes, expired, should redirect to login
"Request stats: {
    "default": {
        "select": 1,
        "commit": 1
    },
    "log": {
        "insert": 2
    },
    "connections": 1,
    "length": 0.015883207321166992,
    "memoryUsage": 2555376,
    "peakMemoryUsage": 3093744
}."
Error reading session: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'remoteAddr' at row 1

Just bumping this one. Anyone have suggestions on the error?

Thanks @ProServ !

Did you solve your final issue you mentioned regards clients downloading layouts?

Also, what did you change to solve the other two issues you had?

Ill give your setup a try!.
Edit: i made the changes i believe are required to my setup as per your setup, but I get the same error for the SQL as above when connecting remotely.

Unfortunately no.

For 2 problems resolved,

  1. I forgot to open XMR port (9505) on the Traefik service
  2. I publish ports on host mode
    ports:
      - target: 80
        published: 80
        protocol: tcp
        mode: host
      - target: 9505
        published: 9505
        protocol: tcp
        mode: host

Where are you see your logs ?

Strangely, on a brand new v4 installation, it works.

I used the in built troubleshooting log collection in the CMS web ui.

I will give this a try soon also!

Edit: i was already on 4.0.6, i started on this.

Give your yml file. (treafik and xibo)

Sorry it took so long to reply. Hope you are still ok to take a look at my issue.
I have provided my setup files and rules, redacted the passwords/API keys and domain names.

https://file.io/K5UOCMC9sM1Q Link valid for 2 months.

Too many informations (env, …) with complex configurations (Oauth, …)

I’ll try to send you my simpler configuration.

The first error I see is that port 9505 is not open on the traefik container.

ports:
  - target: 80
    published: 80
    protocol: tcp
    mode: host
  - target: 443
    published: 443
    protocol: tcp
    mode: host
  - target: 8080
    published: 8082
    protocol: tcp
    mode: host

Look my reponse here: CMS with Traefik - #6 by ProServ

Also, you use env variables not existing:

environment:
      - TZ=$TZ

In the xibo.yml file, try to remove these lines:

- traefik.constraint-label=pst-traefik
- traefik.http.routers.xibo3-rtr-bypass.priority=100
- traefik.http.routers.xibo3-rtr-bypass.middlewares=chain-no-auth@file

And change this line:
- traefik.http.routers.xibo3-rtr-bypass.service=xibo3-svc

With this:
- traefik.http.routers.xibo3-http.service=xibo3-svc

I think that with these modifications/fixes, and by adding ports 9505 as input to the Traefik container, it should work.

Thanks for your suggestions. Still no good when connecting to the CMC via a remote IP address.
Thanks for your time :slight_smile:

I moved CMC to docker on another computer and instead of using traefik, I have setup a cloudflare tunnel. This works perfect!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.