cancel
Showing results for 
Search instead for 
Did you mean: 

jetty.EofException - when start MOCK service using groovy script in other MOCK service

vikititor
Contributor

jetty.EofException - when start MOCK service using groovy script in other MOCK service

Hello, I am facing the problem, that is missing response to the client.

I have MOCK service 1 responsible to start stop other mock services A, B, C.. 

When I send 1st request to MOCK 1 like start MOCK A.. then response is missing.. When I do it once more.. I get the response..
What can be a problem here?
I am using WireShark.. the communication is interrupted by SoapUI server.. the HTTP 500 is other session.. to the client.. BTW client is the same SoapUI project.. and is missing response.

 

My start script in MOCK 1 and eror log in attachement.

Thanks a lot for any ideas..

2 REPLIES 2
vikititor
Contributor

Re: jetty.EofException - when start MOCK service using groovy script in other MOCK service

Fri Jan 22 14:36:50 CET 2021:ERROR:org.mortbay.jetty.EofException
org.mortbay.jetty.EofException
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:634)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:591)
at com.eviware.soapui.impl.support.BaseMockResult.writeRawResponseData(BaseMockResult.java:149)
at com.eviware.soapui.impl.support.AbstractMockResponse.writeResponse(AbstractMockResponse.java:395)
at com.eviware.soapui.impl.support.AbstractMockResponse.execute(AbstractMockResponse.java:270)
at com.eviware.soapui.impl.rest.mock.RestMockAction.dispatchRequest(RestMockAction.java:151)
at com.eviware.soapui.impl.rest.mock.RestMockDispatcher.getMockResult(RestMockDispatcher.java:74)
at com.eviware.soapui.impl.rest.mock.RestMockDispatcher.dispatchRequest(RestMockDispatcher.java:49)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:144)
at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Fri Jan 22 14:36:50 CET 2021:ERROR:got an exception while dispatching - returning a default 500 response
Fri Jan 22 14:36:50 CET 2021:ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: com.eviware.soapui.impl.wsdl.mock.DispatchException: org.mortbay.jetty.EofException
com.eviware.soapui.impl.wsdl.mock.DispatchException: com.eviware.soapui.impl.wsdl.mock.DispatchException: org.mortbay.jetty.EofException
at com.eviware.soapui.impl.rest.mock.RestMockAction.dispatchRequest(RestMockAction.java:155)
at com.eviware.soapui.impl.rest.mock.RestMockDispatcher.getMockResult(RestMockDispatcher.java:74)
at com.eviware.soapui.impl.rest.mock.RestMockDispatcher.dispatchRequest(RestMockDispatcher.java:49)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:144)
at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.eviware.soapui.impl.wsdl.mock.DispatchException: org.mortbay.jetty.EofException
at com.eviware.soapui.impl.support.AbstractMockResponse.execute(AbstractMockResponse.java:280)
at com.eviware.soapui.impl.rest.mock.RestMockAction.dispatchRequest(RestMockAction.java:151)
... 16 more
Caused by: org.mortbay.jetty.EofException
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:634)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:591)
at com.eviware.soapui.impl.support.BaseMockResult.writeRawResponseData(BaseMockResult.java:149)
at com.eviware.soapui.impl.support.AbstractMockResponse.writeResponse(AbstractMockResponse.java:395)
at com.eviware.soapui.impl.support.AbstractMockResponse.execute(AbstractMockResponse.java:270)
... 17 more

vikititor
Contributor

Re: jetty.EofException - when start MOCK service using groovy script in other MOCK service

String logPrefix = "----- MOCK_CONFIGURATION - MOCK_7 - start: ";

def SERVER7mock
def runner
try {
SERVER7mock = context.mockService.project.getRestMockServiceByName("SERVER-7_REST_MOCK")
}
catch(Exception e){
log.warn logPrefix + "Return catch exception SERVER7mock: " + e.getMessage()
requestContext.myResponse = "Exception SERVER7mock: " + e.getMessage()
return "error"
}
try {
//runner = SERVER7mock.getMockRunner().isRunning()
runner = SERVER7mock.getMockRunner()
}
catch(Exception e){
log.warn logPrefix + "Return catch exception runner: " + e.getMessage()
requestContext.myResponse = "Exception runner: " + e.getMessage()
return "error"
}

// is runnign? then skip this..
if (runner != null) {
log.info logPrefix + "MOCK A_REST_MOCK is UP = skip starting.";
return "OK";
}

if (SERVER7mock == null){
log.warn logPrefix + "ERROR: MOCK A_REST_MOCK not found!"
requestContext.myResponse = "ERROR: MOCK A_REST_MOCK not found!"
return "error"
}
else{
SERVER7mock.start();
//context.mockRunner = SERVER7mock
log.info logPrefix + "was started."
return "OK"
}

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors