IsantePlus / openhim-mediator-xds

An OpenHIM mediator for OpenHIE supporting XDS.b-based workflows. It validates and enriches client, provide, facility and terminology information.
Mozilla Public License 2.0
0 stars 1 forks source link

trustAnchors error when sending to active subscriptions #3

Closed pmanko closed 3 years ago

pmanko commented 3 years ago

Failing xds-mediator side when attempting to send to active subscription URL.

[INFO] [06/21/2021 12:28:26.369] [mediator-akka.actor.default-dispatcher-23] [akka://mediator/user/xds-mediator/$c/$a] Forwarding request to repository
[INFO] [06/21/2021 12:28:26.395] [mediator-akka.actor.default-dispatcher-18] [akka://mediator/user/xds-mediator/atna-auditing] Sending ATNA PROVIDE_AND_REGISTER_ENRICHED audit message using TCP
[INFO] [06/21/2021 12:28:37.946] [mediator-akka.actor.default-dispatcher-22] [akka://mediator/user/xds-mediator/$c/$a] Finalizing response
[INFO] [06/21/2021 12:28:37.946] [mediator-akka.actor.default-dispatcher-22] [akka://mediator/user/xds-mediator/$c/$a] The lab document id is: 2.25.8297800818118565743
[INFO] [06/21/2021 12:28:37.948] [mediator-akka.actor.default-dispatcher-22] [akka://mediator/user/xds-mediator/$c/$a] Notifying DBUS 2.25.8297800818118565743
[INFO] [06/21/2021 12:28:38.060] [mediator-akka.actor.default-dispatcher-20] [akka://mediator/user/xds-mediator/$c/$a/xds-dsub] Active subscriptions: 1
[INFO] [06/21/2021 12:28:38.061] [mediator-akka.actor.default-dispatcher-20] [akka://mediator/user/xds-mediator/$c/$a/xds-dsub] URL: https://lnspmspp.org:4434/esb_sta/LNSP_IHE_IN/notify/
[INFO] [06/21/2021 12:28:38.062] [mediator-akka.actor.default-dispatcher-20] [akka://mediator/user/xds-mediator/$c/$a/xds-dsub] Connecting to: https://lnspmspp.org:4434/esb_sta/LNSP_IHE_IN/notify/
[ERROR] [06/21/2021 12:28:38.262] [mediator-akka.actor.default-dispatcher-20] [akka://mediator/user/xds-mediator/$c/$a/xds-dsub] Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)
    at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
    at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
    at akka.actor.ActorCell.invoke(ActorCell.scala:487)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)
    at akka.dispatch.Mailbox.run(Mailbox.scala:221)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:231)
[INFO] [06/21/2021 12:28:38.664] [mediator-akka.actor.default-dispatcher-16] [akka://mediator/user/xds-mediator/$d] Received request: POST /xdsrepository

possibly helpful links: https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty

moshonk commented 3 years ago

Resolved the issue by running sudo update-ca-certificates -f to create a certificate file, and then: sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure on the host server. Server is running Ubuntu 14.04 server and openjdk-8-jdk in a docker instance defined here https://github.com/IntelliSOFT-Consulting/ohie-il

Solution referred from this link https://stackoverflow.com/q/6784463