1

I read many similar problems here, but whatever I do, I can't login to manager app. What I have done.

1. I edited the tomcat-users.xml by adding

  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <role rolename="admin-gui"/>
  <role rolename="admin-script"/>
  <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
  1. I started Tomcat (V.8) with Netbeans
  2. I went to localhost:8084 (netbeans set the port to 8084) and I clicked "manager app".
  3. In the prompted window, I put admin and admin and it doesn't login.

In the properties of the server in Netbeans, there are different credentials. I put the same to both of them (to tomcat-users.xml and there in Netbeans) and still nothing happens.
Every time I make a change, I always restart the Tomcat (no error occurs).

EDIT
When I try to run my application (the default one, when you create a project in Netbeans), I also can't login, so this messages comes up 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.
However I have added the above in the tomcat-users.xml ...

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
yaylitzis
  • 5,354
  • 17
  • 62
  • 107

1 Answers1

2

Make sure you're editing the correct file. NetBeans will create it's own copy of the configuration files, so you may have two or more tomcat-users.xml files. In my case on my windows machine, the Tomcat launched by NB uses C:\Users\DevServer\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf

Also, try simplifying and create a user with just the manager-script role. Then tell NB about that user and pw in the Services/Servers/Connection credentials. Example:

<user username="tomcat_m_script" password="pwhere" roles="manager-script"/>

Mark Olsson
  • 320
  • 2
  • 8
  • It was in front of me all the time!!!!!!!! At properties in Tomcat server was written `C:\Users\~~~\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base` . I was editing the wrong file.. thank you! – yaylitzis Dec 22 '14 at 08:46