允许非 root 用户使用端口 443 运行 tomcat [英] Enabling non root user to run tomcat with port 443

查看:49
本文介绍了允许非 root 用户使用端口 443 运行 tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以非 root 用户身份使用 https 运行 tomcat.使用所需的端口修改配置 server.xml 并添加 SSL 配置.

I am trying to run tomcat with https as a non-root user. Configured server.xml with required port modification and added SSL configuration.

但是当我执行 sudo systemctl restart tomcat 在 catalina.out 中出现以下错误

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)

推荐答案

Follow 这篇 帖子

第 5 个分辨率点效果更好

Resolution point number 5 works better

# setcap cap_net_bind_service+ep /path/to/bin/java

这篇关于允许非 root 用户使用端口 443 运行 tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