Rivest 0 Posted August 10, 2019 Share Posted August 10, 2019 (edited) After changing the HTTP or HTTPS port and restarting the server will not start. I get the following error in the log. I am using Ubuntu 18.04. 2019-08-10 16:39:58.796 Info App: Requesting administrative access to authorize http server 2019-08-10 16:39:58.799 Info ServerConfigurationManager: Saving system configuration 2019-08-10 16:39:58.819 Info HttpServer: Adding HttpListener prefix http://+:8096/ 2019-08-10 16:39:58.820 Info HttpServer: Adding HttpListener prefix https://+:443/ 2019-08-10 16:39:58.956 Error App: Error starting Http Server *** Error Report *** Version: 4.2.1.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Unix 4.15.0.55 64-Bit OS: True 64-Bit Process: True User Interactive: True Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll Processor count: 8 Program data path: /var/lib/emby Application directory: /opt/emby-server/system System.Net.HttpListenerException: System.Net.HttpListenerException (13): Permission denied at SocketHttpListener.Net.HttpEndPointManager.GetEPListener(ILogger logger, String host, Int32 port, HttpListener listener, Boolean secure) at SocketHttpListener.Net.HttpEndPointManager.AddPrefixInternal(ILogger logger, String p, HttpListener listener) at SocketHttpListener.Net.HttpEndPointManager.AddListener(ILogger logger, HttpListener listener) at SocketHttpListener.Net.HttpListener.Start() at Emby.Server.Implementations.ApplicationHost.StartServer() Source: SocketHttpListener TargetSite: SocketHttpListener.Net.HttpEndPointListener GetEPListener(MediaBrowser.Model.Logging.ILogger, System.String, Int32, SocketHttpListener.Net.HttpListener, Boolean) embyserver-63701051998.txt Edited August 10, 2019 by Rivest Link to comment Share on other sites More sharing options...
Luke 37006 Posted August 10, 2019 Share Posted August 10, 2019 Hi there, please attach the complete emby server log. thanks. Link to comment Share on other sites More sharing options...
Rivest 0 Posted August 10, 2019 Author Share Posted August 10, 2019 attached log file. embyserver-63701051998.txt Link to comment Share on other sites More sharing options...
Luke 37006 Posted August 10, 2019 Share Posted August 10, 2019 You configured a custom https port but the server is being denied permission to that. Please shutdown the server, go here: /var/lib/emby/config/system.xml And change the value back to the default 8920. Then you can look into why Emby Server is being denied permission to port 443. Please let us know if this helps. Thanks. Link to comment Share on other sites More sharing options...
Rivest 0 Posted August 10, 2019 Author Share Posted August 10, 2019 Changing it back to 8920 allows the server to start but when I change it back to 443 or the http port to 80 then it stops working again. How do I get it to bind to those ports? Link to comment Share on other sites More sharing options...
Luke 37006 Posted August 10, 2019 Share Posted August 10, 2019 Those are difficult ones to bind to and you may need to research what your distro requires in order to grant Emby Server permission to do that. @@Jdiesel do you have any tips? Link to comment Share on other sites More sharing options...
Rivest 0 Posted August 10, 2019 Author Share Posted August 10, 2019 (edited) FYI - this is a freshly installed OS with nothing else but emby on it. All I could find online is people telling you to edit the source code(of other projects) to use sudo or root permissions to bind the ports. I am not a developer. Is there something I am missing to do for this? Is there a way to run emby as root? Edited August 10, 2019 by Rivest Link to comment Share on other sites More sharing options...
Solution Q-Droid 634 Posted August 10, 2019 Solution Share Posted August 10, 2019 Ports below 1024 are privileged and therefore need root level access to bind. Running emby-server as root or elevating privs with setuid is bad practice because now you would have a running media application that can do ANYTHING on your server. It also increases the attack surface from the internet (assuming you are doing this for remote access). We don't know what vulnerabilities Emby has nor those of the underlying components that Emby uses. Besides, "tweaking" things to force them to work also means they can break on the next update. Better to use a purpose built reverse proxy if you really need those ports to be 80 and 443, or router port forwarding or external redirects. 1 Link to comment Share on other sites More sharing options...
Rivest 0 Posted August 10, 2019 Author Share Posted August 10, 2019 I was able to setup Nginx as a reverse proxy to forward the ports. However I feel like this is just a workaround not an actual fix. I would think that the built in feature to Emby should work as its described and not allow you to set it to something that breaks it. Less technical users may have more difficulties. From what I read online there should be methods you can program that allows emby to use those ports without requiring it to run as root. Link to comment Share on other sites More sharing options...
Luke 37006 Posted August 10, 2019 Share Posted August 10, 2019 I was able to setup Nginx as a reverse proxy to forward the ports. However I feel like this is just a workaround not an actual fix. I would think that the built in feature to Emby should work as its described and not allow you to set it to something that breaks it. Less technical users may have more difficulties. From what I read online there should be methods you can program that allows emby to use those ports without requiring it to run as root. It does automatically switch back to the default port for the http port, and at one time it did for the https port as well. I'll look at that and make sure it's working again. 1 Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted August 10, 2019 Share Posted August 10, 2019 I was able to setup Nginx as a reverse proxy to forward the ports. However I feel like this is just a workaround not an actual fix. I would think that the built in feature to Emby should work as its described and not allow you to set it to something that breaks it. Less technical users may have more difficulties. From what I read online there should be methods you can program that allows emby to use those ports without requiring it to run as root. I fail to see the need to ever change Emby's default ports. It will always be between a router and WAN. You router and/or reverse proxy does the routing to Emby at the default ports. 443 -> 8920 is a completely viable solution. Or with a rev proxy 443 -> 8096 is viable and even simpler. No point complicating things. Changing them to reserved ports doesn't even make sense. IMO, Emby should disallow ports below 1024 in the first place. Link to comment Share on other sites More sharing options...
Rivest 0 Posted August 11, 2019 Author Share Posted August 11, 2019 @@Luke Thanks for your help. Having it set back at least stops it from crashing. @@mastrmind11 I have to dissagree. It is very much useful and convienent to change the port in emby as apposed to seting up some other port mapping elseware. By setting it to 443 or 80 it does not require you to add the :port at the end of the host name which makes it easier and more relatable to other not technical users that may be using it also. Just go to http://emby in the internal network. In a typical home network not everyone has a fancy router that can handle dns porr mapping or one thats not locked down by the isp. And setting up another reverse proxy or network appliance is just a bunch of extra unessesary work where one quick setting change should suffice. Yes its between router and wan but the users are to. They connect locally to that pc. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now