Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Apache License 2.0
1.11k stars 75 forks source link

SocketException: Broken pipe #49

Closed ohonchar closed 1 year ago

ohonchar commented 1 year ago

hello, I'm trying to run tests using this command: cats --contract=<my-yaml>.yaml --server=http://<my-server> --blackbox and after generating some amount of tests it fails with an error Exception while processing!: com.endava.cats.io.CatsIOException: java.net.SocketException: Broken pipe

`[Test 2627*][VLUSIFF] ✖ error Exception while processing!: com.endava.cats.io.CatsIOException: java.net.SocketException: Broken pipe at com.endava.cats.io.ServiceCaller.call(ServiceCaller.java:225) at com.endava.cats.io.ServiceCaller_Subclass.call$$superforward1(Unknown Source) at com.endava.cats.io.ServiceCaller_Subclass$$function$$1.apply(Unknown Source) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:53) at com.endava.cats.aop.DryRunAspect.intercept(DryRunAspect.java:116) at com.endava.cats.aop.DryRunAspect_Bean.intercept(Unknown Source) at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41) at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:40) at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32) at com.endava.cats.io.ServiceCaller_Subclass.call(Unknown Source) at com.endava.cats.io.ServiceCaller_ClientProxy.call(Unknown Source) at com.endava.cats.fuzzer.fields.base.BaseFieldsFuzzer.process(BaseFieldsFuzzer.java:86) at com.endava.cats.fuzzer.fields.base.BaseFieldsFuzzer.lambda$fuzz$0(BaseFieldsFuzzer.java:65) at com.endava.cats.report.TestCaseListener.createAndExecuteTest(TestCaseListener.java:110) at com.endava.cats.report.TestCaseListener_Subclass.createAndExecuteTest$$superforward1(Unknown Source) at com.endava.cats.report.TestCaseListener_Subclass$$function$$27.apply(Unknown Source) at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:53) at com.endava.cats.aop.DryRunAspect.intercept(DryRunAspect.java:116) at com.endava.cats.aop.DryRunAspect_Bean.intercept(Unknown Source) at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41) at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:40) at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32) at com.endava.cats.report.TestCaseListener_Subclass.createAndExecuteTest(Unknown Source) at com.endava.cats.report.TestCaseListener_ClientProxy.createAndExecuteTest(Unknown Source) at com.endava.cats.fuzzer.fields.base.BaseFieldsFuzzer.fuzz(BaseFieldsFuzzer.java:65) at com.endava.cats.command.CatsCommand.lambda$fuzzPath$6(CatsCommand.java:232) at java.util.ArrayList.forEach(ArrayList.java:1511) at com.endava.cats.command.CatsCommand.fuzzPath(CatsCommand.java:229) at com.endava.cats.command.CatsCommand.startFuzzing(CatsCommand.java:142) at com.endava.cats.command.CatsCommand.doLogic(CatsCommand.java:126) at com.endava.cats.command.CatsCommand.run(CatsCommand.java:112) at picocli.CommandLine.executeUserObject(CommandLine.java:1939) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) at picocli.CommandLine.execute(CommandLine.java:2078) at com.endava.cats.CatsMain.run(CatsMain.java:33) at com.endava.cats.CatsMain_ClientProxy.run(Unknown Source) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:131) at io.quarkus.runtime.Quarkus.run(Quarkus.java:67) at io.quarkus.runtime.Quarkus.run(Quarkus.java:41) at io.quarkus.runner.GeneratedMain.main(Unknown Source) Caused by: java.net.SocketException: Broken pipe at sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420) at sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440) at sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826) at java.net.Socket$SocketOutputStream.write(Socket.java:1035) at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:345) at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1303) at okio.OutputStreamSink.write(JvmOkio.kt:57) at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:99) at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255) at okio.RealBufferedSink.write(RealBufferedSink.kt:146) at okhttp3.internal.http2.Http2Writer.writeContinuationFrames(Http2Writer.kt:285) at okhttp3.internal.http2.Http2Writer.headers(Http2Writer.kt:310) at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.kt:259) at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.kt:225) at okhttp3.internal.http2.Http2ExchangeCodec.writeRequestHeaders(Http2ExchangeCodec.kt:76) at okhttp3.internal.connection.Exchange.writeRequestHeaders(Exchange.kt:59) at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:36) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) at com.endava.cats.io.ServiceCaller.callService(ServiceCaller.java:373) at com.endava.cats.io.ServiceCaller.call(ServiceCaller.java:212) ... 44 more

Fatal error: Util_sun_misc_Signal.SignalState.await(): CSunMiscSignal.await() failed.`

en-milie commented 1 year ago

@ohonchar A couple of questions:

I would recommend as a first step increasing the timeouts using --readTimeout, --connectionTimeout or --writeTimeout. The values are seconds. Default is 10.

en-milie commented 1 year ago

@ohonchar Is this still an issue?

ohonchar commented 1 year ago

Sorry for the late reply. Nope, you can close this issue. Thanks

On Thu, Oct 6, 2022, 19:56 Madalin Ilie @.***> wrote:

@ohonchar https://github.com/ohonchar Is this still an issue?

— Reply to this email directly, view it on GitHub https://github.com/Endava/cats/issues/49#issuecomment-1270473258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCZWXYTDRM7PGHB7VXLLITWB4HDFANCNFSM6AAAAAAQNSDABQ . You are receiving this because you were mentioned.Message ID: @.***>

en-milie commented 1 year ago

Great! Thanks.