Registration Client doesn't start when I download from the hosted server

Hi

I run this command

jre/bin/javaw -Xmx2048m -Xms2048m -Dfile.encoding=UTF-8 -cp lib/*;/* io.mosip.registration.controller.Initialization > startup.log 2>&1

I get this error:

Error: Could not find or load main class lib.HdrHistogram-2.1.12.jar
Caused by: java.lang.ClassNotFoundException: lib.HdrHistogram-2.1.12.jar

We have Dockerfile under registration-client repository https://github.com/mosip/registration-client/blob/release-1.2.0.1/registration/Dockerfile. Concept is to run nginx in the docker container from which registration-client.zip is hosted and also registration-client on the field will connect to this nginx to check for new updates or changes.

Note: We refer this nginx server as registration-client download and upgrade server.

While running the registration-client docker container we need to pass below environment variables.

Required:

  • client_version_env : pom version of the registration client build

  • client_upgrade_server_env : public URL of this nginx server

  • reg_client_sdk_url_env : URL to download sdk zip. Make sure to have SDK jar and its dependent jars in the zip.

  • artifactory_url_env : artifactory URL to download below mentioned runtime dependencies
    “${artifactory_url}/artifactory/libs-release-local/icu4j/icu4j.jar”
    “${artifactory_url}/artifactory/libs-release-local/icu4j/kernel-transliteration-icu4j.jar”
    “${artifactory_url}/artifactory/libs-release-local/clamav/clamav.jar”
    “${artifactory_url}/artifactory/libs-release-local/clamav/kernel-virusscanner-clamav.jar”

  • keystore_secret_env : password of the keystore.p12 file

  • host_name_env : syncdata-service public domain name

  • signer_timestamp_url_env : URL of timestamp server to timestamp registration-client jar files.

Need to mount a volume to “/home/mosip/build_files” with below files

  • logback.xml
  • Client.crt : Signer certificate to be added in the registration-client build for jar sign verification.
  • keystore.p12 : Store private key used to sign the registation-client and registration-services jar files with “CodeSigning” alias.
  • maven.metadata.xml : Holds the current version of registration-client hosted in the upgrade server.

Optional:

  • reg_client_custom_impls_url_env : URL to download scanner custom implementation jars(runtime dependency).

If all the above steps are taken care then you should not see any issue.

Finally, you will be able to download the registration client zip from below URL.
{registratiionclient download server domain name/ip}/registration-client/{client_version}/reg-client.zip

Refs:
Run https://github.com/mosip/mosip-infra/blob/develop/deployment/v3/mosip/regclient/create-signing-certs.sh to generate Client.crt and keystore.p12
To get the content of maven-metadata.xml & logback.xml check https://github.com/mosip/mosip-helm/blob/develop/charts/regclient/templates/configmap.yaml

1 Like