Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar

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

1,506 Views
0 Kudos
Version history
Last update:
‎04-20-2017 12:59 PM
Updated by:
Contributors