#2714 closed defect (fixed)

FIX - external petascope failed to start as secore_urls=internal failed to start

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.2
Component: petascope Version: 10.2
Keywords: Cc: Dimitar Misev
Complexity: Medium

Description

With petascope log below:

 INFO [2023-04-12 15:15:27] RasUtil@216: Executing rasql query rasql-0: SELECT a FROM RAS_STRUCT_TYPES a
  INFO [2023-04-12 15:15:28] RasUtil@311: Rasql query rasql-0 executed in 719 ms.
  INFO [2023-04-12 15:15:28] RasUtil@216: Executing rasql query rasql-1: SELECT a FROM RAS_MARRAY_TYPES a
  INFO [2023-04-12 15:15:28] RasUtil@311: Rasql query rasql-1 executed in 58 ms.
  INFO [2023-04-12 15:15:28] RasUtil@216: Executing rasql query rasql-2: SELECT a FROM RAS_SET_TYPES a
  INFO [2023-04-12 15:15:28] RasUtil@311: Rasql query rasql-2 executed in 59 ms.
  INFO [2023-04-12 15:15:28] TypeRegistry@294: Succesfully initialized the type registry.
  INFO [2023-04-12 15:15:36] ApplicationMain@356: Running data migrations ...
  INFO [2023-04-12 15:16:55] CoverageRepositoryService@837: Time to load all basic local coverage from database is 72348 ms.
  WARN [2023-04-12 15:18:55] AnnotationConfigEmbeddedWebApplicationContext@550: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationMain': Invocation of init method failed; nested exception is petascope.exceptions.PetascopeException: http://localhost:8080/rasdaman/def/crs/OGC/0/AnsiDate has IO error. Reason: Read timed out
 ERROR [2023-04-12 15:18:55] SpringApplication@815: Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationMain': Invocation of init method failed; nested exception is petascope.exceptions.PetascopeException: http://localhost:8080/rasdaman/def/crs/OGC/0/AnsiDate has IO error. Reason: Read timed out
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
	at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
	at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
	at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
	at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4929)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1910)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:898)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:917)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Caused by: petascope.exceptions.PetascopeException: http://localhost:8080/rasdaman/def/crs/OGC/0/AnsiDate has IO error. Reason: Read timed out
	at petascope.util.CrsUtil.getCrsDefinition(CrsUtil.java:732)
	at petascope.util.CrsUtil.getDatumOrigin(CrsUtil.java:425)
	at org.rasdaman.domain.cis.GeoAxis.getLowerBoundNumber(GeoAxis.java:127)
	at petascope.wcps.metadata.service.WcpsCoverageMetadataTranslator.buildAxes(WcpsCoverageMetadataTranslator.java:503)
	at petascope.wcps.metadata.service.WcpsCoverageMetadataTranslator.create(WcpsCoverageMetadataTranslator.java:117)
	at petascope.wcps.metadata.service.WcpsCoverageMetadataTranslator.translate(WcpsCoverageMetadataTranslator.java:171)
	at com.rasdaman.admin.layer.service.AdminCreateOrUpdateLayerService.save(AdminCreateOrUpdateLayerService.java:114)
	at org.rasdaman.datamigration.DataMigration8Handler.migrate(DataMigration8Handler.java:52)
	at org.rasdaman.datamigration.DataMigrationService.runMigration(DataMigrationService.java:81)
	at org.rasdaman.ApplicationMain.postInit(ApplicationMain.java:358)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)
	... 59 more
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.base/java.net.SocketInputStream.socketRead0(Native Method)
	at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
	at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
	at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
	at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
	at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:787)
	at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:722)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
	at petascope.util.HttpUtil.getInputStream(HttpUtil.java:102)
	at petascope.util.HttpUtil.getSECOREInputStream(HttpUtil.java:118)
	at petascope.util.CrsUtil.getInputStreamByInternalOrExternalSECORE(CrsUtil.java:481)
	at petascope.util.CrsUtil.getCrsDefinition(CrsUtil.java:546)
	... 75 more

Change History (1)

comment:1 by Bang Pham Huu, 19 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.