Member since
06-20-2016
308
Posts
103
Kudos Received
29
Solutions
04-20-2017
12:59 PM
How to increase Read time out value from Ambari stand alone view server to Ambari main server Stand alone Ambari view server makes below call to fetch configurations from Remote server. http://REMOTEAMBARI:8080/api/v1/clusters/CLUSTER_NAME?fields=services/ServiceInfo,hosts,Clusters If this takes more than 10 seconds you will be exception in the logs. because of that non of the views would work. Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:170)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at org.apache.ambari.server.controller.internal.URLStreamProvider.processURL(URLStreamProvider.java:218)
at org.apache.ambari.server.controller.internal.URLStreamProvider.processURL(URLStreamProvider.java:142)
at org.apache.ambari.server.view.RemoteAmbariStreamProvider.readFrom(RemoteAmbariStreamProvider.java:67)
at org.apache.ambari.server.view.RemoteAmbariCluster.readFromUrlJSON(RemoteAmbariCluster.java:297)
at org.apache.ambari.server.view.RemoteAmbariCluster.access$000(RemoteAmbariCluster.java:51)
at org.apache.ambari.server.view.RemoteAmbariCluster$1.load(RemoteAmbariCluster.java:83)
at org.apache.ambari.server.view.RemoteAmbariCluster$1.load(RemoteAmbariCluster.java:80)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
... 109 more
Add the below configuration in Remote/Main Ambari server /etc/ambari-server/conf/ambari.properties file. please note that this needs Ambari-server restart. views.request.read.timeout.millis=20000 Note: This is tried and tested in Ambari-2.5.0.3 version
... View more
Labels:
04-19-2017
11:49 PM
5 Kudos
If Ambari wrongly shows as "Add Service Wizard in Progress", starting from Ambari-2.5.x you can fix this reset the UI state. here is the steps. 1. Go to http://AMBARI-HOST:8080/#/experimental 2. Click on "Reset UI state" button 3. Now login and check the UI. it will be showing all the service options. Note: This is applicable only from Ambari-2.5.x
... View more
Labels:
04-19-2017
11:34 PM
some times if you run some curl calls expecting to fix some other issues - it may turn out to that Ambari UI does not even load the UI. Running the below call would fix the issue and load the UI. curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d '{"wizard-data":"{\"userName\":\"admin\",\"controllerName\":\"\"}"}'http://AMBARIHOST:8080/api/v1/persist Note: Please note that these call should run with caution. contact Hortonworks support team. This is tried and tested with Ambari-2.4.x
... View more
Labels:
02-24-2017
08:51 PM
Steps to enable Trace logging in Ambari server for Oracle Database. Step1: 1. Download ojdbc6_g.jar from Oracle JDBC driver trace jar and copy to /usr/share/java and make sure to have correct permissions.
Note: take out the actual ojdbc.jar from the location. 2.Create /etc/ambari-server/conf/oracle.properties .level=ALL
oracle.jdbc.level=INFO
oracle.jdbc.handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=INFO
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
3. Add "-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/etc/ambari-server/conf/oracle.properties" property in /var/lib/ambari-server/ambari-env.sh export AMBARI_JVM_ARGS=$AMBARI_JVM_ARGS' -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djav
to
export AMBARI_JVM_ARGS=$AMBARI_JVM_ARGS' -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/etc/ambari-server/conf/oracle.properties -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djav
After restart you will see logs being written to jdbc.log file
... View more
Labels:
02-24-2017
08:14 PM
1 Kudo
Steps to enable Query logging in Ambari server with Postgres Database
1. If it is Postgres as DB then add following property in ambari.properties
server.jdbc.properties.loglevel=2
After restart you can see SQL query logging to Ambari-server.out file
2.If it is MySQL as DB then add/update following property in ambari.properties.
append below value in JDBC URL
?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=true
Ex:
server.jdbc.rca.url=jdbc:mysql://apappudb.hdp.com:3306/ambariupgrade?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=true
and
server.jdbc.url=jdbc:mysql://apappudb.hdp.com:3306/ambariupgrade?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=true
After re-start you will find the logs in ambari-server.log
... View more
Labels:
02-23-2017
10:47 PM
3 Kudos
Steps to enable SSL for Grafana from the keystore file. 1. First create keystore file using below command. $JAVA_HOME/bin/keytool -genkey -keyalg RSA -alias grafana -keystore keystore.jks -validity 360 -keysize 2048 2. Now export cert from JKS file keytool -export -alias grafana -file server.cer -keystore keystore.jks
3. Convert cert from DER to PEM format openssl x509 -in server.cer -inform der -outform pem -out cert.pem 4. Export privatekey to PKCS12 file keytool -v -importkeystore -srckeystore keystore.jks -srcalias ambari -destkeystore myp12file.p12 -deststoretype PKCS12 5. Now export private key from PKCS12 to PEM format. openssl pkcs12 -in myp12file.p12 -clcerts -nodes -nocerts | openssl rsa > private.key Note: private.key should be unencrypted file. it should be like -----BEGIN RSA PRIVATE KEY-----
xxxx
-----END RSA PRIVATE KEY----- Should be not having like "-----BEGIN ENCRYPTED PRIVATE KEY-----" The reason for using un encrypted key is because Grafana does not have any option to take privatekey password. 6. configure below properties under "Advanced ams-grafana-ini" Advanced ams-grafana-ini protocol https Advanced ams-grafana-ini cert_file path/cert.pem Advanced ams-grafana-ini cert-Key path/private.key 7. Restart Grafana server 8. You should be able to access the UI using https://HOSTNAME:3000/
... View more
Labels:
02-23-2017
05:20 PM
1 Kudo
1. Create keystore file first. keytool -genkey -keyalg RSA -alias ooziehost -keystore keystore.jks -validity 360 -keysize 2048 2. Login to Ambari server and go to Oozie configurations. 3. Add below configurations under "Advanced oozie-env" export OOZIE_HTTPS_PORT=11443
export OOZIE_HTTPS_KEYSTORE_FILE=/tmp/keystore.jks
export OOZIE_HTTPS_KEYSTORE_PASS=bigdata
4. Restart Oozie service from UI. 5. Now launch the Oozie UI from quick links - you should be able to access the URL https://OOZIEHOST:11443/oozie/ Note: Make sure to import the cert into Ambari Truststore.
... View more
Labels:
02-06-2017
10:15 PM
3 Kudos
Here is the steps to access HBase UI through Knox. This is tried and tested with Ambari 2.4 and HDP2.5 1. Make sure Knox is configured properly and it works fine. 2. ssh to Knox gateway host and go to /var/lib/knox/data-2.5.3.0-37/services 3. download the configurations from https://github.com/apache/knox/tree/v0.11.0/gateway-service-definitions/src/main/resources/services/hbaseui/1.1.0/ URL. 4. make sure your folder structure should look alike /var/lib/knox/data-2.5.3.0-37/services/hbaseui/1.1.0 and should have rewrite.xml and service.xml files 5. change the owner/Group permissions to Knox for /var/lib/knox/data-2.5.3.0-37/services/hbaseui/ and subdirectory 6. Go to Knox configurations Modify "Advanced topology" with below service tag <service>
<role>HBASEUI</role>
<url>http://HBASEMANTERHOST:16010</url>
</service>
<service>
7. Restart Knox service. 8. You should be able to access HBase UI from the below URL https://Knxo-host:8443/gateway/default/hbase/webui/ Note: replace default with your correct 'identity-assertion'
... View more
Labels:
02-06-2017
10:11 PM
2 Kudos
Here is the steps to access HDFS UI through Knox. This is tried and tested with Ambari 2.4 and HDP2.5 1. Make sure Knox is configured properly and it works fine. 2. ssh to Knox gateway host and go to /var/lib/knox/data-2.5.3.0-37/services 3. download the configurations from https://github.com/apache/knox/tree/v0.11.0/gateway-service-definitions/src/main/resources/services/hdfsui/2.7.0/ URL. 4. make sure your folder structure should look alike /var/lib/knox/data-2.5.3.0-37/services/hdfsui/2.7.0 and should have rewrite.xml and service.xml files 5. change the owner/Group permissions to Knox for /var/lib/knox/data-2.5.3.0-37/services/hdfsui/ and subdirectory 6. Go to Knox configurations Modify "Advanced topology" with below service tag <service>
<role>HDFSUI</role>
<url>http://NNHOST:50070</url>
</service>
7.Restart Knox service. 8. You should be able to access Name node UI from the below URL https://Knxo-host:8443/gateway/default/hdfs/ Note: replace default with your correct 'identity-assertion'
... View more
Labels:
02-01-2017
11:04 PM
@Robert Levas thanks for that pointer, however here customer would like to enable the Kerberos after some time with custom principals names.
... View more