简体   繁体   English

无法访问tomcat管理器GUI(Tomcat9 + Java9)

[英]Unable to access tomcat manager GUI (Tomcat9+Java9)

I am using tomcat version 9.0.1. 我正在使用9.0.1版的tomcat。 Running on a linux machine using java 9. 使用Java 9在Linux机器上运行。

in my tomcat-users.xml i have added below 在我的tomcat-users.xml中,我在下面添加了

<role rolename="manager-gui"/>
<role rolename="manager"/>
<role rolename="manager-script"/>
<user username="admin" password="admin" roles="manager-gui,manager,manager-script"/>

in my server.xml added below line after googling 在谷歌搜索后在我的server.xml中添加以下行

<Realm className="org.apache.catalina.realm.MemoryRealm" />

After that i started by tomcat server, while accessing the maneger gui getting below error 之后,我通过tomcat服务器启动,同时访问maneger gui低于错误

403 Access Denied

You are not authorized to view this page.
If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.

please help 请帮忙

tomcat-users.xml tomcat-users.xml

<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">

<role rolename="manager-gui"/>
<role rolename="manager"/>
<role rolename="manager-script"/>
<user username="admin" password="admin" roles="manager-gui,manager,manager-script"/>
</tomcat-users>

I think the solution for the 403 ERROR is adding your IP/IPs to the file 我认为403 ERROR的解决方案是将您的IP/IPs添加到文件中

webapps/manager/META-INF/context.xml

in the section: 在该部分中:

<Valve className="org.apache.catalina.valves.RemoteAddrValve"  allow="X.X.X.X"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM