KB Article #176656

Failing to download trace log files from API Gateway Manager in the browser

Problem

The Gateway Manager interface on port 8090 lists all the previous generations of trace files in chronological order under Logs and then the tab "Log Trace". However on trying to download one of the files through the download link the browser displays an error ...



{
"errors" : [ {
"code" : 102,
"message" : "error occurred on call from Node Manager on 'node-731-21' to https://node-731-21:8085' for URL '/opt/api/file/save/trace-dir/api1_node-731-21_20141120111856.trc' and 'GET'\n"
} ],
"result" : null
}



The Gateway Instance will show the following error in its trace file



ERROR 08/Dec/2014:09:50:43.664 [e8e8700] non-recoverable error handling transaction:
java.io.IOException: con=0x7fb34c285fe0,endpoint=127.0.0.1:incoming,bio=0x7fb34c2e0b88 max read/write len reached 10485760
at com.vordel.dwe.TransactionOutputStream.write(Native Method)
at com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebComponent.java:292)
at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.write(ContainerResponse.java:139)
at com.vordel.dwe.file.Service$1.write(Service.java:329)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)



ERROR 08/Dec/2014:09:50:43.664 [e8e8700] error handling connection: con=0x7fb34c285fe0,endpoint=127.0.0.1:incoming connection closed



and the Node Manager will report ...



INFO 08/Dec/2014:09:53:06.580 [25c1700] IO Exception relaying data:
java.io.IOException: con=0x7fccf43d1160,endpoint=localhost:8085,bio=0x7fccf44659c8 max read/write len reached 10485760
at com.vordel.dwe.InputStream.read(Native Method)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at com.vordel.common.util.IOUtil.copy(IOUtil.java:55)
at com.vordel.api.router.RouterService$ServiceResponseCallback.finishedProcessing(RouterService.java:206)
at com.vordel.api.connection.MultiResponseRetriever.queryNodeFinish(MultiResponseRetriever.java:93)
at com.vordel.api.connection.MultiResponseRetriever.access$000(MultiResponseRetriever.java:18)
at com.vordel.api.connection.MultiResponseRetriever$1.finishedProcessing(MultiResponseRetriever.java:72)
at com.vordel.api.connection.MultiResponseRetriever$ResponseRetrieverThread.run(MultiResponseRetriever.java:146)



ERROR 08/Dec/2014:09:53:06.580 [15b1700] error occurred on call from Node Manager on 'node-731-21' to https://node-731-21:8085' for URL '/api/file/save/trace-dir/api1_node-21_20141208093112.trc' and 'GET'



The same file can be viewed successfully in-line by clicking on the filename.



Resolution

The error occurs because there is a restriction of 10Mbytes on the maximum amount of data that can be transferred in a single transaction.


There is a workaround by bringing down the size that trace files roll over from default 16M to slightly less than 10MB.

See maxlen setting in https://support.axway.com/kb/169947/language/en

A sample script is provided updateMaxInOutLen.py to help change the maxlen, please see KB article How to download large trace files from API Gateway Manager for more details.