Archive

Posts Tagged ‘Troubleshooting’

Apache Tomcat 8 Login issues

August 3, 2017 Leave a comment

Issue:
After installing Apache Tomcat7/8 in Linux/windows everybody facing common issue is 403 Access Denied after you click on manager gui/server status etc..

http://10.207.47.128:8080/

Download apache Tomcat8 from below link: https://tomcat.apache.org/download-80.cgi

Resolution :

Option 1: 

To overcome this issues, follow below 3 step.

Step:1
Need to add below entries in /app/tomcat8/conf/tomcat-users.xml file

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

Note: I given credentials for POC purpose, please change as per your requirement.

Step2:

To get authenticate for manager GUI go to /app/tomcat8/webapps/manager/META-INF/context.xml and comment below entry

<Context antiResourceLocking=”false” privileged=”true” >
<!– <Valve className=”org.apache.catalina.valves.RemoteAddrValve”
allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ />
–>
<Manager sessionAttributeValueClassNameFilter=”java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap”/>

Step 3:

To authenticate host-manager gui
Goto path /app/tomcat8/webapps/host-manager/META-INF/context.xml and comment below Value tag

<Context antiResourceLocking=”false” privileged=”true” >
<!– <Valve className=”org.apache.catalina.valves.RemoteAddrValve”
allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ />
–>
<Manager sessionAttributeValueClassNameFilter=”java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap”/>
</Context>

 

Option 2:

we can create two files under below path
/app/tomcat8/conf/Catalina/localhost

manager.xml:

<Context privileged=”true” antiResourceLocking=”false” docBase=”${catalina.home}/webapps/manager”>
<Valve className=”org.apache.catalina.valves.RemoteAddrValve” allow=”^.*$” />
</Context>

host-manager.xml

<Context privileged=”true” antiResourceLocking=”false” docBase=”${catalina.home}/webapps/host-manager”>
<Valve className=”org.apache.catalina.valves.RemoteAddrValve” allow=”^.*$” />
</Context>

After changes done ,need to restart tomcat and you will be authenticate using the credentials which you mentioned in tomcat-users.xml  file

 

Categories: Apache tomcat Tags:

Thread and GC logs Analysis

November 25, 2016 Leave a comment

Here is best free online tools for analyzing the thread dump and GC logs

Thread Dump–>http://fastthread.io/

GC Logs–> http://gceasy.io/

Note: formats  (uncompressed or .zip, .gz formats,.txt,.log )

Categories: JVM Tags: