Jump to content

Emby 8096 port refused docker container


Go to solution Solved by mshaik,

Recommended Posts

Posted (edited)

Hi I have a raspberry pi 4 with Open Media vault installed and trying to run a emby docker container via portainer. The Container shows running and the logs good, but when I try to reach the <ipaddress>:8096, I always see Connection refused. Tried doing curl for localhost:8096 got the following :

curl: (7) Failed to connect to 172.17.0.3 port 8096: Connection refused

 

This is my compose:

---
version: "2.3"
services:
  emby:
    image: ghcr.io/linuxserver/emby:4.6.4.0-ls90
    container_name: emby
    network_mode: host
    environment:
      - PUID=1001
      - PGID=100
      - TZ=US/Eastern
      - UNMASK=022
    ports:
      - 8096:8096
      - 8920:8920
    volumes:
      - /srv/dev-disk-by-uuid-32d9b906-d378-4166-8fc0-387e0a7d5fd2/Data/Emby/Config:/config
      - /srv/dev-disk-by-uuid-32d9b906-d378-4166-8fc0-387e0a7d5fd2/Data/Emby/Movies:/data/movies
      - /srv/dev-disk-by-uuid-32d9b906-d378-4166-8fc0-387e0a7d5fd2/Data/Emby/Photos:/data/photos
      - /srv/dev-disk-by-uuid-2ac3c9e9-ee7f-4403-ac81-d1b38c841df8/FlashDrive2/Data/Animated:/data/animated
      - /srv/dev-disk-by-uuid-cc6fd87a-1e94-4440-bf81-a9aae216459a/SecondarySSD/Emby/Atmos:/data/atmos
    restart: unless-stopped

 

Tried checking ports  

sudo lsof -i -P -n | grep LISTEN
systemd       1            root   25u  IPv4  11278      0t0  TCP *:111 (LISTEN)
systemd       1            root   27u  IPv6  11281      0t0  TCP *:111 (LISTEN)
systemd-r   456 systemd-resolve   12u  IPv4  18124      0t0  TCP *:5355 (LISTEN)
systemd-r   456 systemd-resolve   14u  IPv6  18127      0t0  TCP *:5355 (LISTEN)
systemd-r   456 systemd-resolve   17u  IPv4  18130      0t0  TCP 127.0.0.53:53 (LISTEN)
rpcbind     822            _rpc    4u  IPv4  11278      0t0  TCP *:111 (LISTEN)
rpcbind     822            _rpc    6u  IPv6  11281      0t0  TCP *:111 (LISTEN)
sshd        826            root    3u  IPv4  19993      0t0  TCP *:22 (LISTEN)
sshd        826            root    4u  IPv6  19995      0t0  TCP *:22 (LISTEN)
rpc.mount   828            root    9u  IPv4  20002      0t0  TCP *:57583 (LISTEN)
rpc.mount   828            root   11u  IPv6  20006      0t0  TCP *:39043 (LISTEN)
rpc.mount   828            root   13u  IPv4  20010      0t0  TCP *:59693 (LISTEN)
rpc.mount   828            root   15u  IPv6  20014      0t0  TCP *:33951 (LISTEN)
rpc.mount   828            root   17u  IPv4  20018      0t0  TCP *:45533 (LISTEN)
rpc.mount   828            root   19u  IPv6  20022      0t0  TCP *:44535 (LISTEN)
nginx       845            root    8u  IPv6  20766      0t0  TCP *:80 (LISTEN)
nginx       846        www-data    8u  IPv6  20766      0t0  TCP *:80 (LISTEN)
nginx       847        www-data    8u  IPv6  20766      0t0  TCP *:80 (LISTEN)
nginx       849        www-data    8u  IPv6  20766      0t0  TCP *:80 (LISTEN)
nginx       851        www-data    8u  IPv6  20766      0t0  TCP *:80 (LISTEN)
docker-pr  1214            root    4u  IPv4  24836      0t0  TCP *:9000 (LISTEN)
docker-pr  1220            root    5u  IPv6  24841      0t0  TCP *:9000 (LISTEN)
docker-pr  1258            root    4u  IPv4  25715      0t0  TCP *:8000 (LISTEN)
docker-pr  1268            root    4u  IPv6  24869      0t0  TCP *:8000 (LISTEN)
docker-pr 19312            root    4u  IPv4  77333      0t0  TCP *:8920 (LISTEN)
docker-pr 19319            root    4u  IPv6  77338      0t0  TCP *:8920 (LISTEN)
docker-pr 19333            root    4u  IPv4  79132      0t0  TCP *:8096 (LISTEN)
docker-pr 19339            root    4u  IPv6  77343      0t0  TCP *:8096 (LISTEN)

 

Here's the network details of the Docker Container:

 sudo iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  172.17.0.0/16        0.0.0.0/0
