Unable to connect to jellyfin and mattermost from android apps

Hello,
im using traefik 2.9.6 with docker/portainer with letsencrypt certificates. Im struggling for a while to connect jellyfin via the android app to my homeserver. Today i set up a instance of mattermost and i got a simmilar connection issue. I can reach both via the browser app from outside my network on the android phone without any problems. Do i need any special configuration to connect android apps?

http:
  routers:
    jellyfin:
      entrypoints:
        - "websecure"
      rule: "Host(`xxx.xxx.duckdns.org`)"
      tls:
        certResolver: production
      service: jellyfin
    mattermost:
      entrypoints:
        - "websecure"
      rule: "Host(`xxx.xxx.duckdns.org`)"
      tls:
        certResolver: production
      service: mattermost

    jellyfin:
      loadBalancer:
        servers:
          - url: "http://192.168.xx.xx:xx"
        passHostHeader: true
    mattermost:
      loadBalancer:
        servers:
          - url: "http://192.168.xx.xx:xx"
        passHostHeader: true

Im pretty new to traefik and to this forum, don't hit me to hard please. :slight_smile:

David

Enable Traefik debug log and access log. Check debug in general and both during access of your app.

Thank you fir your reply!

###access.log
# Mattermost not working
xx.xxx.xxx.xx - - [13/Feb/2023:08:50:53 +0000] "HEAD / HTTP/2.0" 405 0 "-" "-" 15 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
xx.xxx.xxx.xx - - [13/Feb/2023:08:51:08 +0000] "HEAD / HTTP/1.1" 308 18 "-" "-" 16 "web-to-websecure@internal" "-" 0ms
xx.xxx.xxx.xx - - [13/Feb/2023:08:51:08 +0000] "HEAD / HTTP/2.0" 405 0 "-" "-" 17 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
# Homeassistant working
xx.xxx.xxx.xx - - [13/Feb/2023:08:53:43 +0000] "POST /api/webhook/52978cba83ac2093691b26b082f3b35b7fd91145f4e17f13b7722cbeceba427c HTTP/2.0" 200 5641 "-" "-" 32 "homeassistant@file" "http://192.168.xxx.xxx:8123" 2ms
xx.xxx.xxx.xx - - [13/Feb/2023:08:53:43 +0000] "POST /api/webhook/52978cba83ac2093691b26b082f3b35b7fd91145f4e17f13b7722cbeceba427c HTTP/2.0" 201 17 "-" "-" 33 "homeassistant@file" "http://192.168.xxx.xxx:8123" 2ms
xx.xxx.xxx.xx - - [13/Feb/2023:08:53:44 +0000] "POST /api/webhook/52978cba83ac2093691b26b082f3b35b7fd91145f4e17f13b7722cbeceba427c HTTP/2.0" 201 17 "-" "-" 34 "homeassistant@file" "http://192.168.xxx.xxx:8123" 3ms
xx.xxx.xxx.xx - - [13/Feb/2023:08:53:44 +0000] "POST /api/webhook/52978cba83ac2093691b26b082f3b35b7fd91145f4e17f13b7722cbeceba427c HTTP/2.0" 201 17 "-" "-" 35 "homeassistant@file" "http://192.168.xxx.xxx:8123" 3ms
xx.xxx.xxx.xx - - [13/Feb/2023:08:53:44 +0000] "POST /api/webhook/52978cba83ac2093691b26b082f3b35b7fd91145f4e17f13b7722cbeceba427c HTTP/2.0" 200 152 "-" "-" 36 "homeassistant@file" "http://192.168.xxx.xxx:8123" 3ms

###traefik.log
time="2023-02-13T08:49:46Z" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2023-02-13T08:49:46Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2023-02-13T08:49:46Z" level=error msg="Error while starting server: accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2023-02-13T08:49:46Z" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik
time="2023-02-13T08:49:46Z" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik

Im sorry but im not really able to read this, I hope someone can help me out.

