port 80 does not work

classic Classic list List threaded Threaded
3 messages Options
M E
Reply | Threaded
Open this post in threaded view
|

port 80 does not work

M E
Hi

I added an HTTP server on port 80 using Restlet, it does NOT work, however it works on port 8080, why??

java.net.SocketException: Permission denied  it seems to be the first cause exception

My guesses
I don't get it, browser suppose to listen to port 80 for http, or it just a firewall issue, but it is localhost ip, further if it is firewall, how 8182 work without setting a rule!!

hmmm, I guess I don't get it!!

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: port 80 does not work

Thierry Boileau
Hello,

I suppose you don't launch your Web server with sufficient rights.
Could you try with root user or something like that?

best regards,
Thierry Boileau


> Hi
>
> I added an HTTP server on port 80 using Restlet, it does NOT work,
> however it works on port 8080, why??
>
> java.net.SocketException: Permission denied  it seems to be the first
> cause exception
>
> My guesses
> I don't get it, browser suppose to listen to port 80 for http, or it
> just a firewall issue, but it is localhost ip, further if it is
> firewall, how 8182 work without setting a rule!!
>
> hmmm, I guess I don't get it!!
>
> Thanks
>
>
Reply | Threaded
Open this post in threaded view
|

Re: port 80 does not work

Rob Heittman
In reply to this post by M E
On most computing platforms other than Windows, you may not bind directly to ports numbered lower than 1024 unless you are the root user.  Really you ought not to run web services and such as root, though.  Solutions like the Apache Commons Daemon allow you to bind to the port as root, but typically I prefer to just forward the port using iptables or equivalent.

You also may get this exception in certain Java and OS environments where the desired socket is in use by another program, but for whatever reason this cause is not known to the JVM.  I think this is pretty unusual, but you may want to just triple check that nothing else is using port 80, or has grabbed it preemptively -- some firewall/security solutions will do this to stop any other unauthorized program from using the port.  Use netstat or similar to check.

- R

On Mon, Nov 17, 2008 at 6:00 AM, M E <[hidden email]> wrote:
I don't get it, browser suppose to listen to port 80 for http, or it just a firewall issue, but it is localhost ip, further if it is firewall, how 8182 work without setting a rule!!