How to increase Read time out value from Ambari stand alone view server to Main/Remote Ambari server
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

