Jump to content

Can't host on port 80


Recommended Posts

Posted

The application is not hosting itself on port 80. Any other port seems to be fine. But whenever I set it to 80... nothing happens. The port is dead.

Posted

Whenever I change it to :80 it just hosts on default 8096.

Happy2Play
Posted

Could your ISP be blocking this traffic?  Some do.  Does a site like canyouseeme.org show port 80 open?

Posted

Whenever I change it to :80 it just hosts on default 8096.

 

Hi, this means Emby Server is being denied access to port 80 by your machine. Perhaps some other application is using it, or it may need special permission to use port 80. Using port 80 will always be more complicated. As a test, you could try running as sudo to see if that solves it. You're not going to want to run sudo all the time but you could try it to see if it is permissions related.

Posted

Hi, this means Emby Server is being denied access to port 80 by your machine. Perhaps some other application is using it, or it may need special permission to use port 80. Using port 80 will always be more complicated. As a test, you could try running as sudo to see if that solves it. You're not going to want to run sudo all the time but you could try it to see if it is permissions related.

How do I run it as sudo. 

So far I've been doing "sudo service emby-server stop/start"

 

Would that lunch it with elevated privileges?

 

Also yeah my port 80 seems to be close. I'll open it and see if that fixes it. 

Posted

-11-04 00:10:11.612 Info HttpServer: Adding HttpListener prefix http://+:80/
2019-11-04 00:10:11.612 Info HttpServer: Adding HttpListener prefix https://+:8920/
2019-11-04 00:10:11.634 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.64
	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)
	

Here is the log I get. Seems like permission denied. I did open port 80 in iptables

 

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     udp  --  anywhere             anywhere             udp dpt:80

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Posted

Yeah I can tell you that it's being denied permission but I can't tell you why as that is specific to your local environment.

Posted

Couldn't figure it out. Redirected 80 to 8096 instead.

darkassassin07
Posted (edited)

I don't know much about this, but from what I've read, ports below 1024 are privileged (require root to bind to) and circumventing that isnt a good idea.

 

The best option is to redirect to a port that isnt privileged like you have done.

 

 

 

 

Take that advice with a grain of salt though, I'm a linux noob. Thats just what I found with a quick google search just now.

https://serverfault.com/questions/112795/how-to-run-a-server-on-port-80-as-a-normal-user-on-linux

 

 

 

/edit

 

With a bit of second thought, I have nginx running bound directly to ports 80/443 on a rpi so it's definitely doable.

You would have to figure out which linux user is being used to run the process/service and give that user permission to bind to 443.

 

I have no idea how to do that though. Nginx did it automatically on install, plus linux users and their permissions is definitely not my forte.

Edited by darkassassin07
Posted

You should remove that rule for udp access to port 80.  In reality, you don't need it and it just provides another avenue for someone to try and attack your system.  Plus, HTTP uses TCP and not UDP for that port.

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