Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-5676

[RESTCONF] RESTCONF client hangs on event notification subscription

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      1

      Description

      Suppose a RESTCONF client uses the following code to register and received notifications from the RESTCONF server. The execution of this code will stuck in "client.target(..).request(..).get()" call. However, other client implementations, such as curl, do not seem to have this problem. i.e., curl can successfully register and receive events from RESTCONF server.

      public class TestNotification {

      public static void main(String[] args){
      Client client = ClientBuilder.newClient();
      //String contentType="text/plain";
      String contentType="application/json";
      Response response = client.target("http://127.0.0.1:8181/onos/restconf/streams/netconf").request(contentType).get();

      final ChunkedInput<String> chunkedInput =
      response.readEntity(new GenericType<ChunkedInput<String>>() {});
      String chunk;
      while ((chunk = chunkedInput.read()) != null)

      { System.out.println("Next chunk received: " + chunk); }

      System.out.println("Terminated2" );
      }
      }

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            hyu2010 Henry Yu
            Reporter:
            hyu2010 Henry Yu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: