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

500 server error when trying to spawn new netconf connector

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Low Low
    • 7.0.5
    • None
    • restconf-nb

      For example, when we try to spawn new netconf connector, with "password" not following base64 encoding

      PUT /rests/data/network-topology:network-topology/topology=topology-netconf/node=netconf-mdsal
      
      {
          "network-topology:node": [
              {
                  "node-id": "netconf-mdsal",
                  "netconf-node-topology:concurrent-rpc-limit": 0,
                  "netconf-node-topology:schema-cache-directory": "netconf-mdsal",
                  "netconf-node-topology:login-password": {
                      "username": "admin",
                      "password": "admin"
                  },
                  "netconf-node-topology:default-request-timeout-millis": 1800000,
                  "netconf-node-topology:port": 2830,
                  "netconf-node-topology:tcp-only": false,
                  "netconf-node-topology:host": "127.0.0.1",
                  "netconf-node-topology:actor-response-wait-time": 600,
                  "netconf-node-topology:keepalive-delay": 600
              }
          ]
      }
      

      The response is only 500 server error.

      And we can see exceptions in karaf.log.

      Compared to if we try to do same thing but with POST request as follows:

      POST /rests/data/network-topology:network-topology/topology=topology-netconf
      
      {
          "network-topology:node": [
              {
                  "node-id": "netconf-mdsal",
                  "netconf-node-topology:concurrent-rpc-limit": 0,
                  "netconf-node-topology:schema-cache-directory": "netconf-mdsal",
                  "netconf-node-topology:login-password": {
                      "username": "admin",
                      "password": "admin"
                  },
                  "netconf-node-topology:default-request-timeout-millis": 1800000,
                  "netconf-node-topology:port": 2830,
                  "netconf-node-topology:tcp-only": false,
                  "netconf-node-topology:host": "127.0.0.1",
                  "netconf-node-topology:actor-response-wait-time": 600,
                  "netconf-node-topology:keepalive-delay": 600
              }
          ]
      }
      

      We get response like this:

      {
          "errors": {
              "error": [
                  {
                      "error-tag": "malformed-message",
                      "error-info": "Last unit does not have enough valid bits",
                      "error-message": "Error parsing input: Last unit does not have enough valid bits",
                      "error-type": "protocol"
                  }
              ]
          }
      }
      

            ojo Oleksandr Zharov
            SamoSchneider Samuel Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: