Hi Team,
I have already successfully set up esignet after attempting to run the Mimoto
API locally, but I encountered the following error. Please guide us on how to resolve
this.
org.springframework.web.client.ResourceAccessException: I/O error on POST request for “https://iam.dev2.mosip.net/auth/realms/mosip/protocol/openid-connect/token”: Connect to
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:466) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.kernel.auth.defaultadapter.helper.TokenHelper.getClientToken(TokenHelper.java:80) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at io.mosip.kernel.auth.defaultadapter.config.SelfTokenRestInterceptor.intercept(SelfTokenRestInterceptor.java:67) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
Hi @Muthukumar
Thanks for sharing the error log but it would be good if you could share the full logs for our team to look into the issue and what exactly you are facing in Mimoto API locally.
@swatigoel Please look into this!
Best Regards,
Team MOSIP
Hi @swatigoel ,
I have been running Mimoto locally using the Maven command ‘mvn spring-boot:run -Dspring.profiles.active=local’, but it’s showing the following error:
org.springframework.web.client.ResourceAccessException: I/O error on POST request for “https://iam.dev2.mosip.net/auth/realms/mosip/protocol/openid-connect/token”: Connect to iam.dev2.mosip.net:443 [iam.dev2.mosip.net/10.3.148.169] failed: Connection timed out: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to iam.dev2.mosip.net:443 [iam.dev2.mosip.net/10.3.148.169] failed: Connection timed out: connect
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:732) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:466) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.kernel.auth.defaultadapter.helper.TokenHelper.getClientToken(TokenHelper.java:80) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at io.mosip.kernel.auth.defaultadapter.config.SelfTokenRestInterceptor.intercept(SelfTokenRestInterceptor.java:67) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at brave.spring.web.TracingClientHttpRequestInterceptor.intercept(TracingClientHttpRequestInterceptor.java:53) ~[brave-instrumentation-spring-web-5.6.1.jar:na]
at org.springframework.cloud.sleuth.instrument.web.client.LazyTracingClientHttpRequestInterceptor.intercept(TraceWebClientAutoConfiguration.java:293) ~[spring-cloud-sleuth-core-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:723) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:600) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.kernel.websub.api.client.SubscriberClientImpl.subscribe(SubscriberClientImpl.java:92) ~[kernel-websubclient-api-1.2.0.1-B1.jar:na]
at io.mosip.kernel.websub.api.client.SubscriberClientImpl.subscribe(SubscriberClientImpl.java:50) ~[kernel-websubclient-api-1.2.0.1-B1.jar:na]
at io.mosip.mimoto.util.WebSubSubscriptionHelper.subscribeEvent(WebSubSubscriptionHelper.java:76) ~[classes/:na]
at io.mosip.mimoto.util.WebSubSubscriptionHelper.initSubscriptions(WebSubSubscriptionHelper.java:51) ~[classes/:na]
at io.mosip.mimoto.util.WebSubSubscriptionHelper$$FastClassBySpringCGLIB$$3169152c.invoke() ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.cloud.sleuth.instrument.scheduling.TraceSchedulingAspect.traceBackgroundThread(TraceSchedulingAspect.java:72) ~[spring-cloud-sleuth-core-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.mimoto.util.WebSubSubscriptionHelper$$EnhancerBySpringCGLIB$$b94a9569.initSubscriptions() ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to iam.dev2.mosip.net:443 [iam.dev2.mosip.net/10.3.148.169] failed: Connection timed out: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:394) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:87) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:108) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.kernel.auth.defaultadapter.config.RestTemplateInterceptor.intercept(RestTemplateInterceptor.java:54) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.kernel.auth.defaultadapter.config.RestTemplateInterceptor.intercept(RestTemplateInterceptor.java:54) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at brave.spring.web.TracingClientHttpRequestInterceptor.intercept(TracingClientHttpRequestInterceptor.java:53) ~[brave-instrumentation-spring-web-5.6.1.jar:na]
at org.springframework.cloud.sleuth.instrument.web.client.LazyTracingClientHttpRequestInterceptor.intercept(TraceWebClientAutoConfiguration.java:293) ~[spring-cloud-sleuth-core-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:723) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
… 48 common frames omitted
Caused by: java.net.ConnectException: Connection timed out: connect
at java.base/java.net.PlainSocketImpl.connect0(Native Method) ~[na:na]
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:608) ~[na:na]
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:339) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[kernel-auth-adapter-1.2.0.1-B1.jar:na]
… 72 common frames omitted
Regards,
Muthukumar M
Hi @swatigoel,@Anusha_sunkadh,
Facing the same above issue while run the mimoto service in local.
Issue : org.springframework.web.client.ResourceAccessException: I/O error on POST request for “https://iam.dev2.mosip.net/auth/realms/mosip/protocol/openid-connect/token”: Connect to
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at
Your response in this matter is greatly appreciated. Thank you.