MASQUERADE  tcp  --  172.17.0.2           172.17.0.2           tcp dpt:9000
MASQUERADE  tcp  --  172.17.0.2           172.17.0.2           tcp dpt:8000
MASQUERADE  tcp  --  172.17.0.3           172.17.0.3           tcp dpt:8920
MASQUERADE  tcp  --  172.17.0.3           172.17.0.3           tcp dpt:8096

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

Chain DOCKER (2 references)
target     prot opt source               destination
RETURN     all  --  0.0.0.0/0            0.0.0.0/0
DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:9000 to:172.17.0.2:9000
DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8000 to:172.17.0.2:8000
DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8920 to:172.17.0.3:8920
DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8096 to:172.17.0.3:8096

 

Container statrup logs:

 

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01-envfile: executing... ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing... ,
,
-------------------------------------,
          _         (),
         | |  ___   _    __,
         | | / __| | |  /  \,
         | | \__ \ | | | () |,
         |_| |___/ |_|  \__/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support LSIO projects visit:,
https://www.linuxserver.io/donate/,
-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid:    1001,
User gid:    100,
-------------------------------------,
,
,
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,
,
Your DockerHost is most likely running an outdated version of libseccomp,
,
To fix this, please visit https://docs.linuxserver.io/faq#libseccomp,
,
Some apps might not behave correctly without this,
,
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 30-config: executing... ,
[cont-init.d] 30-config: exited 0.,
[cont-init.d] 40-gid-video: executing... ,
[cont-init.d] 40-gid-video: exited 0.,
[cont-init.d] 90-custom-folders: executing... ,
[cont-init.d] 90-custom-folders: exited 0.,
[cont-init.d] 99-custom-scripts: executing... ,
[custom-init] no custom files found exiting...,
[cont-init.d] 99-custom-scripts: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.

 

I have portainer running in docker on port 9000 and it works perfectly fine. Tried installing several times using network_mode host and bridge, also using various emby tags i.e latest ,4.6.4.0

 

I tried installing emby normally without docker and it works perfectly, but I want to deploy via docker container and have proxy and ssl certificates over the container.

DockerInspect.txt

image.thumb.png.e0a2489b1e791ce2e80b922da921906f.png

Edited by mshaik
added new logs
Posted

I also checked the noexec issue for the mounts and they don't have noexec, Here's the fstab details.

 

  <mntent>
        <uuid>270f1e9f-e6ac-467b-8295-784f12f5b871</uuid>
        <fsname>/dev/disk/by-uuid/32d9b906-d378-4166-8fc0-387e0a7d5fd2</fsname>
        <dir>/srv/dev-disk-by-uuid-32d9b906-d378-4166-8fc0-387e0a7d5fd2</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
      <mntent>
        <uuid>9f093f04-3562-4a43-a531-286cf5cf9cb0</uuid>
        <fsname>/dev/disk/by-uuid/2ac3c9e9-ee7f-4403-ac81-d1b38c841df8</fsname>
        <dir>/srv/dev-disk-by-uuid-2ac3c9e9-ee7f-4403-ac81-d1b38c841df8</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
      <mntent>
        <uuid>49ee608c-0c89-47d8-83bd-034fc7609f66</uuid>
        <fsname>/dev/disk/by-uuid/cc6fd87a-1e94-4440-bf81-a9aae216459a</fsname>
        <dir>/srv/dev-disk-by-uuid-cc6fd87a-1e94-4440-bf81-a9aae216459a</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
      <mntent>
        <uuid>61cb6955-2bdb-469c-bcf8-6d177d5877e5</uuid>
        <fsname>/dev/disk/by-uuid/0297fbbf-88fe-42bb-9fe5-f8edbfad68a2</fsname>
        <dir>/srv/dev-disk-by-uuid-0297fbbf-88fe-42bb-9fe5-f8edbfad68a2</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
    </fstab>

Posted

Did the emby server start and create a log?

 

Posted

Have you made sure that the runtime user (PUID) can write to the /config volume?

I don't know why you're using the Linuxserver docker image though it could be a Pi thing. If not then you should be using the official Emby image.

 

  • Solution
Posted

I am using Debian Emby only, I found the issue anyhow, the issue with Raspberry Pi has old library for the following. Updated it and used backport and everything works cool now.

 

Solution
  • Raspbian has a version of libseccomp2 that is too old to support running a docker container based on Ubuntu 20.04, which both hotio and LinuxServer use as their base for v3. You either need to use --privileged, update libseccomp2 from Ubuntu or get a better OS (We recommend Ubuntu 20.04 arm64)
 

Possible Solution:

 

Managed to fix the issue by installing the backport from debian repo. Generally not recommended to use backport in blanket upgrade mode. Installation of a single package may be ok but may also cause issues. So got to understand what you are doing.

 

Steps to fix:

 

First ensure you are running Raspbian buster e.g using lsb_release -a

 

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

 

Just run the following Command:

wget http://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1~bpo10+1_armhf.deb

 

sudo dpkg -i libseccomp2_2.5.1-1~bpo10+1_armhf.deb

 

Once this is installed, the docker will work as expected.

 

 

Posted

Glad you figured it out. Thanks for the feedback.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...