Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1273

Error 500 on Notification Stream Access for Netconf Device Subscriptions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 7.0.5
    • 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4
    • restconf-nb

      Steps to reproduce:
      1. Run karaf.
      2. Run Netopeer and connect it to the controller.
      3. Create Subscription for netooper device

      curl --location 'http://localhost:8181/rests/operations/network-topology:network-topology/topology=topology-netconf/node=netopeer/yang-ext:mount/notifications:create-subscription' \
      --header 'Accept: application/json' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
      --data '{
        "input": {
          "stream": "NETCONF"
         }
      }'
      

      4. Create the HTTP Stream for the events

      curl --location 'http://localhost:8181/rests/operations/odl-device-notification:subscribe-device-notification' \
      --header 'Accept: application/json' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
      --data '{
        "input": {
           "path":"/network-topology:network-topology/topology[topology-id='\''topology-netconf'\'']/node[node-id='\''netopeer'\'']"
        }
      }'

      5. Use the stream name from the output of previous request to make GET request for Listening of subscibtion.

      http://localhost:8181/rests/streams/json/{stream-name}
      

      e.g http://localhost:8181/rests/streams/json/urn:uuid:c3324426-d560-409a-8efc-3ce94b8962a8

      6. You will see standard error output from servlet

      <html>
      
      <head>
          <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
          <title>Error 500 Request failed.</title>
      </head>
      
      <body>
          <h2>HTTP ERROR 500 Request failed.</h2>
          <table>
              <tr>
                  <th>URI:</th>
                  <td>/rests/streams/json/urn:uuid:ae8a49d2-96d8-41b3-b91d-b6069ecd281f</td>
              </tr>
              <tr>
                  <th>STATUS:</th>
                  <td>500</td>
              </tr>
              <tr>
                  <th>MESSAGE:</th>
                  <td>Request failed.</td>
              </tr>
              <tr>
                  <th>SERVLET:</th>
                  <td>notificationServlet</td>
              </tr>
          </table>
      
      </body>
      
      </html>
      

      Check logs for more detailed info
      karaf.log

            yaroslav.lastivka Yaroslav Lastivka
            yaroslav.lastivka Yaroslav Lastivka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: