LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-14-2016, 12:05 AM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 433

Rep: Reputation: 0
Unhappy Unable to access Manager App, Host Manager and Server Status urls


Good Day,

Just another day in Paradise !
My query is as mentioned in the subject.[Unable to access Manager App, Host Manager and Server Status urls], for each of these web applications, I am not challenged to input credentials rather gives directly access denied 403.

Nothing interesting in catalina.out

Code:
14-Aug-2016 00:14:23.636 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.4
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jul 6 2016 08:43:30 UTC
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.4.0
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-327.22.2.el7.x86_64
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/java/jdk1.7.0_80/jre
14-Aug-2016 00:14:23.637 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.7.0_80-b15
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/apache-tomcat-8.5.4
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/apache-tomcat-8.5.4
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
14-Aug-2016 00:14:23.638 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
14-Aug-2016 00:14:23.807 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
14-Aug-2016 00:14:23.837 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
14-Aug-2016 00:14:23.845 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
14-Aug-2016 00:14:23.846 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
14-Aug-2016 00:14:23.847 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 928 ms
14-Aug-2016 00:14:23.879 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
14-Aug-2016 00:14:23.879 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.4
14-Aug-2016 00:14:23.896 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.5.4/webapps/ROOT
14-Aug-2016 00:14:55.791 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [31,061] milliseconds.
14-Aug-2016 00:14:55.862 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.5.4/webapps/ROOT has finished in 31,966 ms
14-Aug-2016 00:14:55.862 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.5.4/webapps/docs
14-Aug-2016 00:14:55.913 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.5.4/webapps/docs has finished in 51 ms
14-Aug-2016 00:14:55.914 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.5.4/webapps/examples
14-Aug-2016 00:14:56.563 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.5.4/webapps/examples has finished in 649 ms
14-Aug-2016 00:14:56.563 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.5.4/webapps/host-manager
14-Aug-2016 00:14:56.627 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.5.4/webapps/host-manager has finished in 64 ms
14-Aug-2016 00:14:56.627 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.5.4/webapps/manager
14-Aug-2016 00:14:56.681 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/apache-tomcat-8.5.4/webapps/manager has finished in 54 ms
14-Aug-2016 00:14:56.695 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
14-Aug-2016 00:14:56.706 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
14-Aug-2016 00:14:56.706 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 32859 ms
I have added these three lines in my tomcat-users.xml file:Yes the lines are not commented out

Code:
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="password" roles="manager-gui,admin-gui"/>
Port and firewall configurations looks ok:

Code:
[root@docker1 conf]# nmap docker1

Starting Nmap 6.40 ( http://nmap.org ) at 2016-08-14 00:38 AEST
Nmap scan report for docker1 (192.168.1.6)
Host is up (0.0000050s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
8009/tcp open  ajp13
8080/tcp open  http-proxy

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
[root@docker1 conf]# firewall-cmd --query-port=8080/tcp
yes
[root@docker1 conf]# 

OS Version is Centos 7.2

[root@docker1 conf]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@docker1 conf]#
Yes, I am trying to install Apache tomcat 8.5.4 and configured to be listening on port 8080(in server.xml)

Shutdown and start up happens pretty smoothly without any issue.

I have completely run out of ideas......... Any help would be very much appreciated as I am now completely exhausted and have no idea what is the issue !!!

Cheers
 
Old 08-14-2016, 02:35 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,827

Rep: Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866
Quote:
[root@docker1 conf]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
My guess is that since you're running Centos and you have installed tomcat without using yum (I see from logs that it's installed in /opt/tomcat), it's SELinux that is not permitting access to these resources.

Regards
 
Old 08-14-2016, 03:43 AM   #3
sysmicuser
Member
 
Registered: Mar 2010
Posts: 433

Original Poster
Rep: Reputation: 0
Unhappy

I did try that like completely disabling but still it doesn't work.

