Problem in Book Appointment

When i choose a appointment center he give me this error

You don’t have any slots created. By default, when pre-registration starts up in the pre-registration batch job service, the slots get created for the configured number of days. Please check out the pre-registration batch job service. It should have errors.

Hi @nayakrounak , i have this error when i run pre-registration batch service :

"{"@timestamp":"2023-06-08T16:03:59.463+01:00","@version":"1","message":"PreRegBatchSessionId - PreRegBatch - - Response Code: 403, Error in response for URL: http://dev.mosip.local/v1/masterdata/registrationcenters/all?pageNumber=0&pageSize=10&sortBy=createdDateTime&orderBy=desc, Errors:[{\"errorCode\":\"KER-ATH-403\",\"message\":\"Forbidden\"}]","logger_name":"io.mosip.preregistration.batchjob.helper.RestHelper","thread_name":"restartedMain","level":"ERROR","level_value":40000,"appName":"pre-registration-application-service"} "

This is clearly a role-related issue.

For the API, GET /v1/masterdata/registrationcenters/all the role will be configured in your kernel-default.properties file as below.

Please make sure that your pre-registration client, as configured in pre-registration-default.properties, has at least one of the above roles in keycloak.

Once the roles are correctly added, please restart the pre-registration batch service and check.

Hi @nayakrounak
So if i understand i should add the roles : “ZONAL_ADMIN,PRE_REGISTRATION_ADMIN,GLOBAL_ADMIN” in mosip-prereg-client in Keycloak
But When i check my application.properties in master data i founded that : "mosip.role.admin.masterdata.getregistrationcentersall=ZONAL_ADMIN,GLOBAL_ADMIN
"

better update your configuration - “mosip.role.admin.masterdata.getregistrationcentersall”

And make sure any one of the role b/w - ZONAL_ADMIN,PRE_REGISTRATION_ADMIN,GLOBAL_ADMIN is available in mosip-prereg-client.

I also think the other tickets raised by you might have similar role related issues. Please review all your roles.

Thank you @nayakrounak
But I have an other problem

i found that : entity = registrationBookingRepository.getDemographicEntityPreRegistrationId(preregistrationId); return null
should i run another module ?

The above error would come if you don’t have available slots created for your environment.

The available slots will be present in the mosip_prereg db in the reg_available_slot table,

The slots are created by the pre-reg-batch job service using the registration_center data from the mosip_master database.

For the time being, can you add a record in the reg_available_slot table and check if you are getting this error? And also check if you have errors in the pre-reg-batch job service.

Hi @nayakrounak
the reg_available_slot table is not empty

Does it have data for upcoming days?

Hi @nayakrounak Yes, Thank you i resolve the problem

1 Like