Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-855

Error http 500 during PUT into ODL controller-config.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • None
    • None
    • config
    • None
    • Operating System: Linux
      Platform: All

    • 1946

    Description

      curl -v -f -X PUT -H "Content-Type:application/xml" -H "Accept:application/xml" -d '<modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config"><module><name>test14</name></module></modules>' http://10.195.91.136:8080/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules

      PRODUCES ERROR:
      ===============

      • Hostname was NOT found in DNS cache
      • Trying 10.195.91.136...
      • Connected to 10.195.91.136 (10.195.91.136) port 8080 (#0)
        > PUT /restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules HTTP/1.1
        > User-Agent: curl/7.35.0
        > Host: 10.195.91.136:8080
        > Content-Type:application/xml
        > Accept:application/xml
        > Content-Length: 117
        >
      • upload completely sent off: 117 out of 117 bytes
      • The requested URL returned error: 500 Internal Server Error
      • Closing connection 0
        curl: (22) The requested URL returned error: 500 Internal Server Error

      ------------------------------------------------------------------------------
      The same error , but in test code is:
      ------------------------------------------------------------------------------
      Test_Scenario_PUT14_put_config_modules = {
      'method': 'PUT',
      'uri': '/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules',
      'headers':

      {'content-type': 'application/xml','accept': 'application/xml'}

      ,
      'data': '''
      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
      <module>
      <name>test14</name>
      </module>
      </modules>
      ''',
      'expected_status': 204,
      'expected': '''
      '''
      }

      ------------------------------------------------------------------------------
      Text output of test:
      ------------------------------------------------------------------------------
      Test_Scenario_PUT14_put_config_modules | FAIL |
      <html><head><title>Apache Tomcat/7.0.53 - Error report</title><style><!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      A.name

      {color : black;}

      HR

      {color : #525D76;}

      --></style> </head><body><h1>HTTP Status 500 - RemoteDevice

      {controller-config}: Error while replacing /(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)modules</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>RemoteDevice{controller-config}

      : Error while replacing /(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)modules</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.RuntimeException: RemoteDevice

      {controller-config}: Error while replacing /(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)modules
      org.opendaylight.controller.sal.connect.netconf.sal.tx.NetconfDeviceWriteOnlyTx.put(NetconfDeviceWriteOnlyTx.java:125)
      [ Message content over the limit has been removed. ]
      com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
      com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
      com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
      com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
      com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
      com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.53 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.53</h3></body></html>: 500 != 204


      -------------------------------------------------------------------------------
      Content of /opt/opendaylight/logs/opendaylight.log:
      -------------------------------------------------------------------------------

      at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [bundlefile:4.0.23.Final]
      at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
      2014-09-17 05:41:09.935 PDT [http-bio-8080-exec-4] WARN o.o.c.s.c.n.s.t.NetconfDeviceWriteOnlyTx - RemoteDevice{controller-config}

      : Error putting data to /(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)modules, data: ImmutableContainerNode{nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)modules, value=[ImmutableMapNode{nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)module, value=[ImmutableMapEntryNode{nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)module[

      {(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)name=test14}

      ], value=[ImmutableLeafNode{nodeIdentifier=(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)name, value=test14, attributes={}}], attributes={}}]}], attributes={}}, discarding changes
      java.util.concurrent.ExecutionException: RemoteDevice

      {controller-config}

      : Pre-commit rpc failed, request: Node[ImmutableCompositeNode], qName[edit-config], modify[n/a], children.size = 3, errors: [RpcError [message=One element urn:opendaylight:params:xml:ns:yang:controller:config:type expected in XmlElement

      {name='module', namespace='urn:opendaylight:params:xml:ns:yang:controller:config'}

      but was 0, severity=ERROR, errorType=APPLICATION, tag=invalid-value, applicationTag=null, info=, cause=null]]
      at org.opendaylight.controller.sal.connect.netconf.sal.tx.NetconfDeviceWriteOnlyTx.sendEditRpc(NetconfDeviceWriteOnlyTx.java:238) ~[bundlefile:na]
      at org.opendaylight.controller.sal.connect.netconf.sal.tx.NetconfDeviceWriteOnlyTx.put(NetconfDeviceWriteOnlyTx.java:120) ~[bundlefile:na]
      at org.opendaylight.controller.sal.connect.netconf.sal.tx.NetconfDeviceReadWriteTx.put(NetconfDeviceReadWriteTx.java:46) [bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.putDataViaTransaction(BrokerFacade.java:227) [bundlefile:na]
      at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.commitConfigurationDataPut(BrokerFacade.java:115) [bundlefile:na]

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              penemec@cisco.com Peter NEMEC
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: