Exception for imageservice java class for larger images

asked 2018-12-11 12:43:51 -0500

RAMS gravatar image

For smaller images everything working. BUt for larger images im facing below excepion

ConnectionException{message=timeout, status=0} at org.openstack4j.connectors.okhttp.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:56) at org.openstack4j.connectors.okhttp.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:30) at org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:213) at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:207) at org.openstack4j.openstack.image.internal.ImageServiceImpl.upload(ImageServiceImpl.java:180) at com.ericsson.oss.itpf.cloudmgmt.steps.ui.GlanceService.uploadImage(GlanceService.java:61) at com.ericsson.oss.itpf.cloudmgmt.steps.ui.AddNewFeatureUiTestStep.checkForImagesInGlance(AddNewFeatureUiTestStep.java:241) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.ericsson.cifwk.taf.scenario.impl.MethodInvocation.execute(MethodInvocation.java:110) at com.ericsson.cifwk.taf.scenario.impl.ListenableTestStepInvocation.runWithListener(ListenableTestStepInvocation.java:20) at com.ericsson.cifwk.taf.scenario.impl.MethodInvocation.run(MethodInvocation.java:104) at com.ericsson.cifwk.taf.scenario.impl.TestStepRunner.runTestStep(TestStepRunner.java:302) at com.ericsson.cifwk.taf.scenario.impl.TestStepRunner.runTestStepAndHandleExceptions(TestStepRunner.java:265) at com.ericsson.cifwk.taf.scenario.impl.TestStepRunner.runAllTestSteps(TestStepRunner.java:249) at com.ericsson.cifwk.taf.scenario.impl.TestStepRunner.runSequenceOfSteps(TestStepRunner.java:204) at com.ericsson.cifwk.taf.scenario.impl.TestStepRunner.performTestSteps(TestStepRunner.java:182) at com.ericsson.cifwk.taf.scenario.impl.TestStepRunner.call(TestStepRunner.java:132) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.SocketTimeoutException: timeout at okio.Okio$3.newTimeoutException(Okio.java:207) at okio.AsyncTimeout.exit(AsyncTimeout.java:261) at okio.AsyncTimeout$1.write(AsyncTimeout.java:158) at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176) at okio.RealBufferedSink.write(RealBufferedSink.java:46) at okhttp3.internal.http.Http1xStream$FixedLengthSink.write(Http1xStream.java:286) at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176) at okio.RealBufferedSink.write(RealBufferedSink.java:96) at okhttp3.RequestBody$2.writeTo(RequestBody.java:96) at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:704) at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563) at okhttp3.RealCall.getResponse(RealCall.java:241) at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160) at okhttp3.RealCall.execute(RealCall.java:57) at org.openstack4j.connectors.okhttp.HttpCommand.execute(HttpCommand.java:126) at org.openstack4j.connectors.okhttp.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:61) at org.openstack4j.connectors.okhttp.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:54) ... 26 more Caused by: java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118) at java.net.SocketOutputStream.write(SocketOutputStream.java:155) at okio.Okio$1.write(Okio.java:80) at okio.AsyncTimeout$1.write(AsyncTimeout.java:155) ... 41 more

edit retag flag offensive close merge delete

Comments

What exactly do you do to get this exception? Are you running programs that use OpenStack’s Java SDK?

Bernd Bausch gravatar imageBernd Bausch ( 2018-12-11 16:07:30 -0500 )edit

yes, From java SDK, I am trying to import the ISO to glance.

Image imageDetails = getImageService().create(Builders.image() .name(imageName) .isPublic(true) .containerFormat(ContainerFormat.BARE) .diskFormat(DiskFormat.IS

RAMS gravatar imageRAMS ( 2018-12-12 01:29:00 -0500 )edit

What’s the file size? Do you get a timeout when you use the openstack client?

It’s not quite clear what times out. Try separating image creation (“reservation”) and upload.

Bernd Bausch gravatar imageBernd Bausch ( 2018-12-12 16:04:45 -0500 )edit

6MB, I am not getting any errors when i use openstack client. I tried reserve and upload. Sam exception there as well.

RAMS gravatar imageRAMS ( 2018-12-13 06:49:42 -0500 )edit

6MB? Not 6GB? You talked about large images; 6MB doesn't impress me as particularly large :)

My web search finds a single (!) document that contains AsyncTimeout.java, namely https://github.com/jenkinsci/openstac.... It's not resolved yet. Timeouts can't be configured.

Bernd Bausch gravatar imageBernd Bausch ( 2018-12-15 21:33:56 -0500 )edit