jembi / openhim-console

A webapp that provides a management console for the OpenHIM
http://openhim.org/
Mozilla Public License 2.0
12 stars 28 forks source link

Unable to register XDS-mediator #478

Open madhu-gandi opened 6 years ago

madhu-gandi commented 6 years ago

Hello ,

I have follwed below link and installed OpenMRS , OpenSHR ,Client registry ,Openempi and OpenHIM on a ubuntu 14 linux server. https://wiki.openmrs.org/display/docs/Case+Based+Reporting+Module

After performing below step java -jar mediator-xds-1.0.3-jar-with-dependencies.jar --conf xds-mediator.properties Following are the errors

[INFO] [05/30/2018 07:16:31.532] [main] [main] Initializing mediator server... [INFO] [05/30/2018 07:16:31.533] [main] [main] Loading mediator configuration from 'xds-mediator.properties'... [INFO] [05/30/2018 07:16:31.681] [main] [main] Starting HTTP server... Exception in thread "main" java.net.BindException: Cannot assign requested address at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:131) at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:248) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:228) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:219) at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:709) at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:278) at org.openhim.mediator.engine.MediatorServer.start(MediatorServer.java:67) at org.openhim.mediator.engine.MediatorServer.start(MediatorServer.java:63) at org.openhim.mediator.XDSMediatorMain.main(XDSMediatorMain.java:136)

API port for openhim is 8300

When I do curl -vv https://ubuntu141.westeurope.cloudapp.azure.com:8300/ I get below unauthorized error curl -vv https://ubuntu141.westeurope.cloudapp.azure.com:8300/

With http port 8600 in nginx/openhim-console , we are able to access but no mediator registered.

Below is the xds-mediator file

Mediator Properties

mediator.name=xds-mediator mediator.host=ubuntu141.westeurope.cloudapp.azure.com mediator.port=8500 mediator.timeout=60000

core.host=ubuntu141.westeurope.cloudapp.azure.com core.api.port=8300 core.api.user=root@openhim.org core.api.password=Password@123

Assigning authorities to resolve to during transaction enrichment

client.requestedAssigningAuthority=ECID client.requestedAssigningAuthorityId=ECID provider.requestedAssigningAuthority=EPID provider.requestedAssigningAuthorityId=EPID facility.requestedAssigningAuthority=ELID facility.requestedAssigningAuthorityId=ELID

== Workflow ==

pnr.patients.autoRegister=true pnr.providers.enrich=false pnr.facilities.enrich=false

== PIX Manager ==

pix.manager.host=ubuntu141.westeurope.cloudapp.azure.com pix.manager.port=3600 pix.manager.securePort=12301 pix.sendingApplication=openhim pix.sendingFacility=openhim-mediator-ohie-xds pix.receivingApplication=pix pix.receivingFacility=pix pix.secure=true

== CSD Infoman (interlinked registry) ==

ilr.host=ubuntu141.westeurope.cloudapp.azure.com ilr.port=12302 ilr.csr.path=CSD/csr/jembi-ecgroup-testing/careServicesRequest

== Terminology Service ==

ts.host=ubuntu141.westeurope.cloudapp.azure.com ts.port=8080

"xds-mediator.properties" 73L, 2165C 1,1 Top

== IHE XDS Registry ==

xds.registry.host=ubuntu141.westeurope.cloudapp.azure.com xds.registry.port=12303 xds.registry.securePort=12303 xds.registry.path=axis2/services/xdsregistryb xds.registry.secure=false

== IHE XDS Repository ==

xds.repository.host=ubuntu141.westeurope.cloudapp.azure.com xds.repository.port=8080 xds.repository.securePort=12304 xds.repository.path=/openmrs/ms/xdsrepository xds.repository.UniqueId=1.3.6.1.4.1.21367.2010.1.2.1125 xds.repository.secure=false

== ATNA ==

IHE syslog collector

atna.host=ubuntu141.westeurope.cloudapp.azure.com atna.useTcp=true atna.tcpPort=5052 atna.udpPort=5050 atna.secure=false

== IHE infrastructure security ==

use absolute path

ihe.keystore=/usr/share/openhim-core/resources/certs/ihe/keystore.jks ihe.keypassword=Password@123 ihe.storepassword=Password@123

The OID that uniquely identifies this system

ihe.systemSourceID=1.3.6.1.4.1.21367.2010.1.2

Please assist in registering the xds-mediator

rcrichton commented 6 years ago

Hi, it looks like the mediator is throwing a bind error when starting up. Are you sure One of the port that the mediator uses isn't already bound to something else?

madhu-gandi commented 6 years ago

Hi, Thanks for the reply. The port 8500 is not used by any other process.

Below is the output if I run without --conf option

