Tomcat with https a non-root user - Bind exception 443

11,376

As non-root user you cannot bind on port 443. The server.xml contains the binding for the ssl port, which you have already mentioned is setup for 8443. Not sure where its getting 443 from. Do you have access to the conf folder ? Can you search for 443 and see if that reveals anything useful ?

Share:
11,376
Mike
Author by

Mike

Updated on July 14, 2022

Comments

  • Mike
    Mike almost 2 years

    I want to run tomcat on port 443 with non-root user (https://machinIP). I'm getting below error:

    Error initializing endpoint java.net.BindException: Permission denied:443
    

    I don't have port 443 in use for sure. I read somewhere that we cannot use port 443 a non-root user & alternative is to use iptables but I'm not aware on exactly how to use iptables..

    I'll appreciate if someone can give me the exact command of iptables & whether I need to make any changes in server.xml a well? Current server.xml uses port 8080 for http & port 8443 for https.

    Thanks!