kafka-connect-tools
kafka-connect-tools copied to clipboard
Configure custom read timeout interval to handle sockettimeout
Hi.
Is it possible to configure a custom read timeout interval for http requests? The stacktrace below was generated by cli v. 0.5. This is not a problem on client side, because obviously it depends on server response, but in some cases it could be useful.
java.net.SocketTimeoutException: Read timed out at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at scalaj.http.HttpRequest.exec(Http.scala:351) at scalaj.http.HttpRequest.execute(Http.scala:322) at scalaj.http.HttpRequest.asString(Http.scala:537) at com.datamountaineer.connect.tools.ScalajHttpClient$.request(RestKafkaConnectApi.scala:62)
Where is your Schema registry?
It's a docker environment, and kafka cli and schema registry containers are in the same network. This is not a persistent problem, it occurs sometimes, probably for heavy load, executing run commands on kafka connectors. As I said, this is not a client problem. I'm wondering if it could be handled increasing timeout on client side.