What is interesting is I have enabled finest level of debugging but I cannot see anything in log files as ALL or finest level of logging.

logging.properties file.
Code:
[root@docker1 logs]# cat ../conf/logging.properties 
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.AsyncFileHandler.level = ALL
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.

2localhost.org.apache.juli.AsyncFileHandler.level = ALL
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.

3manager.org.apache.juli.AsyncFileHandler.level = ALL
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.

4host-manager.org.apache.juli.AsyncFileHandler.level = ALL
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
org.apache.catalina.util.LifecycleBase.level = ALL

# To see debug messages in TldLocationsCache, uncomment the following line:
org.apache.jasper.compiler.TldLocationsCache.level = ALL

# To see debug messages for HTTP/2 handling, uncomment the following line:
org.apache.coyote.http2.level = ALL

# To see debug messages for WebSocket handling, uncomment the following line:
org.apache.tomcat.websocket.level = ALL
org.apache.catalina.session.level=ALL
java.util.logging.ConsoleHandler.level=ALL
[root@docker1 logs]#
output of catalina.out

Code:
13-Aug-2016 23:14:26.763 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/apache-tomcat-8.5.4/webapps/ROOT
13-Aug-2016 23:16:20.064 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRan...skipping...
14-Aug-2016 18:38:29.084 FINE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.session.ManagerBase.processExpires Start expire sessions StandardManager at 1471163909084 sessioncount 0
output of manager.log file
Code:
14-Aug-2016 18:34:35.878 FINE [http-nio-8080-exec-10] org.apache.catalina.core.ApplicationDispatcher.doForward  Disabling the response for futher output
 
Old 08-14-2016, 10:16 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,827

Rep: Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866
Quote:
I did try that like completely disabling but still it doesn't work.

What is interesting is I have enabled finest level of debugging but I cannot see anything in log files as ALL or finest level of logging.
It should work.
Are you sure you've restarted tomcat and/or cleared your browser cache before testing?
 
Old 08-14-2016, 10:46 AM   #5
sysmicuser
Member
 
Registered: Mar 2010
Posts: 433

Original Poster
Rep: Reputation: 0
Yes, I have. I even completely shutdown laptop and restarted it. SELINUX disabling doesn't work... Yes completely deleted cache, cookies, saved logins. Not sure where and what else to try....
 
Old 08-14-2016, 11:28 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,827

Rep: Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866
Quote:
Originally Posted by sysmicuser View Post
Yes, I have. I even completely shutdown laptop and restarted it. SELINUX disabling doesn't work... Yes completely deleted cache, cookies, saved logins. Not sure where and what else to try....
Huh, it should work. I've done it many times and it works out of the box, once you edit $CATALINA_HOME/conf/tomcat-users.xml
Anyways you may try the solution posted here
 
Old 08-14-2016, 10:50 PM   #7
sysmicuser
Member
 
Registered: Mar 2010
Posts: 433

Original Poster
Rep: Reputation: 0
Unhappy

The problem was removing some
Code:
<Valve className="org.apache.**catalina.valves.**RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::**1|0:0:0:0:0:0:0:1" />
from /opt/tomcat/webapps/manager/META-INF/context.xml

I wanted to share this solution as someone else may benefit from it. Thank you for taking time to assist me ! Really appreciate that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] unable to access software manager and download software in terminal newmintuser Linux - Newbie 16 10-30-2014 03:12 AM
[Apache_Tomcat]: $CATALINA_HOME/webapps/host-manager/manager.xml quanba Linux - Software 1 09-19-2011 04:09 PM
synaptic package manager appears to install downloaded APP' but unable to launch it . davefrank Linux - Desktop 4 12-04-2010 12:44 PM
access to server errors and pages for manager review, who doesn't know linux bowie101 Linux - Newbie 1 12-05-2005 03:24 PM
Installing file manager with root status giri2 Mandriva 4 07-23-2004 06:40 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration