5

Hi I am not sure I am trying to connect to apache server, this is a class I am taking, but now after I removed the code and restored it back to default, it keeps asking for the password now.

This is what I have in my tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<user username="ide" password="EiWnNlBG" roles="manager-script,admin"/>
</tomcat-users>

also this is in tools ---> server ---> pass and user name.

and error i get in output

Deployment error: Access to Tomcat server has not been authorized. Set the correct username and password with the "manager-script" role in the Tomcat customizer in the Server Manager.
See the server log for details.
BUILD FAILED (total time: 6 seconds)

Only thing I changed was tomcat-users.xml and web.xml but I restored everything back to normal and still asking for username and password.

4

2 回答 2

1

就我自己而言,我遇到了这个问题,因为我在密码中使用了特殊字符 &。确保逃脱它们或用其他东西代替。

于 2019-11-10T12:21:54.543 回答
0

这让我发疯了好几年。我跳过了修改 XML 文件的所有步骤,但无济于事。被驱赶到分心的地步,我杀死了所有 Apache/Tomcat 进程和服务,但仍然http://localhost:8080一直要求我输入用户名和密码。所以我想其他东西一定在使用端口 8080。但是什么?是时候回到老学校了,回到 CMD(记得以管理员身份运行 CMD)。

网络统计-aon | 找到str 8080

TCP 0.0.0.0:8080 0.0.0.0:0 监听 3472
TCP [::]:8080 [::]:0 监听 3472

因此,进程 id 3472 正在使用该端口。但是进程 id 3472 是什么?

任务清单 | 发现str 3472

TNSLSNR.EXE 3472 服务 0 13,256 K

因此,在 Google 上快速搜索 TNSLSNR 会发现它是一个 Oracle 侦听器。我现在需要吗。不,所以我杀了它。

taskkill /F /PID 3472

成功:PID 3472 的进程已终止。

耶!现在不受非 Apache/Tomcat 进程和/或服务的干扰,我可以专注于正确配置 Apache。

于 2018-12-26T23:40:33.860 回答