Uploaded image for project: 'Data Movement as a Platform'
  1. Data Movement as a Platform
  2. DMAAP-1443

Client does not timeout if there is no response from Message Router Server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Guilin Release
    • Frankfurt Release
    • None

      The karaf log of SDNR component has the following last DEBUG output for the MR consumer polling function (fetchWithReturnConsumerResponse), after 22h hours running

      2020-05-28T14:53:47,827 | DEBUG | Thread-61 | HttpURLConnection | - - | - | sun.net.www.messageheader@2c24234c6 pairs: *{GET /events/XXXXXX?timeout=50000 HTTP/1.1: null} {Authorization: Basic XXXXXX=} {User-Agent: Jersey/2.25.1 (HttpUrlConnection 1.8.0_222)} {Host: YYYYYYYYY} {Accept: text/html, image/gif, image/jpeg, ; q=.2, /; q=.2} {Connection: keep-alive}

      2020-05-28T14:53:47,828 | DEBUG | Thread-62 | HttpURLConnection | - - | - | sun.net.www.messageheader@45d206956 pairs: *{GET /events/XXXXXX?timeout=50000 HTTP/1.1: null} {Authorization: Basic XXXXXX=} {User-Agent: Jersey/2.25.1 (HttpUrlConnection 1.8.0_222)} {Host: YYYYYYYYY} {Accept: text/html, image/gif, image/jpeg, ; q=.2, /; q=.2} {Connection: keep-alive}

      No answer coming back, get/answer cycle not completed. Observation with TransportType = HTTPAAF
      Problems: Timeout of 50000ms forwarded to DMaaP Server and not handled by client. Client waits endless if TCP/IP connection remains open, but server is not answering for any reason (Potential issue is that the server internal timeout message gets lost)

      The dmaapclient library needs to implement a readtimeout so that if for some reason the server does not respond in a stipulated time, the client times out and resumes the remaining flow instead of endlessly waiting for a server response. The dmaap-listener in ccsdk/sli/northbound has a custom implementation of such a functionality using jax-rs to workaround the issue of the dmaapclient library.

      ClientBuilder clientBuilder = ClientBuilder.newBuilder();
      clientBuilder.connectTimeout(connectTimeoutSeconds, TimeUnit.SECONDS);
      clientBuilder.readTimeout(readTimeoutMinutes, TimeUnit.MINUTES);
      return clientBuilder.build();
      

       

            sunil.unnava sunil.unnava
            pendurty Ravi Pendurty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: