[NETCONF-103] RestPerfClient spits NumberFormatException and hangs Created: 02/Dec/15  Updated: 15/Mar/19  Resolved: 11/Dec/15

Status: Resolved
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jozef Behran Assignee: Jakub Morvay
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4700

 Description   

Tested with https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/netconf/netconf-testtool/1.0.0-SNAPSHOT/netconf-testtool-1.0.0-20151201.153854-78-rest-perf-client.jar

Tested also with build 71 (no longer available in Nexus).

Steps to reproduce:

1. touch edit.txt # so that some "edit content" can be read

2. java -Xmx1G -XX:MaxPermSize=256M -jar netconf-testtool-1.0.0-20151201.153854-78-rest-perf-client.jar --ip 10.25.2.9 --port 8181 --edits 10 --destination network-topology:network-topology/topology/topology-netconf/node/17830-sim-device/yang-ext:mount

You will see (timestamps will vary):

11:06:38.924 [main] INFO o.o.n.t.t.c.http.perf.RestPerfClient - thread amount: 1
11:06:38.930 [main] INFO o.o.n.t.t.c.http.perf.RestPerfClient - requestsPerThread: 10
11:06:38.930 [main] INFO o.o.n.t.t.c.http.perf.RestPerfClient - leftoverRequests: 0
Exception in thread "main" java.lang.NumberFormatException: For input string: "8181network-topology:network-topology"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at com.ning.http.client.uri.UriParser.computeRegularHostPort(UriParser.java:197)
at com.ning.http.client.uri.UriParser.parseAuthority(UriParser.java:275)
at com.ning.http.client.uri.UriParser.parse(UriParser.java:336)
at com.ning.http.client.uri.Uri.create(Uri.java:30)
at com.ning.http.client.uri.Uri.create(Uri.java:25)
at com.ning.http.client.RequestBuilderBase.setUrl(RequestBuilderBase.java:307)
at com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.setUrl(AsyncHttpClient.java:308)
at com.ning.http.client.AsyncHttpClient.requestBuilder(AsyncHttpClient.java:596)
at com.ning.http.client.AsyncHttpClient.preparePost(AsyncHttpClient.java:442)
at org.opendaylight.netconf.test.tool.client.http.perf.PerfClientCallable.<init>(PerfClientCallable.java:39)
at org.opendaylight.netconf.test.tool.client.http.perf.RestPerfClient.main(RestPerfClient.java:128)

and the RestPerfClient then hangs.



 Comments   
Comment by Jozef Behran [ 02/Dec/15 ]

It turns out the problem is here:

--destination network-topology:network-topology/topology/topology-netconf/node/17830-sim-device/yang-ext:mount

(note the missing leading slash in the argument)

This causes the restperfclient to attempt to use this URL:

https://10.25.2.9:8181network-topology:network-topology/topology/topology-netconf/node/17830-sim-device/yang-ext:mount

(which is broken - note the missing "/" between the port number and the path), which causes it to crash in the URL handling code with the exception described in the bug (note the "8181network-topology:network-topology" string in the exception which is spanning exactly from the start of the port number to the first "/" in the broken URL).

Comment by Jakub Morvay [ 09/Dec/15 ]

https://git.opendaylight.org/gerrit/#/c/31083/

Generated at Wed Feb 07 20:14:11 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.