Mock MDS is not Running

Hi,

Build is Failed when we are building Mock MDS, getting error related to plugin “org.apache.maven.plugins:maven-gpg-plugin:1.5:sign” .

We have tried both master & 1.2.0.1 branch and used .p12 file inside the Keys folder to generate the certificate and added certificate path in application.properties .

When we skip this Plugin build is successful but getting Error: “Could not find or load main class io.mosip.mock.sbi.test.TestMockSBI” when we run the Jar or batch file in target folder .

Please help.

Regards,
Avra (NSDL E-Gov)

Hi @mosip-guest

Regarding the mock mds error you are getting related to the plugin while setting it up in your system locally, our registration client expert @Anusha_sunkadh or @HimajaDhanyamraju2 will look into this and help you out, on how to proceed further.

Best Regards,
Team MOSIP

Hi Avra,

use below command to build:

mvn clean install -Dgpg.skip=true

Once the build is successful, Go to the “target” directory and execute run.sh or run_reg.bat

if you still face the issue, you can try altering the sequence of -cp argument as below:

lib/*;mock-mds-1.2.0.1-SNAPSHOT.jar

2 Likes

Hi Anusha,

Thanks for the reply !

Now Mock MDS is running fine on port 4501, we have checked all the APIs through postman.

But when we are running reg-client, It’s not able to detect Mock MDS on port 4501
saying “Scanning port 4501 - 4600 0 devices discovered.”

We are using collab regclient, please lets us know what change we need to do.

Regards,
Avra

Hi Avra,

Thanks for raising your concern our tech lead @Anusha_sunkadh will look into this query from her end and guide you.

Best Regards,
Team MOSIP

@mosip-guest please share the reg-client logs.

2 Likes

Not allowing .log or .txt file to upload. So, uploading screenshot of log file error.

2023-09-29 15:52:48,893 INFO [pool-5-thread-1] i.m.r.m.s.s.s.i.MosipDeviceSpecification_SBI_1_0_ProviderImpl : MosipDeviceSpecification_SBI_1_0_ProviderImpl - REGISTRATION - REG - received device info response on port : 4501
2023-09-29 15:52:48,893 INFO [pool-5-thread-1] i.m.r.m.s.s.s.i.MosipDeviceSpecification_SBI_1_0_ProviderImpl : MosipDeviceSpecification_SBI_1_0_ProviderImpl - REGISTRATION - REG - parsing device info response to SBI 1_0 dto
2023-09-29 15:52:48,897 INFO [pool-5-thread-1] i.m.k.s.s.i.SignatureServiceImpl : SignatureSessionId - JWTSignature - - Certificate found in JWT Header.
2023-09-29 15:52:48,902 INFO [pool-5-thread-1] i.m.k.p.s.i.PartnerCertificateManagerServiceImpl : pcSessionId - CertTrustPathValidation - - Certificate Trust Path Validation.
2023-09-29 15:52:48,902 INFO [pool-5-thread-1] i.m.k.p.s.i.PartnerCertificateManagerServiceImpl : pcSessionId - CertTrustPathValidation - - Certificate Trust Path Validation for domain: DEVICE
2023-09-29 15:52:48,902 INFO [pool-5-thread-1] i.m.k.p.s.i.PartnerCertificateManagerServiceImpl : pcSessionId - CertTrustPathValidation - - Certificate Trust Path Validation for domain: DEVICE
2023-09-29 15:52:48,902 INFO [pool-5-thread-1] i.m.k.p.s.i.PartnerCertificateManagerServiceImpl : pcSessionId - CertTrustPathValidation - - Total Number of ROOT Trust Found: 1
2023-09-29 15:52:48,903 INFO [pool-5-thread-1] i.m.k.p.s.i.PartnerCertificateManagerServiceImpl : pcSessionId - CertTrustPathValidation - - Total Number of INTERMEDIATE Trust Found: 1127
2023-09-29 15:52:48,906 ERROR [pool-5-thread-1] i.m.r.m.s.i.MosipDeviceSpecificationHelper : REG - REGISTRATION - Failed to decode device info - io.mosip.registration.exception.DeviceException: REG-MDM-108 → Certificate path trust validation failed
at io.mosip.registration.mdm.service.impl.MosipDeviceSpecificationHelper.validateJWTResponse(MosipDeviceSpecificationHelper.java:133)
at io.mosip.registration.mdm.service.impl.MosipDeviceSpecificationHelper.getDeviceInfoDecoded(MosipDeviceSpecificationHelper.java:107)
at io.mosip.registration.mdm.sbi.spec_1_0.service.impl.MosipDeviceSpecification_SBI_1_0_ProviderImpl.getMdmDevices(MosipDeviceSpecification_SBI_1_0_ProviderImpl.java:113)

Hi @mosip-guest ,

You can use the mock-mds given in collab.mosip.net (Mock MDS - Google Drive). Or you can copy the p12 files present in the keys folder here and copy the same to your target folder.

The certificates should be inserted in the server side tables also to pass the certificate trust validation in regclient.

1 Like

Hi Himaja,

We try with collab mock-md, Reg client is now able to detect devices and working fine when system is Offline.

But when system is online it not able to detect devices and not running, we have tested it multiple times, please check below frontend msg and error in Log file :

FrontEnd Msg:-
mosip.hostname : regclient-api.collab.mosip.net
mosip.client.upgrade.server.url : https://regclient.collab.mosip.net
Checking server connectivity…
Machine is ONLINE
Warning : NO VALID AUTH-TOKEN TO SYNC
Job scheduler started.
Biometric device scanning started…
Scanning port 4501 - 4600
0 devices discovered.
Setting up application stage…
Registration client started :slight_smile:

Log File Error:-
2023-10-04 17:48:12,729 INFO [Thread-10] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Completed Signing data using TPM
2023-10-04 17:48:12,730 INFO [Thread-10] i.m.k.c.s.i.TPMClientCryptoServiceImpl : ccSessionID - TPM - - Getting Asymmetric Key Creation from tpm
2023-10-04 17:48:12,730 INFO [Thread-10] i.m.r.u.a.RestClientAuthAdvice : Completed adding request signature to request header completed
2023-10-04 17:48:12,730 INFO [Thread-10] i.m.r.u.r.AuthTokenUtilService : fetchAuthToken invoked for triggerPoint >>>>> System
2023-10-04 17:48:12,735 ERROR [Thread-10] i.m.r.u.a.RestClientAuthAdvice : Failed in AuthAdvice >> https://regclient-api.collab.mosip.net/v1/syncdata/configs/e7:5e:a2:9a:54:7d:29:de:ee:88:e0:80:d3:0a:83:62:cd:17:f5:26:24:6a:24:86:96:02:f1:ad:8a:05:02:3e?version=1.2.0.1-B1 {}
io.mosip.registration.exception.RegBaseCheckedException: REG-SDU-005 → Auth token received from the authentication web-service is either null or empty

2023-10-04 17:48:04,696 INFO [pool-5-thread-1] i.m.r.m.s.i.MosipDeviceSpecificationFactory : No device is running at port number 4501

Regards,
Avra

Hi Anusha/Himaja,

Please reply on this.

Regards,
Avra

Hi @mosip-guest ,

Sorry for the delayed response. We tried to reproduce the same in our systems, but we are not facing this issue. We are able to login and device discovery is also successful when the system is online / offline.

Please check if proper roles are assigned to your username (REGISTRATION_SUPERVISOR role is must), if user and machine mapped to same zone and center, delete existing DB and mosipkeys folder, try with fresh setup once again and let us know.

1 Like

Hi @mosip-guest

Please let us know the update on this so we can connect online to resolve this ASAP for you.

Apologies for the delay from our end!

FYR - https://docs.mosip.io/1.2.0/collab-getting-started-guide/collab-reg-client-setup-guide

Best Regards,
Team MOSIP