Set the correct username and password with the “manager-script” role in the Tomcat

后端 未结 15 1883
情话喂你
情话喂你 2021-01-17 12:26

I know this has been asked many before. But I have already placed my user to role \"manager-script\".

I keep getting this when trying to deploy:

相关标签:
15条回答
  • 2021-01-17 13:04

    I added a role like this and Tomcat got successfully started in NetBeans

    Remember Run NetBeans as Administrator

    <role rolename="manager-script"/>
    <user username="admin" password="admin" roles="admin-gui,manager-gui,manager- 
    script" />
    
    0 讨论(0)
  • 2021-01-17 13:07

    For those using tomcat 7.0.72 still having the same issue. do the following

    1. after setting users with manager-script in the tomcat-users.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <tomcat-users>
      <role rolename="manager-script"/>
      <user username="user" password="user" roles="manager-script"/>
    </tomcat-users>
    
    1. goto C:\Users\[yourname]\AppData\Roaming\NetBeans\8.1 and edit "tomcat70.properties" by adding the following if not included
    tomcat.home=C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0
    tomcat.url=http://localhost:8080
    tomcat.username=manager
    tomcat.password=tomcat
    

    Note: change the username and password as above to the username and password you set in the tomcat-users.xml in c:\Program Files\apache...\

    1. Remove the server in Netbeans

    2. Add the tomcat server in Netbeans again and set the username and password as those in tomcat-users.xml

    3. exit both tomcat server and Netbeans

    4. restart your PC and start tomcat server

    5. Run Netbeans as administrator.

    These should work.

    0 讨论(0)
  • 2021-01-17 13:09

    Remember restarting Tomcat apter you follow there guide, no need to to remove netbean and tomcat! Here is my steps:

    1- remove the netbeans folder in C:\Users{youruser}\AppData\Roaming\netbeans

    2- set permission to tomcat_users.xml

    3- edit tomcat_user.xml

    4- restart Tomcat

    It works!

    0 讨论(0)
  • 2021-01-17 13:09

    I know this has been solved but I went through something similar on Windows where my "..\Apache\Tomcat.." was in program files and what worked for me was

    1.Exit Netbeans (If open) 2.Run Netbeans as administrator

    Hope this helps someone.

    0 讨论(0)
  • 2021-01-17 13:09

    Just succeeded after several hours of despair. It seems it is caused by netbeans not having privileges to the Program Files folder. Try to use a separate CATALINA BASE folder, where the configuration will reside.

    0 讨论(0)
  • 2021-01-17 13:10

    I also got this error. I've solve with this. I've got this error becasue user I log on to computer is not have permission to get access C: and can't add user info in .\conf\tomcat-users.xml. So I've copy tomcat folders to D: and remove and add again tomcat server in my NetBeans and start server again.. Now I'm fine.

    0 讨论(0)
提交回复
热议问题