[CONTROLLER-855] Error http 500 during PUT into ODL controller-config. Created: 18/Sep/14 Updated: 25/Jul/23 Resolved: 09/Nov/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | config |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Peter NEMEC | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| External issue ID: | 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:
------------------------------------------------------------------------------ , ------------------------------------------------------------------------------ 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)modulesorg.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 : 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]] |
| Comments |
| Comment by Peter NEMEC [ 18/Sep/14 ] |
|
Attachment content_of_config_initial.txt has been added with description: configs , 99... is controller-config loopback |
| Comment by Maros Marsalek [ 24/Sep/14 ] |
|
Data is invalid so rpc-error is expected. However the response code should not be 500, restconf should handle the response as error and respond with 4xx response code. |
| Comment by Jozef Gloncak [ 25/Sep/14 ] |
|
Server should response with 4** HTTP errors. In enhancement 1110 it is planned to create common exception for netconf and restconf. Once the same exception will be visible in netconf and restconf then it can be handled in restconf and better HTTP response will be returned. NETCONF-4 was set as blocker. |
| Comment by Tony Tkacik [ 09/Nov/15 ] |
|
Data were invalid, server error expected. |