java -jar mediator-xds-1.0.3-jar-with-dependencies.jar [INFO] [05/31/2018 08:11:30.088] [main] [main] Initializing mediator server... [INFO] [05/31/2018 08:11:30.089] [main] [main] No configuration specified. Using default properties... [INFO] [05/31/2018 08:11:30.229] [main] [main] Starting HTTP server... May 31, 2018 8:11:30 AM org.glassfish.grizzly.http.server.NetworkListener start INFO: Started listener bound to [0.0.0.0:8500] May 31, 2018 8:11:30 AM org.glassfish.grizzly.http.server.HttpServer start INFO: [HttpServer] Started. [INFO] [05/31/2018 08:11:30.306] [mediator-akka.actor.default-dispatcher-3] [akka://mediator/user/xds-mediator] Registering mediator with core... [INFO] [05/31/2018 08:11:30.307] [main] [main] xds-mediator listening on 0.0.0.0:8500 [INFO] [05/31/2018 08:11:30.313] [mediator-akka.actor.default-dispatcher-2] [akka://mediator/user/xds-mediator/core-api-connector] Registering mediator with core... [ERROR] [05/31/2018 08:11:30.858] [mediator-akka.actor.default-dispatcher-2] [akka://mediator/user/xds-mediator/core-api-connector] Mediator Registration Error javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710) at sun.security.ssl.InputRecord.read(InputRecord.java:527) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:290) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:259) at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)

Still is it a port issue?

Thanks in advance.

rcrichton commented 6 years ago

Hi, sorry for not getting back to you. I missed this message. I see you have the OpenHIM API port set as 8300, if this definitely correct? The mediator is failing to connect tothe OpenHIM-core API. If you are still having this issue, perhaps you can show me your OpenHIM core config.

madhu-gandi commented 6 years ago

Hello Ryan,

Thanks for the response. Mediator got registered which is listening on 8500 port.

No idea how to use it as no pattern we have with XDS from channel.

We are trying to access SHR patient data using rest web services URI but getting error. Orderset not available.

Regards,

Madhu

Get Outlook for Androidhttps://aka.ms/ghei36

On Wed, Jun 27, 2018 at 12:23 PM +0530, "Ryan Crichton" notifications@github.com<mailto:notifications@github.com> wrote:

Hi, sorry for not getting back to you. I missed this message. I see you have the OpenHIM API port set as 8300, if this definitely correct? The mediator is failing to connect tothe OpenHIM-core API. If you are still having this issue, perhaps you can show me your OpenHIM core config.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jembi_openhim-2Dconsole_issues_478-23issuecomment-2D400562843&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=Bfohp5q1OkJ8n-raW-xWB16jqmjpImAackWNAByLQAc&m=btwqVGix5U4kdCuObABd9v1j8ZmoLbC0a6RIYsuaPvw&s=tZ0xqDzIsRUWaVTa1LWNwv5hSt3asc2j---8Y-_AeMY&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AlKuYg6OriZOUBO1CGBgAwctnSZ8wUszks5uAyvkgaJpZM4USv-2D3&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=Bfohp5q1OkJ8n-raW-xWB16jqmjpImAackWNAByLQAc&m=btwqVGix5U4kdCuObABd9v1j8ZmoLbC0a6RIYsuaPvw&s=SUGsyx1vWzUTZ0ZhUGZZxNG5VmAFsK8YW0baLxo__i0&e=.


Confidentiality And Disclaimer Notice Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.netenrich.com

madhu-gandi commented 6 years ago

Hello Ryan,

Below are the output when querying patient data from OpenSHR

[cid:image001.png@01D41217.12EAC2F0]

We also tried using below command from server

curl -u admin:OpenMRS http://172.16.16.5:5000/openmrs/ws/rest/v1/session

{"sessionId":"ED15F05F40F62A66FFACC1ED00B70528","authenticated":false}

When we do from OpenMRS, which is running on 8100 port, we are able to pull the data.

[cid:image002.png@01D41217.D66D44A0]

OpenMRS version installed is 2.7

OpenSHR modules are below [cid:image003.png@01D41217.D66D44A0]

All applications are installed on same server, running with different ports.

Please help.

Regards,

Madhu

From: Madhu Gandi Sent: Wednesday, June 27, 2018 9:18 PM To: jembi/openhim-console openhim-console@noreply.github.com; jembi/openhim-console reply@reply.github.com Cc: Author author@noreply.github.com Subject: Re: [jembi/openhim-console] Unable to register XDS-mediator (#478)

Hello Ryan, Thanks for the response. Mediator got registered which is listening on 8500 port. No idea how to use it as no pattern we have with XDS from channel. We are trying to access SHR patient data using rest web services URI but getting error. Orderset not available. Regards, Madhu Get Outlook for Androidhttps://aka.ms/ghei36

On Wed, Jun 27, 2018 at 12:23 PM +0530, "Ryan Crichton" notifications@github.com<mailto:notifications@github.com> wrote:

Hi, sorry for not getting back to you. I missed this message. I see you have the OpenHIM API port set as 8300, if this definitely correct? The mediator is failing to connect tothe OpenHIM-core API. If you are still having this issue, perhaps you can show me your OpenHIM core config.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jembi_openhim-2Dconsole_issues_478-23issuecomment-2D400562843&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=Bfohp5q1OkJ8n-raW-xWB16jqmjpImAackWNAByLQAc&m=btwqVGix5U4kdCuObABd9v1j8ZmoLbC0a6RIYsuaPvw&s=tZ0xqDzIsRUWaVTa1LWNwv5hSt3asc2j---8Y-_AeMY&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AlKuYg6OriZOUBO1CGBgAwctnSZ8wUszks5uAyvkgaJpZM4USv-2D3&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=Bfohp5q1OkJ8n-raW-xWB16jqmjpImAackWNAByLQAc&m=btwqVGix5U4kdCuObABd9v1j8ZmoLbC0a6RIYsuaPvw&s=SUGsyx1vWzUTZ0ZhUGZZxNG5VmAFsK8YW0baLxo__i0&e=.


Confidentiality And Disclaimer Notice Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.netenrich.com

rcrichton commented 6 years ago

Hi, apologies. I wason leave for the last 2 weeks. It looks like you are getting an unauthenticated message back from OpenMRS. In the OpenHIM channel there is a checkbox for forwarding authentication headers on the routes tab. Perhaps this will help.