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

500 response without provided rpc failure details

XMLWordPrintable

      When the following rpc reply is returned from a mounted device, an IllegalArgumentException
      is thrown for "Unexpected content in response of rpc".

      <nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/18.4R1/junos" message-id="m-11">
      
          <nc:rpc-error>
      
              <nc:error-type>protocol</nc:error-type>
      
              <nc:error-tag>operation-failed</nc:error-tag>
      
              <nc:error-severity>error</nc:error-severity>
      
              <source-daemon>
      dcd
      </source-daemon>
      
              <nc:error-message>
      Number of member links configured, i.e [1], for interface [ae0]is lesser than the required minimum [2].
      </nc:error-message>
      
          </nc:rpc-error>
      
          <nc:rpc-error>
      
              <nc:error-type>protocol</nc:error-type>
      
              <nc:error-tag>operation-failed</nc:error-tag>
      
              <nc:error-severity>error</nc:error-severity>
      
              <nc:error-message>
      configuration check-out failed
      </nc:error-message>
      
          </nc:rpc-error>
      
      </nc:rpc-reply>
      

      The client that issued the rpc via restconf receives the below response text with the 500
      code:

      {
          "errors": {
              "error": [
                  {
                      "error-type": "application",
                      "error-tag": "operation-failed",
                      "error-message": "Commit of transaction org.opendaylight.netconf.sal.connect.netconf.sal.tx.WriteCandidateTx@5f8be763 failed",
                      "error-info": "RemoteDevice{junos-01}:RPC during tx returned an exceptionTask was cancelled."
                  }
              ]
          }
      }
      

      Attached is a karaf.log snippet from when the rest request is sent and finally the
      500 response is given.

      The rpc response, seen above in the karaf.log snippet is very clear to the reason for the
      failure and if delivered to the caller in the response text.

            jluhrsen Jamo Luhrsen
            jluhrsen Jamo Luhrsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: