Hi Team,
How to run the Inji backend service code in local. Please the documentation, required files and which tag used to clone from github.
Do you have the same backend service code(mimoto) for inji web and mobile.
Thanks,
Narayana prakash.k
Hi Team,
How to run the Inji backend service code in local. Please the documentation, required files and which tag used to clone from github.
Do you have the same backend service code(mimoto) for inji web and mobile.
Thanks,
Narayana prakash.k
Inji documentation is here Inji | Inji. For the tag please refer to to respective ‘Release’ sections which also helps you with ‘Compatibile Module’.
“Do you have the same backend service code(mimoto) for inji web and mobile.” - Yes.
Best Regards
Team MOSIP
Hi @keshavs
Thanks for sharing the details. While run the mimoto application backend source code in local, Facing the below error. Couple of times posted this issue but didn’t get response from you. Please look into that and provide the solution for that.
Thanks in advance!
Error: 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/172.31.19.206] failed: Connection timed out: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to iam.dev2.mosip.net:443 [iam.dev2.mosip.net/172.31.19.206] failed: Connection timed out: connect
@narayana_prakash
how are we running mimoto locally through docker-compose or direct as spring boot app?
If we are using direct as sprint boot, can you please add below property in application-local.properties file
@swatigoel Thanks for your response. As request Added the property in application properties file.
Facing the below error :
I/O error on POST request for “http://websub.websub/hub/”: websub.websub; nested exception is java.net.UnknownHostException: websub.websub
1)Which branch need to checkout?
2)Will mimoto work as independently without eSignet in local as spring boot application?
3)Should I replaced that below mentioned lines property only or whole properties into the application-local?
properties: 1. server.port=8099
2. server.servlet.context-path=/residentmobileapp
3. health.config.enabled=false
4. mosip.service.end-points=/**/*
5. mosipbox.public.url=http://localhost:${server.port}
6. mosip.api.public.url=http://localhost:${server.port}
7. mosip.resident.url=https://api.collab.mosip.net/v1/resident
8. mosip.esignet.host=https://esignet.collab.mosip.net
9. keycloak.external.url=https://iam.collab.mosip.net/
10. mosip.kernel.authmanager.url=http://authmanager.kernel/
11. mosip.websub.url=http://websub.websub/
@narayana_prakash you can ignore websub error for local setup.
Mimoto will work as independently without esignet if we are depending on esignet of sandbox(collab) env.
If we have esignet running locally, we need to update mosip.esignet.host with local instance of esignet.
mosipbox.public.url, mosip.api.public.url are to access mimoto apis.
mosip.resident.url, keycloak.external.url, mosip.kernel.authmanager.url and mosip.websub.url you can ignore.
We need server.servlet.context-path=/residentmobileapp and mosip.service.end-points=/**/* to avoid api authentication for local setup.
@swatigoel As told, Added the below points in application-local properties but facing the same issue at run time.
server.servlet.context-path=/residentmobileapp
mosip.service.end-points=/**/*
Error : I/O error on POST request for “https://iam.dev2.mosip.net/auth/realms/mosip/protocol/openid-connect/token”
Could you please tell which branch need to check out?
Already having these below properties in application-local:
mosipbox.public.url=https://api-internal.dev2.mosip.net
public.internet.url=https://api.dev2.mosip.net
public.url=https://api-internal.dev2.mosip.net
keycloak.internal.url=https://iam.dev2.mosip.net/
Will it connect the keycloak url directly or need to set up the any url to access that?
I am assuming you are using main or release-0.13.x branch.
No, we don’t need to setup keycloak as we are disabling authentication for local setup.
@swatigoel Currently using main branch for mimoto.
Java version : 11
Then Why this error throwing at run time.
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/172.31.19.206] failed: Connection timed out: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to iam.dev2.mosip.net:443 [iam.dev2.mosip.net/172.31.19.206] 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:698) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:619) ~[spring-web-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at io.mosip.mimoto.util.RestApiClient.getApi(RestApiClient.java:102) ~[classes/:na]
at io.mosip.mimoto.util.Utilities.getJson(Utilities.java:190) ~[classes/:na]
at io.mosip.mimoto.util.Utilities.getIssuersConfigJsonValue(Utilities.java:292) ~[classes/:na]
at io.mosip.mimoto.service.impl.IssuersServiceImpl.getAllIssuersWithAllFields(IssuersServiceImpl.java:86) ~[classes/:na]
at io.mosip.mimoto.config.IssuersValidationConfig.run(IssuersValidationConfig.java:35) ~[classes/:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:788) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:778) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) ~[spring-boot-2.0.2.RELEASE.jar:2.0.2.RELEASE]
at io.mosip.mimoto.MimotoServiceApplication.main(MimotoServiceApplication.java:73) ~[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.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.0.2.RELEASE.jar:2.0.2.RELEASE]
Should i do any other process for running the application?
@swatigoel Could you please respond for the above message?
@narayana_prakash can you please try adding following in application-local.properties file.
server.port=8099
server.servlet.context-path=/residentmobileapp
health.config.enabled=false
mosip.service.end-points=/**/*
mosipbox.public.url=http://localhost:${server.port}
mosip.api.public.url=http://localhost:${server.port}
public.url=${mosip.api.public.url}
mosip.iam.adapter.disable-self-token-rest-template=false
mosip.auth.filter_disable=true (this properties already exists with value false, please make it true)
For local setup with docker-compose, we have updated properties and can be referred here mimoto/docker-compose/config/mimoto-default.properties at main · mosip/mimoto · GitHub
with our upcoming release, we will fix application-local.properties file as well.
Please let me know if you still face the issue.
@narayana_prakash did you get chance to try this?
Hi @swatigoel Again facing the same issue.
Please answer the below list:
1)How login authentication will happen in offline at Inji mobile app.
2)How data storing and processing in offline at Inji app.
Hi @narayana_prakash for running mimoto locally, it would be good to connect and debug.
For the queries you have for offline mode: