Jump to content

Trouble accessing Emby (Docker)


Recommended Posts

Posted

I'm running Emby via Docker and I'm having trouble accessing it after doing a fresh installation. According to Portainer the container is running fine and is accessible at 8097/8921 however neither ports seem to work. Installed via docker run:

docker run -d \
    --name EMBY \
    --volume /srv/dev-disk-by-uuid-c9f22411-0f63-468f-8b04-b5fea4076bd7/DOCKER/DATA/EMBY:/config \
    --volume /srv/dev-disk-by-uuid-c9f22411-0f63-468f-8b04-b5fea4076bd7:/data/D1 \
    --volume /srv/dev-disk-by-uuid-74a1f680-17c1-4ff6-8550-f83d6ed294e3:/data/D2 \
    --volume /srv/dev-disk-by-uuid-398A66CB28B66039:/data/D3 \
    --volume /srv/dev-disk-by-uuid-EAA4F920A4F8F045:/data/D4 \
    --publish 8097:8097 \
    --publish 8921:8921 \
    --env UID=1000 \
    --env GID=100 \
    emby/embyserver:latest

Anything wrong here?

Q-Droid
Posted

It could the be the network driver running in the wrong mode which by default is bridge. Below is the docker run example for the official image.

From: https://hub.docker.com/r/emby/embyserver

docker run -d \
    --name embyserver \
    --volume /path/to/programdata:/config \ # Configuration directory
    --volume /path/to/share1:/mnt/share1 \ # Media directory
    --volume /path/to/share2:/mnt/share2 \ # Media directory
    --net=host \ # Enable DLNA and Wake-on-Lan
    --device /dev/dri:/dev/dri \ # VAAPI/NVDEC/NVENC render nodes
    --device /dev/vchiq:/dev/vchiq \ # MMAL/OMX on Raspberry Pi
    --runtime=nvidia \ # Expose NVIDIA GPUs
    --publish 8096:8096 \ # HTTP port
    --publish 8920:8920 \ # HTTPS port
    --env UID=1000 \ # The UID to run emby as (default: 2)
    --env GID=100 \ # The GID to run emby as (default 2)
    --env GIDLIST=100 \ # A comma-separated list of additional GIDs to run emby as (default: 2)
    emby/embyserver:latest

 

Posted
35 minutes ago, Q-Droid said:

It could the be the network driver running in the wrong mode which by default is bridge. Below is the docker run example for the official image.

From: https://hub.docker.com/r/emby/embyserver

docker run -d \
    --name embyserver \
    --volume /path/to/programdata:/config \ # Configuration directory
    --volume /path/to/share1:/mnt/share1 \ # Media directory
    --volume /path/to/share2:/mnt/share2 \ # Media directory
    --net=host \ # Enable DLNA and Wake-on-Lan
    --device /dev/dri:/dev/dri \ # VAAPI/NVDEC/NVENC render nodes
    --device /dev/vchiq:/dev/vchiq \ # MMAL/OMX on Raspberry Pi
    --runtime=nvidia \ # Expose NVIDIA GPUs
    --publish 8096:8096 \ # HTTP port
    --publish 8920:8920 \ # HTTPS port
    --env UID=1000 \ # The UID to run emby as (default: 2)
    --env GID=100 \ # The GID to run emby as (default 2)
    --env GIDLIST=100 \ # A comma-separated list of additional GIDs to run emby as (default: 2)
    emby/embyserver:latest

 

It is indeed running in default, however, this has worked before. Adding --net=host returns:

Published ports are discarded when using host network mode

It then refuses to start.

Q-Droid
Posted

If it worked before then what changed? And what is the fresh install?

The "Published ports..." message should have been a warning and not prevented startup. So I wonder if there's a port conflict.

Go back to your original run and if it starts can you attach the emby server log?

 

 

Posted
57 minutes ago, Q-Droid said:

If it worked before then what changed? And what is the fresh install?

The "Published ports..." message should have been a warning and not prevented startup. So I wonder if there's a port conflict.

Go back to your original run and if it starts can you attach the emby server log?

 

 

I did a OS disk format for other reasons. Docker setup is the same. How do I retrieve Emby server logs without accessing the web interface?

Q-Droid
Posted

A fresh OS install (which distro?) could also have an active firewall by default. So check the status of firewalld.

The server logs would be under the host path that maps to this volume: "    --volume /srv/dev-disk-by-uuid-c9f22411-0f63-468f-8b04-b5fea4076bd7/DOCKER/DATA/EMBY:/config \"

 

Posted (edited)
59 minutes ago, Q-Droid said:

A fresh OS install (which distro?) could also have an active firewall by default. So check the status of firewalld.

The server logs would be under the host path that maps to this volume: "    --volume /srv/dev-disk-by-uuid-c9f22411-0f63-468f-8b04-b5fea4076bd7/DOCKER/DATA/EMBY:/config \"

 

OpenMediaVault (debian base). No firewall as far as I'm aware. Attached log of the server in the running container (no --host).

embyserver.txt

Edited by Meltx103
Q-Droid
Posted

Okay. Here's what's happening...

2021-07-11 14:39:16.962 Info App: Adding HttpListener prefix http://+:8096/

Emby server is listening on port 8096 but you're mapping host port 8097 to container port 8097. You can change the mapping to 8097:8096 and then should be able to connect. Or easier yet just use the defaults for Emby http 8096/https 8920 for both the host and container ports in your run command (or compose).

Or if you absolutely want to keep the legacy config then edit the system.xml file (/config/config/system.xml) to match the ports to the values you want then restart.

  <HttpServerPortNumber>8096</HttpServerPortNumber>
  <HttpsPortNumber>8920</HttpsPortNumber>
 

 

Posted

Right it looks like you changed the ports in your docker config, but you still need to configure that in emby server as well. Or just go back to the defaults.

Posted
1 hour ago, Q-Droid said:

Okay. Here's what's happening...

2021-07-11 14:39:16.962 Info App: Adding HttpListener prefix http://+:8096/

Emby server is listening on port 8096 but you're mapping host port 8097 to container port 8097. You can change the mapping to 8097:8096 and then should be able to connect. Or easier yet just use the defaults for Emby http 8096/https 8920 for both the host and container ports in your run command (or compose).

Or if you absolutely want to keep the legacy config then edit the system.xml file (/config/config/system.xml) to match the ports to the values you want then restart.

  <HttpServerPortNumber>8096</HttpServerPortNumber>
  <HttpsPortNumber>8920</HttpsPortNumber>
 

 

Thanks, this did the trick. Have something running on 8096, which is why I changed it.

  • Like 1
Posted

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...