Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Cannot access Ambari UI after installation

Highlighted

Cannot access Ambari UI after installation

New Contributor

sudo service iptables status iptables: Firewall is not running.

Ambari is running

sudo ps -ef | grep ambari

101659 1 2 23:43 ? 00:00:17 /usr/jdk64/jdk1.7.0_45/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/sbin:/bin:/usr/sbin:/usr/bin:/usr/lib/ambari-server/* org.apache.ambari.server.controller.AmbariServer postgres 101690 101618 0 23:43 ? 00:00:00 postgres: ambari ambari 127.0.0.1(50964) idle postgres 101834 101618 0 23:45 ? 00:00:00 postgres: ambari ambari 127.0.0.1(50972) idle postgres 101835 101618 0 23:45 ? 00:00:00 postgres: ambari ambari 127.0.0.1(50976) idle postgres 101836 101618 0 23:45 ? 00:00:00 postgres: ambari ambari 127.0.0.1(50974) idle anjuneja 101966 101925 0 23:54 pts/1 00:00:00 grep ambari

Ambari server and Postgres:

sudo ambari-server status Using python /usr/bin/python2.6 Ambari-server status Ambari Server running Found Ambari Server PID: '101659 at: /var/run/ambari-server/ambari-server.pid

sudo service postgresql status postmaster (pid 82037) is running...

telnet to the IP and the port is successful

the /etc/conf file:

cat /etc/hosts

127.0.0.1 localhost.localdomain localhost ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.120.1xx.xx <instance ID1>.dir.dcloudservice.com instanceID1 Data 10.120.1xx.xx <instanceID2>.dir.dcloudservice.com instanceID2 Master 10.120.1xx.xx <instanceID3>.dir.dcloudservice.com instanceID3 Slave

The logs show that everything is running:

sudo tail -f /var/log/ambari-server/ambari-server.log

23:43:13,558 INFO [main] ActionDefinitionManager:124 - Added custom action definition for ambari_hdfs_rebalancer 23:43:13,558 INFO [main] ActionDefinitionManager:124 - Added custom action definition for nagios_update_ignore 23:43:13,559 INFO [main] CertificateManager:69 - Initialization of root certificate 23:43:13,559 INFO [main] CertificateManager:71 - Certificate exists:false 23:43:13,559 INFO [main] CertificateManager:138 - Generation of server certificate 23:43:15,389 INFO [main] ShellCommandUtil:44 - Command openssl genrsa -des3 -passout pass:**** -out /var/lib/ambari-server/keys/ca.key 4096 was finished with exit code: 0 - the operation was completely successfully. 23:43:15,404 INFO [main] ShellCommandUtil:44 - Command openssl req -passin pass:**** -new -key /var/lib/ambari-server/keys/ca.key -out /var/lib/ambari-server/keys/ca.csr -batch was finished with exit code: 0 - the operation was completely successfully. 23:43:15,421 INFO [main] ShellCommandUtil:44 - Command open**** ca -create_serial -out /var/lib/ambari-server/keys/ca.crt -days 365 -keyfile /var/lib/ambari-server/keys/ca.key -key le3nMGuFHtfpJ5WCp6nQLYPWTWR83uk4bl5O9BeSVnsYWLlsQ1 -selfsign -extensions jdk7_ca -config /var/lib/ambari-server/keys/ca.config -batch -infiles /var/lib/ambari-server/keys/ca.csr was finished with exit code: 0 - the operation was completely successfully. 23:43:15,434 INFO [main] ShellCommandUtil:44 - Command openssl pkcs12 -export -in /var/lib/ambari-server/keys/ca.crt -inkey /var/lib/ambari-server/keys/ca.key -certfile /var/lib/ambari-server/keys/ca.crt -out /var/lib/ambari-server/keys/keystore.p12 -password pass:**** -passin pass:**** was finished with exit code: 0 - the operation was completely successfully. 23:43:15,672 INFO [main] Configuration:442 - Credential provider creation failed. Reason: Master key initialization failed. 23:43:15,673 INFO [main] StackExtensionHelper:358 - No services defined for stack: HDP-1.3.3 23:43:16,218 INFO [Stack Version Loading Thread] LatestRepoCallable:73 - Loading latest URL info from http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json 23:43:16,226 INFO [Stack Version Loading Thread] LatestRepoCallable:73 - Loading latest URL info from http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json 23:43:16,232 INFO [Stack Version Loading Thread] LatestRepoCallable:73 - Loading latest URL info from http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json 23:43:16,238 WARN [main] ActionDefinitionManager:117 - Ignoring action definition as a different definition by that name already exists. ActionDefinition: actionName: ambari_hdfs_rebalancer actionType: SYSTEM inputs: threshold,[principal],[keytab] description: HDFS Rebalance targetService: HDFS targetComponent: NAMENODE defaultTimeout: 600 targetType: ANY 23:43:16,239 WARN [main] ActionDefinitionManager:117 - Ignoring action definition as a different definition by that name already exists. ActionDefinition: actionName: nagios_update_ignore actionType: SYSTEM inputs: [nagios_ignore] description: Used to create an alert blackout targetService: NAGIOS targetComponent: NAGIOS_SERVER defaultTimeout: 60 targetType: ANY 23:43:16,239 INFO [main] AmbariServer:144 - ********* Meta Info initialized ********** 23:43:16,246 INFO [main] ClustersImpl:103 - Initializing the ClustersImpl 23:43:16,499 INFO [main] AmbariManagementControllerImpl:225 - Initializing the AmbariManagementControllerImpl 23:43:16,557 INFO [main] AmbariServer:470 - Checking DB store version 23:43:16,562 INFO [main] AmbariServer:489 - DB store version is compatible 23:43:16,579 INFO [main] ClassPathXmlApplicationContext:456 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@3cfb4f72: startup date [Wed Oct 05 23:43:16 EDT 2016]; root of context hierarchy 23:43:16,621 INFO [main] DefaultListableBeanFactory:557 - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4e6e2060: defining beans []; root of factory hierarchy 23:43:16,629 INFO [main] ClassPathXmlApplicationContext:456 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4ee9893e: startup date [Wed Oct 05 23:43:16 EDT 2016]; parent: org.springframework.context.support.ClassPathXmlApplicationContext@3cfb4f72 23:43:16,632 INFO [main] XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [webapp/WEB-INF/spring-security.xml] 23:43:16,742 INFO [main] SpringSecurityCoreVersion:33 - You are running with Spring Security Core 3.1.2.RELEASE 23:43:16,742 INFO [main] SecurityNamespaceHandler:59 - Spring Security 'config' module version is 3.1.2.RELEASE 23:43:16,770 INFO [main] FilterInvocationSecurityMetadataSourceParser:134 - Creating access control expression attribute 'isAuthenticated()' for /** 23:43:16,771 INFO [main] FilterInvocationSecurityMetadataSourceParser:134 - Creating access control expression attribute 'hasRole('ADMIN')' for /** 23:43:16,781 INFO [main] HttpSecurityBeanDefinitionParser:264 - Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 300, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1200, <internalTokenAuthenticationFilter>, order = 1201, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1300, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1400, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1800, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1900, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 2000] 23:43:16,792 INFO [main] DefaultListableBeanFactory:557 - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ef934e5: defining beans [org.springframework.security.filterChains,org.springframework.security.filterChainProxy,org.springframework.security.web.PortMapperImpl#0,org.springframework.security.web.PortResolverImpl#0,org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0,org.springframework.security.authentication.ProviderManager#0,org.springframework.security.web.context.HttpSessionSecurityContextRepository#0,org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy#0,org.springframework.security.web.savedrequest.HttpSessionRequestCache#0,org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler#0,org.springframework.security.access.vote.AffirmativeBased#0,org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0,org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator#0,org.springframework.security.authentication.AnonymousAuthenticationProvider#0,org.springframework.security.userDetailsServiceFactory,org.springframework.security.web.DefaultSecurityFilterChain#0,org.springframework.security.authentication.dao.DaoAuthenticationProvider#0,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#0,org.springframework.security.authenticationManager,ambariEntryPoint]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@4e6e2060 23:43:16,926 INFO [main] DefaultSecurityFilterChain:28 - Creating filter chain: org.springframework.security.web.util.AnyRequestMatcher@1, [org.springframework.security.web.context.SecurityContextPersistenceFilter@4dc88642, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@27e67ef3, org.apache.ambari.server.security.authorization.internal.InternalTokenAuthenticationFilter@d9897fc, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1d22285d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2d88009c, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@3be0191e, org.springframework.security.web.session.SessionManagementFilter@75911f47, org.springframework.security.web.access.ExceptionTranslationFilter@a9caa9e, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@33857083] 23:43:16,970 INFO [main] Configuration:544 - Web App DIR test /usr/lib/ambari-server/web 23:43:16,973 INFO [main] CertificateManager:69 - Initialization of root certificate 23:43:16,973 INFO [main] CertificateManager:71 - Certificate exists:true 23:43:17,003 ERROR [main] ViewRegistry:700 - Could not create extracted view archive directory /var/lib/ambari-server/resources/views/work. 23:43:17,008 INFO [main] AmbariServer:394 - ********* Initializing Clusters ********** 23:43:17,008 INFO [main] AmbariServer:398 - ********* Current Clusters State ********* 23:43:17,008 INFO [main] AmbariServer:399 - Clusters=[ ] 23:43:17,008 INFO [main] AmbariServer:401 - ********* Initializing ActionManager ********** 23:43:17,008 INFO [main] AmbariServer:403 - ********* Initializing Controller ********** 23:43:17,008 INFO [main] AmbariServer:407 - ********* Initializing Scheduled Request Manager ********** 23:43:17,010 INFO [main] Server:266 - jetty-7.6.7.v20120910 23:43:17,036 INFO [main] ContextHandler:744 - started o.e.j.s.ServletContextHandler{/,file:/usr/lib/ambari-server/web/} 23:43:18,569 INFO [main] AbstractConnector:338 - Started SelectChannelConnector@0.0.0.0:8080 23:43:18,569 INFO [main] Server:266 - jetty-7.6.7.v20120910 23:43:18,570 INFO [main] ContextHandler:744 - started o.e.j.s.ServletContextHandler{/,null} 23:43:19,396 INFO [main] SslContextFactory:300 - Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] 23:43:19,399 INFO [main] AbstractConnector:338 - Started SslSelectChannelConnector@0.0.0.0:8440 23:43:19,418 INFO [main] SslContextFactory:300 - Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] 23:43:19,420 INFO [main] AbstractConnector:338 - Started SslSelectChannelConnector@0.0.0.0:8441 23:43:19,421 INFO [main] AmbariServer:423 - ********* Started Server ********** 23:43:19,421 INFO [main] ActionManager:74 - Starting scheduler thread 23:43:19,421 INFO [main] AmbariServer:426 - ********* Started ActionManager ********** 23:43:19,421 INFO [main] ExecutionScheduleManager:201 - Starting scheduler 23:43:19,480 INFO [main] MLog:80 - MLog clients using log4j logging. 23:43:19,550 INFO [main] C3P0Registry:204 - Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10] 23:43:19,578 INFO [main] StdSchedulerFactory:1184 - Using default implementation for ThreadExecutor 23:43:19,591 INFO [main] SchedulerSignalerImpl:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl 23:43:19,591 INFO [main] QuartzScheduler:240 - Quartz Scheduler v.2.2.1 created. 23:43:19,591 INFO [main] JobStoreTX:670 - Using thread monitor-based data access locking (synchronization). 23:43:19,592 INFO [main] JobStoreTX:59 - JobStoreTX initialized. 23:43:19,593 INFO [main] QuartzScheduler:305 - Scheduler meta-data: Quartz Scheduler (v2.2.1) 'ExecutionScheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 5 threads. Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreTX' - which supports persistence. and is not clustered. 23:43:19,593 INFO [main] StdSchedulerFactory:1339 - Quartz scheduler 'ExecutionScheduler' initialized from an externally provided properties instance. 23:43:19,593 INFO [main] StdSchedulerFactory:1343 - Quartz scheduler version: 2.2.1 23:43:19,593 INFO [main] QuartzScheduler:2311 - JobFactory set to: org.apache.ambari.server.state.scheduler.GuiceJobFactory@534c7840 23:43:19,593 INFO [main] AmbariServer:429 - ********* Started Scheduled Request Manager ********** 23:45:19,633 INFO [Thread-26] AbstractPoolBackedDataSource:462 - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 2wl8hm9j16760961m7sxx2|102afe25, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2wl8hm9j16760961m7sxx2|102afe25, idleConnectionTestPeriod -> 50, initialPoolSize -> 3, jdbcUrl -> jdbc:postgresql://localhost/ambari, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 5, maxStatements -> 0, maxStatementsPerConnection -> 120, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> select 0, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ] 23:45:19,679 INFO [Thread-26] JobStoreTX:861 - Freed 0 triggers from 'acquired' / 'blocked' state. 23:45:19,686 INFO [Thread-26] JobStoreTX:871 - Recovering 0 jobs that were in-progress at the time of the last shut-down. 23:45:19,686 INFO [Thread-26] JobStoreTX:884 - Recovery complete. 23:45:19,687 INFO [Thread-26] JobStoreTX:891 - Removed 0 'complete' triggers. 23:45:19,687 INFO [Thread-26] JobStoreTX:896 - Removed 0 stale fired job entries. 23:45:19,688 INFO [Thread-26] QuartzScheduler:575 - Scheduler ExecutionScheduler_$_NON_CLUSTERED started. ──────────────────────────────────────────────────────────────────────────────────────

But accessing the UI via my browser (I am on VPN, and telnet is working fine on the server and the port-8080)

Can anyone please suggest what is that which is going wrong?

4 REPLIES 4

Re: Cannot access Ambari UI after installation

@vibhor saxena

The problem looks like here:

ERROR [main] ViewRegistry:700 - Could not create extracted view archive directory /var/lib/ambari-server/resources/views/work

Can you please check if you have proper write permission inside the "/var/lib/ambari-server/resources/views/work".

Ambari extracts View related jars present inside the "/var/lib/ambari-server/resources/views" directory to the "/var/lib/ambari-server/resources/views/work" directory. You can try deleting the "work" directory and then restart ambari-server it will recreate the "work" directory.

Aldo are you running ambari as "root" user or non root user? If you are planning to run it as non root user then you should look at:

https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_Ambari_Security_Guide/content/_how_to_co...

Re: Cannot access Ambari UI after installation

New Contributor

Thanks for getting back - I did try what you suggested, but to no avail. I'm getting the same error in the logs of ambari server.

Also, tried giving 777 permissions on the directory /var/lib/ambari-server/resources to check if anyone can create a directory if needed, but it didn't. There is no directory such as /resources/views

sudo ls /var/lib/ambari-server/resources/ Ambari-DDL-MySQL-CREATE.sql Ambari-DDL-Postgres-CREATE.sql custom_action_definitions role_command_order.json upgrade Ambari-DDL-MySQL-DROP.sql Ambari-DDL-Postgres-DROP.sql custom_actions scripts version Ambari-DDL-Oracle-CREATE.sql Ambari-DDL-Postgres-EMBEDDED-CREATE.sql DBConnectionVerification.jar stacks Ambari-DDL-Oracle-DROP.sql Ambari-DDL-Postgres-EMBEDDED-DROP.sql jdk-7u45-linux-x64.tar.gz UnlimitedJCEPolicyJDK7.zip

I am doing this as a user who has sudo privileges.

Re: Cannot access Ambari UI after installation

@vibhor saxena

As you mentioned that there is no directory inside the "/var/lib/ambari-server/resources" which means you have an Incorrect/Incomplete Ambari Server Installation. You should reinstall the ambari server as following:

yum remove  ambari-server -y
rm   -rf   /etc/ambari-server
rm   -rf   /var/lib/ambari-server
yum install ambari-server -y
ambari-server setup
ambari-server start

Re: Cannot access Ambari UI after installation

@vibhor saxena

As the code suggests you might be running ambari as a user who do not have permissions to write on views dir: https://git1-us-west.apache.org/repos/asf?p=ambari.git;a=blob;f=ambari-server/src/main/java/org/apac...

 698  if (!extractedArchiveDir.exists()) {
 699  if (!extractedArchiveDir.mkdir()) {
 700  LOG.error("Could not create extracted view archive directory " +
 701  extractedArchivesPath + ".");
 702  return false;
 703  }
 704  }

So please check the following two things:

1). The user who is running the ambari has proper permissions. If not then refer to: https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_Ambari_Security_Guide/content/_how_to_co...

2). Make sure that the "/var/lib/ambari-server/resources/views/" directory exist and it has view related JARs there.

3). If the "/var/lib/ambari-server/resources/views/" directory does not exist in your installation then your ambari installation is corrupted. Please do a reinstall of ambari as suggested earlier.