Display the Tomcat Manager Application?

2019-01-27 12:43发布

using this tutorial http://www.eclipse.org/birt/phoenix/deploy/viewerSetup.php#install_viewer

And it tells me to display the Tomcat manager application through this link http://localhost:8080/manager/html.

However when I click it I get an error from my browser saying it could not connect. Why is this? How exactly does one display the Tomcat Manager Application

7条回答
beautiful°
2楼-- · 2019-01-27 12:47

I solved that problem by setting up the server management in Eclipse to take control of the Tomcat installation, which has the manager enabled. This thread explains how to do it:

Tomcat started in Eclipse but unable to connect to http://localhost:8085/

Anyway I have the console at the address you mentioned:

localhost:8080/manager/html

in Tomcat 7.

查看更多
时光不老,我们不散
3楼-- · 2019-01-27 12:52

Hey this issue just took me a lot of time to fix, so my tips would be (if it's relevant to others that view this page as well):

  1. Use command line commands (set CATALINA_HOME etc..) instead of changing it through control panel enviroment variables.

  2. When people use %.....% it means give the path to the folder of this variable, except the folder which you are at in command promplt. For example if you are in C:\ in command line and someone tells you to do %CATALINA_HOME%\bin, assuming for example the path for CATALINA_HOME is C:\Program Files, it means write in command line: Pragram Files\bin (excluding C:).

Could have saved me a lot of time.

查看更多
可以哭但决不认输i
4楼-- · 2019-01-27 12:55
Below things worked for me on fresh installation of apache-tomcat-7.0.63 -

Please make changes to below files and restart the server using %CATALINA_HOME%\bin>catalina.bat start and then try -   
http://localhost:8080/manager/html

            1) configured variables - CATALINA_HOME and CATALINA_BASE

            2) created manager.xml file inside %CATALINA_HOME%\conf\Catalina\localhost

            please paste below lines into manager.xml file -

               <Context privileged="true" antiResourceLocking="false"
                     docBase="${catalina.home}/webapps/manager">
                  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
                     allow="127\.0\.0\.1" />
               </Context>

            3) modified %CATALINA_HOME%\conf\tomcat-users.xml file

            please paste below lines into tomcat-users.xml file

              <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"/>

            4) modified %CATALINA_HOME%\conf\server.xml

            Search this line '<Engine name="Catalina" defaultHost="localhost">' and add below line after that -
            <Realm className="org.apache.catalina.realm.MemoryRealm" /> 
查看更多
仙女界的扛把子
5楼-- · 2019-01-27 13:04

Make sure you activated the manager app and created a user that has access to it. For details see the documentation to your Tomcat-Version (e.g. for Tomcat 7: http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html )

查看更多
等我变得足够好
6楼-- · 2019-01-27 13:07
  1. Right Click On Apache Tomcat
  2. Select Open
  3. Go to Server Locations Tab
  4. Select use tomcat installation
  5. Goto the installation directory
  6. Edit apache-tomcat-8.0/conf/tomcat-users.xml
  7. Add the below users in the xml file

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

  8. Copy tomcat-user.xml file in eclipse workspace server's tomcat directory

  9. Now open tomcat manager page http://localhost:/manager/html/
  10. Use username and password tomcat and manager page will open on your browser
查看更多
老娘就宠你
7楼-- · 2019-01-27 13:11

If you want to keep using the workspace metadata for you Eclipse Tomcat instance, here's how you can get the manager webapp to work.

The base configuration instructions can be found in Apache Tomcat 7 Manager App HOW-TO.

In your Servers IDE project, the <server name>-config\server.xml file should have the following nested entries:

...
<Service name="Catalina">
  ...
  <Engine defaultHost="localhost" name="Catalina">
    ...
    <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
    ...

Open your Eclipse workspace metadata, where the Tomcat instance folders are published, i.e.:

<your-workspace-dir>\.metadata\.plugins\org.eclipse.wst.server.core\tmp<n>

there, inside the conf\ folder create a new folder named Catalina (derived from <Engine ... name="Catalina"> above), inside this folder create another one named localhost (derived from <Host ... name="localhost" ...> above) and in this last one edit a file named manager.xml with the content as per the linked docs:

<Context privileged="true" antiResourceLocking="false"
         docBase="${catalina.home}/webapps/manager">
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.0\.0\.1" />
</Context>

Now publish and start the server instance, the manager will be deployed along side the other webapps you have added — for me it is the last one being deployed.

Tested with Tomcat 7, but I guess it would work for any Tomcat version that supports that linked configuration.


Side note

Do not create the above mentioned folders and files inside the configuration stored in the Eclipse Servers project, they won't be published in the org.eclipse.wst.server.core\tmp<n>\conf directory.

查看更多
登录 后发表回答