Can you try to get debug (not only error) and access log for the same request (at the exact same time)?
(When you don't enable writing to log-file for both logs, you will get the combined output in the container log.)

Can you also check the (debug?) logs of the target service for the same request?

There is no general .log written while the connection attempt happens.
image
The access.log still says:

ip.ip.ip.iop - - [13/Feb/2023:11:40:50 +0000] "POST /api/webhook/52978cba83ac2093691b26b082f3b35b7fd91145f4e17f13b7722cbeceba427c HTTP/2.0" 200 2 "-" "-" 56 "homeassistant@file" "http://192.168.xxx.xxx:8123" 3ms
ip.ip.ip.iop - - [13/Feb/2023:11:41:04 +0000] "HEAD / HTTP/2.0" 405 0 "-" "-" 57 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.iop - - [13/Feb/2023:11:41:19 +0000] "HEAD / HTTP/1.1" 308 18 "-" "-" 59 "web-to-websecure@internal" "-" 0ms
ip.ip.ip.iop - - [13/Feb/2023:11:41:19 +0000] "HEAD / HTTP/2.0" 405 0 "-" "-" 60 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms 

The access via the Smartphone Browser looks like this:

ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET / HTTP/2.0" 200 3132 "-" "-" 125 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/remote_entry.js?bt=1673646023898 HTTP/2.0" 200 8421 "-" "-" 126 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/main.c3e820c4592b8ba9b933.js HTTP/2.0" 200 19904 "-" "-" 127 "mattermost@file" "http://192.168.xxx.xxx:8065" 4ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/690.c1787ae427c0b0b050e0.js HTTP/2.0" 200 4917 "-" "-" 128 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/7779.aaff44e07a9d5e9d4efe.js HTTP/2.0" 200 1729 "-" "-" 129 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/6031.d122421e529e2be0db97.css HTTP/2.0" 200 8088 "-" "-" 133 "mattermost@file" "http://192.168.xxx.xxx:8065" 2ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/products/boards/remote_entry.js?bt=1673646023898 HTTP/2.0" 200 3832 "-" "-" 134 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/4022.faf54745d5208986fa13.css HTTP/2.0" 200 30964 "-" "-" 132 "mattermost@file" "http://192.168.xxx.xxx:8065" 5ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/53.3d5d29ac17955832929f.js HTTP/2.0" 200 34333 "-" "-" 131 "mattermost@file" "http://192.168.xxx.xxx:8065" 6ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/866.848ab0e8bccbc8e9b096.js HTTP/2.0" 200 162993 "-" "-" 130 "mattermost@file" "http://192.168.xxx.xxx:8065" 10ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/8581.a0f91cd20dca504c3c03.js HTTP/2.0" 200 78347 "-" "-" 137 "mattermost@file" "http://192.168.xxx.xxx:8065" 5ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/5280.88cd42f61809c833c226.css HTTP/2.0" 200 99936 "-" "-" 135 "mattermost@file" "http://192.168.xxx.xxx:8065" 5ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/7294.bf5224eea70136fe907b.js HTTP/2.0" 200 3000 "-" "-" 141 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/355.28f192d4237cc71a91fe.css HTTP/2.0" 200 1692 "-" "-" 136 "mattermost@file" "http://192.168.xxx.xxx:8065" 6ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/355.a19725047c7868063952.js HTTP/2.0" 200 7971 "-" "-" 140 "mattermost@file" "http://192.168.xxx.xxx:8065" 6ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/3935.18a9a49c5f7751f84993.js HTTP/2.0" 200 41892 "-" "-" 142 "mattermost@file" "http://192.168.xxx.xxx:8065" 5ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/9299.08e067cfbcacb2ded742.js HTTP/2.0" 200 10827 "-" "-" 149 "mattermost@file" "http://192.168.xxx.xxx:8065" 2ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/9769.9986c9fdc5f81db47e63.js HTTP/2.0" 200 30410 "-" "-" 139 "mattermost@file" "http://192.168.xxx.xxx:8065" 11ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/4494.735314148ff118e0882c.js HTTP/2.0" 200 5056 "-" "-" 143 "mattermost@file" "http://192.168.xxx.xxx:8065" 5ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/71.7f5629bdf6b2bf686b54.js HTTP/2.0" 200 3781 "-" "-" 145 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/5697.c0e4bd2da17acebc1bd5.js HTTP/2.0" 200 929 "-" "-" 144 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/2896.abc1a6748cbda7b9afc3.js HTTP/2.0" 200 344 "-" "-" 150 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/4279.f270f61759835a9e14d7.js HTTP/2.0" 200 17166 "-" "-" 148 "mattermost@file" "http://192.168.xxx.xxx:8065" 8ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/250.8b2200053d2a3e542e54.js HTTP/2.0" 200 6820 "-" "-" 147 "mattermost@file" "http://192.168.xxx.xxx:8065" 8ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/750.dd68f3ffaef5a1733e76.js HTTP/2.0" 200 35127 "-" "-" 146 "mattermost@file" "http://192.168.xxx.xxx:8065" 8ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/4779.7435a1b7c08c0198c96f.js HTTP/2.0" 200 207544 "-" "-" 138 "mattermost@file" "http://192.168.xxx.xxx:8065" 17ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/5529.123e64e91926b495fb31.js HTTP/2.0" 200 17194 "-" "-" 151 "mattermost@file" "http://192.168.xxx.xxx:8065" 8ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/7211.8cdf1b117be5814f1eec.css HTTP/2.0" 200 6399 "-" "-" 153 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/2710.30ca45747842072a033a.js HTTP/2.0" 200 26896 "-" "-" 155 "mattermost@file" "http://192.168.xxx.xxx:8065" 6ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/images/favicon/favicon-default-32x32.png HTTP/2.0" 200 1142 "-" "-" 158 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/7126.440baeea918bc7690041.js HTTP/2.0" 200 20214 "-" "-" 154 "mattermost@file" "http://192.168.xxx.xxx:8065" 6ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/704.a60e5d506d4901c72397.css HTTP/2.0" 200 43612 "-" "-" 157 "mattermost@file" "http://192.168.xxx.xxx:8065" 8ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/7211.d27c100d363fdaff1d68.js HTTP/2.0" 200 356562 "-" "-" 152 "mattermost@file" "http://192.168.xxx.xxx:8065" 21ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/704.97c802b4226062429af7.js HTTP/2.0" 200 1230620 "-" "-" 156 "mattermost@file" "http://192.168.xxx.xxx:8065" 54ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/7402.17796c24fd9eb16fad0a.js HTTP/2.0" 200 5365 "-" "-" 160 "mattermost@file" "http://192.168.xxx.xxx:8065" 2ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/6821.22dcf80d372562ac29e0.js HTTP/2.0" 200 858 "-" "-" 162 "mattermost@file" "http://192.168.xxx.xxx:8065" 4ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/3565.fd18ed360b40565ccd12.js HTTP/2.0" 200 25569 "-" "-" 159 "mattermost@file" "http://192.168.xxx.xxx:8065" 5ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/2936.2e8652457bb10bcefdda.js HTTP/2.0" 200 41754 "-" "-" 161 "mattermost@file" "http://192.168.xxx.xxx:8065" 6ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /api/v4/license/client?format=old HTTP/2.0" 200 22 "-" "-" 164 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /api/v4/config/client?format=old HTTP/2.0" 200 1313 "-" "-" 163 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /api/v4/plugins/webapp HTTP/2.0" 200 1333 "-" "-" 165 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/files/code_themes/7654b55b2f3442e914047bab6d9617cb.css HTTP/2.0" 200 1309 "-" "-" 166 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/plugins/com.mattermost.calls/com.mattermost.calls_fe787ec593a92478_bundle.js HTTP/2.0" 200 612396 "-" "-" 168 "mattermost@file" "http://192.168.xxx.xxx:8065" 29ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/plugins/focalboard/focalboard_d33c618ade577cf5_bundle.js HTTP/2.0" 200 1190412 "-" "-" 169 "mattermost@file" "http://192.168.xxx.xxx:8065" 60ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:23 +0000] "GET /static/plugins/playbooks/playbooks_d734de4ac51008d3_bundle.js HTTP/2.0" 200 1326605 "-" "-" 167 "mattermost@file" "http://192.168.xxx.xxx:8065" 64ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /plugins/playbooks/api/v0/settings HTTP/2.0" 401 15 "-" "-" 170 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /plugins/focalboard/api/v2/clientConfig HTTP/2.0" 200 851 "-" "-" 171 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/3723.fe99ba36caba103459e6.js HTTP/2.0" 200 3057 "-" "-" 172 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/files/17a50e2f200ecc8c4a58557603654d89.svg HTTP/2.0" 200 4175 "-" "-" 174 "mattermost@file" "http://192.168.xxx.xxx:8065" 2ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/files/34c82b247a366d047105491d979556bf.png HTTP/2.0" 200 137094 "-" "-" 173 "mattermost@file" "http://192.168.xxx.xxx:8065" 4ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/Metropolis-SemiBold.woff2 HTTP/2.0" 404 19 "-" "-" 176 "mattermost@file" "http://192.168.xxx.xxx:8065" 0ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/files/3bd5f5c5dd54ccb0c7c26a01c3e99235.woff2 HTTP/2.0" 200 43261 "-" "-" 177 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/files/3c9c38b500586f2d033d6cc1055e45fb.woff2 HTTP/2.0" 200 44961 "-" "-" 175 "mattermost@file" "http://192.168.xxx.xxx:8065" 3ms
ip.ip.ip.ip - - [13/Feb/2023:11:49:24 +0000] "GET /static/files/2958b47a121a8bd748c4605ce1f27097.woff HTTP/2.0" 200 17689 "-" "-" 178 "mattermost@file" "http://192.168.xxx.xxx:8065" 1ms

What do you mean by target service? Im not able to debug the mattermost app in my setup atm.

The Android app seems to do a HTTP HEAD request and you get a status 405 back.

405 Method Not Allowed

But to me it`s not clear if that comes from Traefik or your mattermost server.

In the Traefik docs HEAD is mentioned, so I would assume it is just passed on to the target service.

Rule `Method(`GET`, ...)`
Check if the request method is one of the given methods (GET, POST, PUT, DELETE, PATCH, HEAD)

Therefore I recommend to check the logs of your target service.

Could it be, that the redirection from http requests to https is messing it up?
I do:

entryPoints:
  web:
    address: :80
    # (Optional) Redirect to HTTPS
    # ---
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https

  websecure:
    address: :443

Should i allow the http?

As I sayed, im not able to debug the app on my phone.

##EDIT##
Same "fault" after I removed the redirection.

I mean debug mattermost server to see if it receives any forwarded requests from the Android device.

I can connect via ip. The mattermost log says:

{"timestamp":"2023-02-13 13:34:47.240 Z","level":"info","msg":"api endpoint requires a license","caller":"web/context.go:115","path":"/api/v4/users/ok8ptgudf8sdfn3wg6x64sgf9o/groups","request_id":"cy1rxi3nbb9sdfasdjpqdus75h","ip_addr":"192.168.xxx.xxx","user_id":"ok8ptgu7asdfa87wg6x64sgf9o","method":"GET","err_where":"","http_code":501,"error":": api endpoint requires a license"}

If i try to connect via URL, nothing in the mattermost log.

Mattermost log is in DEBUG as well.

####EDIT####
It worked once. After reopening the app the server is unreachable.
###########
I don't know what exactly the problem was but i solved it by changing the Listen Address in Mattermost from:
127.0.0.1:8065
to:
*192.168.0.69:8065 <- IP Address from the Server *

Thank you for your help, i learned a lot about logging today!

Workaround:
Using Nginx Proxy Manager.
No additional setup needed.

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