问题
I am trying to run tomcat with https as a non-root user. Configured server.xml with required port modification and added SSL configuration.
However when I execute sudo systemctl restart tomcat
get following error in catalina.out
org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["https-jsse-nio-443"]
java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
回答1:
Follow this post
Resolution point number 5 works better
# setcap cap_net_bind_service+ep /path/to/bin/java
来源:https://stackoverflow.com/questions/46491732/enabling-non-root-user-to-run-tomcat-with-port-443