Support Questions

Find answers, ask questions, and share your expertise

Ranger-Resource policy UI not loading - After Upgrade.

avatar
Contributor

34426-ranger-error.png

Hi Team,

We have recently done upgrade in our environment HDF 2.1.2.0-10 to 3.0.1.0-43, after upgrade we are facing issues like ranger policy UI not loading.

Attached the logs and screenshot FYR.

Kinldy help me to close this thread.

Logs :

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Aug 23, 2017 2:23:52 PM org.apache.ranger.server.tomcat.EmbeddedServer start
INFO: Deriving webapp folder from catalina.base property. folder=/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp
Aug 23, 2017 2:23:52 PM org.apache.ranger.server.tomcat.EmbeddedServer start
INFO: Webapp file =/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp, webAppName = /
Aug 23, 2017 2:23:52 PM org.apache.ranger.server.tomcat.EmbeddedServer start
INFO: Adding webapp [/] = path [/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp] .....
Aug 23, 2017 2:23:52 PM org.apache.catalina.core.StandardContext setPath
WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []
Aug 23, 2017 2:23:52 PM org.apache.ranger.server.tomcat.EmbeddedServer start
INFO: Finished init of webapp [/] = path [/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp].
Aug 23, 2017 2:23:52 PM org.apache.ranger.server.tomcat.EmbeddedServer start
INFO: Name is empty. Setting Name Rule as 'DEFAULT'
Aug 23, 2017 2:23:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-6080"]
Aug 23, 2017 2:23:52 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Aug 23, 2017 2:23:52 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.77
Aug 23, 2017 2:23:52 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Aug 23, 2017 2:23:52 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Aug 23, 2017 2:23:52 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp/WEB-INF/lib/tomcat-el-api-7.0.77.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Aug 23, 2017 2:23:52 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
INFO: No global web.xml found
Aug 23, 2017 2:23:58 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: urn:com:sun:jersey:api:view is already defined
Aug 23, 2017 2:23:58 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Aug 23, 2017 2:23:58 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 23, 2017 2:23:58 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = [/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp/]
Aug 23, 2017 2:23:58 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp/WEB-INF/log4j.properties]
log4j:ERROR Could not find value for key log4j.appender.xa_log_appender
log4j:ERROR Could not instantiate appender named "xa_log_appender".
log4j:ERROR Could not find value for key log4j.appender.xa_log_appender
log4j:ERROR Could not instantiate appender named "xa_log_appender".
log4j:ERROR Could not find value for key log4j.appender.xa_log_appender
log4j:ERROR Could not instantiate appender named "xa_log_appender".
log4j:ERROR Could not find value for key log4j.appender.xa_log_appender
log4j:ERROR Could not instantiate appender named "xa_log_appender".
Aug 23, 2017 2:23:58 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.security.core.SpringSecurityCoreVersion).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Aug 23, 2017 2:24:03 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
  org.apache.ranger.rest
  org.apache.ranger.common
  xa.rest
Aug 23, 2017 2:24:03 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
  class org.apache.ranger.rest.XUserREST
  class org.apache.ranger.rest.PublicAPIs
  class org.apache.ranger.rest.TagREST
  class org.apache.ranger.rest.ServiceREST
  class org.apache.ranger.rest.PublicAPIsv2
  class org.apache.ranger.rest.AssetREST
  class org.apache.ranger.rest.UserREST
  class org.apache.ranger.rest.XAuditREST
  class org.apache.ranger.rest.XKeyREST
Aug 23, 2017 2:24:03 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Provider classes found:
  class org.apache.ranger.common.RangerJAXBContextResolver
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.servlet.SpringServlet getContext
INFO: Using default applicationContext
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, assetREST, of type org.apache.ranger.rest.AssetREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, publicAPIs, of type org.apache.ranger.rest.PublicAPIs as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, publicAPIsv2, of type org.apache.ranger.rest.PublicAPIsv2 as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, serviceREST, of type org.apache.ranger.rest.ServiceREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, tagREST, of type org.apache.ranger.rest.TagREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, userREST, of type org.apache.ranger.rest.UserREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, XAuditREST, of type org.apache.ranger.rest.XAuditREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, XKeyREST, of type org.apache.ranger.rest.XKeyREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
INFO: Registering Spring bean, XUserREST, of type org.apache.ranger.rest.XUserREST as a root resource class
Aug 23, 2017 2:24:03 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.4 09/11/2010 10:41 PM'
Aug 23, 2017 2:24:03 PM com.sun.jersey.spi.inject.Errors processErrorMessages
WARNING: The following warnings have been detected with resource and/or provider classes:
  WARNING: A HTTP GET method, public void org.apache.ranger.rest.ServiceREST.getPoliciesInExcel(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse), MUST return a non-void type.
  WARNING: A HTTP GET method, public void org.apache.ranger.rest.ServiceREST.getPoliciesInCsv(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException, MUST return a non-void type.
  WARNING: A HTTP GET method, public void org.apache.ranger.rest.ServiceREST.getPoliciesInJson(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.Boolean), MUST return a non-void type.
Aug 23, 2017 2:24:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-6080"]


5 REPLIES 5

avatar
Contributor

Can Someone Help this issue?

avatar
Master Mentor

@Anishkumar Valsalam

Can you upload the ranger admin logs xa_portal.log and catalina.out found in /var/log/ranger/admin

On the Ranger admin host, edit

 /usr/hdp/current/ranger-admin/ews/webapp/WEB-INF/log4j.xml 

Change 'info' to 'debug' as shown in the below configuration stanza,

<category name="org.apache.ranger" additivity="false">
       <priority value="debug" />
       <appender-ref ref="xa_log_appender" />
</category> 

Restart ranger and upload the logs after retesting the UI visualization

avatar
Contributor
@Geoffrey Shelton Okot

Hi Brother thanks for the reply.admin.zip

After enabled debug also it showing logs with info modes. attached the logs for your reference.

root@hklpadhaa01[WEB-INF] # pwd
/usr/hdf/3.0.1.0-43/ranger-admin/ews/webapp/WEB-INF
root@hklpadhaa01[WEB-INF] # grep debug log4j.xml
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
                <priority value="debug" />
                <priority value="debug" />
root@hklpadhaa01[WEB-INF] #

avatar
Master Mentor

@Anishkumar Valsalam

Could you tell me the brief history, was the cluster working before the upgrade with HDF and HDP being managed by the same Ambari?

What upgrade document did you use?

avatar
Master Mentor

@Anishkumar Valsalam

Is it normal that the xa_portal.log is 0 bytes you attached a wrong file xa_portal_sql.log

The debug logs can be found in /var/log/ranger/admin/xa_portal.log

Change the debug in /usr/hdp/current/ranger-admin/ews/webapp/WEB-INF/log4j.xml

<categoryname="org.apache.ranger"additivity="false">
<priorityvalue="debug"/>
<appender-refref="xa_log_appender"/>
</category>