-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bridged mode trouble #36
Comments
I've tried this, but it still doesn't work for me, it still can't find anything. There should be a possibility to manually specify a server, but apparently it's not available when no server can be found :O... Did this break with the new plex pass changes? btw @SecureBot by |
@Ismay How long did you give it before you tried and have you restarted the Go to https://plex.tv/pms/resources.xml and it will show you info about Also, I do mean the ip of the machine running the docker container. There is a harder way to get access to your server to configure it. You can On Thu, May 12, 2016 at 8:01 AM, Ismay notifications@github.com wrote:
|
Pretty long, at least 5 minutes, and I've tried it several times.
Well that's the problem, the plex webinterface can't find my server. So when I go to https://plex.tv/pms/resources.xml it only shows my phone (which I used to register). Nothing else unfortunately.
I've added the
Ok, yeah that's what I thought (and used).
Well the problem isn't accessing the webinterface. I can access that just fine at |
By the way, my docker interface is bridged with the docker host's interface, and I've forwarded all the relevant ports from the docker container:
So I can access |
Your docker create config looks good. Your problem with accessing It appears that your IP's aren't being published to your plex account. In Also, post what you can from the log. Run: "docker logs -f plex" Unfortunately, I wont have access to my server for another few hours, so I On Thu, May 12, 2016 at 8:51 AM, Ismay notifications@github.com wrote:
|
Ok cool, I'll do that when I'm home, will let you know what I find. Also, maybe my routers firewall is blocking plex's attempts to publish my local plex server ip to my plex account (so to the main plex.tv server). But I have no blocks on outgoing connections though. Are there any protocols (like upnp) that need to be enabled, or incoming ports that need to be forwarded for this to work? |
Yes, you'll want setup port forwarding. The most important port to forward Here is a guide for setting up an SSH tunnel with putty. If you do this, On Thu, May 12, 2016 at 10:38 AM, Ismay notifications@github.com wrote:
|
Apparently the port forwarding is requested by plex through upnp. I'll set that up as well. |
So the contents of my preferences.xml are:
Is the machineidentifier the token? Also I tried not specifying a protocol for the custom connection since I can only access the webinterface over http. These are the plex container logs:
|
Your token is not there. If you look at the beginning of your log, it says
|
Hmm, I've tried to open an ssh tunnel to the docker host with
But that doesn't work (connection refused). The host (dockerhost.mydomain.net) can be pinged and I can open a regular ssh connection to it ( I've also tried using the |
It seems I'm not the only one wrestling with plex and docker in bridged mode: https://blog.ostanin.org/2013/09/14/plex-media-server-in-docker/ |
Port 32400 is already used by Plex. Try 9090. Your SSH connection is still Try the SSH tunnel, which let you log in to claim the server. Hmm, I've tried to open an ssh tunnel to the docker host with ssh -D 32400 -C -N username@dockerhost.mydomain.net But that doesn't work (connection refused). The host ( I've also tried using the net: host flag when creating the docker btw. Same — |
Ok, so finally some progress. Using this command on a laptop on my local network (but not on the server that's running the plex docker):
I can connect to the plex server by accessing localhost:8080/web from the laptop, and the setup goes fine. It can find my server, I can stream media, everything. However, after finishing the setup and saving the server etc., when I close the ssh tunnel, the settings are retained, but the connection to the plex server is lost again. |
My resources.xml now looks like this:
So the ip it's publishing is the ip of my docker container, and not that of my actual server (which is 192.168.1.5). |
Maybe it makes sense that it's doing that, because the plex server can only see the interface that docker provides (as I understand it), and that interface has the ip that it's publishing in resources.xml. I don't know however how to force it to use the ip of the docker host instead of the docker container. Also, I don't understand what the difference is between your setup and mine, because yours works apparently, but mine is a pretty standard docker setup (because a bridge is the docker standard way of dealing with networking) and it doesn't work. |
Great! Now what IP's are listed under https://plex.tv/pms/resources.xml The goal is to get your docker server IP listed in addition to your Plex
|
The last two I've added manually (for the entire contents see above). Doesn't make a difference unfortunately. Still can't connect to the server without the tunnel. |
Did you manually edit resources.XML? We should see your public IP listed
|
Also, have you restarted the container since you've made changes?
|
No, I've just added it through the plex settings.
Only if I want to connect from outside my network right? Or is that necessary thing for local discovery as well?
I've only set up upnp, and am allowing everything by default. So plex should be able to request its own port forwarding. |
Nope, not yet. Should I? |
Oh, right I was assuming you wanted remote access. I have had luck with
|
It's definitely something I'd want in the future, but for now I'm trying to get plex to find itself without the ssh tunnel. I think the remote access should be doable after that :). |
Try restarting the container now that you were able to log in. Then post
|
Allright, so after a restart it remembers the server, but still can't connect. Logs:
Preferences.xml
|
When you SSH in and connect to the server, try logging out and logging back
|
Also what does your remote access tab look like? And when you sign in, are
|
And under Network tab, what's listed under custom server access URLs?
|
The problem is the If I restore the docker bridge it can't find the server anymore. |
Strange, because --net=host should mean that networking is shared with the host. So the container shouldn't be dependant on the bridge for networking. Maybe some interference between the two interfaces? |
Are you okay with using --net=host? I try to avoid it for security reasons. When you try out the nethost enabled container, is the other bridged
|
I do too, which is why I tried getting it to work with the forwarded ports, but since this is the only way I could get it to work I'll just accept it.
No I closed it. So but by by disabling the docker bridge for plex server detection and then enabling it afterwards, it works as expected. I do think that the port forwarding setup needs to to be revisited by the linuxserver.io team, because I think there are some bugs to be worked out. The |
The fact is the IP getting discovered by plex will be the contianer IP if you are running in bridge mode, this container is build on the premisse of running in host mode, due to excatly this, if anyone has a solution, let us know :) |
Maybe something is different with my setup but I'm not having any problems. I ran it in --net=host mode as per instructions for quite a while, but figured I would try to remove that, and after removing (and setting up the proper port mappings) I can still connect fine remotely, plex can see the server etc. Private 172.17.42.13:32400 <- Public 123.123.123.123: 32400 <- Internet Is what it reports (I am also connecting via a remote network at the moment) I have 32400 forwarded on my router of course.
Docker opts are: Either my setup is unique that enables this or i'm reading the OP's issue wrong. |
Mine works, but I had to do some extra step to get it there. They key part I think there should be a script that ensures the container IP, docker On Thu, Jun 16, 2016 at 1:02 PM, Kyle Brown notifications@github.com
|
Thanks @BlackBarn! Setting those extra ports definitely worked for me. My use case was that I wanted Sonarr and Couchpotato (also running in Docker containers) to notify Plex on download. Since Plex was started up with host networking, that was difficult because for whatever reason I couldn't get the notifications to work with the host 172.17.0.1 it just wouldn't connect. But I couldn't use Adding all of your port mappings fixed it, and I can continue to use bridged mode (the default), I have my plex server fully accessible outside my network, and I can link my plex container to my other Docker containers. Thanks again! |
One other caveat: I did have to use the manual port forwarding method at my router because Plex could not auto-detect how to get back to the container. |
@phillipuniverse u could setup a static route in your router with Net: 172.17.0.0 Subnet: 255.255.0.0 Gateway <your.dockerhost.ip> advertised by dhcp, that would have done the trick also (i think) :) |
Also note plex official docker images. Though i have not tried yet. https://forums.plex.tv/discussion/250499/official-plex-media-server-docker-images-getting-started |
I've done extensive work with my Plex in docker and found that customConnections really only works well with IP addresses for some reason. I wrote a small bash resolver script that took a DNS entry and translated it to an IP to put in to Preferences.xml and seemed to resolve my previous issues. |
When running in bridged mode, the docker container IP gets published to Plex instead of the server IP hosting docker. This gives users the unreachable server error when trying to connect to their server.
If you'd be able to get to the remote access tab, you would see something like this:
Private 172.17.0.2:32400 <- Public External.IP.Address <- Internet
When you would really want to see something like this:
Private 192.168.1.15:32400 <- Public External.IP.Address <- Internet
You can fix running in bridged mode by adding customConnections=" https://docker.host.ip:32400" to preferences.xml
The text was updated successfully, but these errors were encountered: