configuring http port

19 views
Skip to first unread message

Sorcerer Stone

unread,
Feb 7, 2016, 1:56:29 AM2/7/16
to OpenHIM-Implementers
Hello All,

I am trying to install openHIM core. My OS is Win8.1 (64bits). I have a couple of problem in starting the server.

1/ When I started the openHIM server core, I got the following error:
"C:\WINDOWS\system32>openhim-core
[Error: %1 is not a valid Win32 application.
\\?\C:\Users\fortuna\AppData\Roaming\npm\node_modules\openhim-core\node_modules\agenda\node_modules\mongodb\node_modules\bson\build\Release\bson.node]
js-bson: Failed to load c++ bson extension, using pure JS version"

What is this error about (Please refer to the attached file "RunWarning-01.txt")? Does it mean the core cannot be run on Windows' platform? But I think the core is running, see 2/ below. How do I resolve this error?
I had google the message "js-bson: Failed to load c++ bson extension, using pure JS version", the explanation and suggestions from various forums do not make much sense.

2/ I have a couple of apps that runs on Tomcat. Tomcat uses port 8080. Because of the dependence of a few apps on Tomcat, I switched the requirement of http port 8080 by openHIM to 9090 (refer to the attached default.json file). I did a netstat to pre-determine that port 9090 is not currently used by any apps in my computer (and none of the ports listed in default.json file are used by other apps as well). When I tried to start openHIM, I got the following error (please refer to the attached file "RunError-01.txt")

" Error: bind EADDRINUSE 0.0.0.0:8080 "

The above port conflict error was gone and openHIM core was able to run if I stop the Tomcat Windows service.

So if modifying the http port in default.json does not work, then which openHIM config file should I edit? I do not want to stop Tomcat from running every time I want openHIM Core to run.

Thanks in advance.


default.json
RunWarning-01.txt
RunError-01.txt

Ryan Crichton

unread,
Feb 8, 2016, 2:21:34 AM2/8/16
to Sorcerer Stone, OpenHIM-Implementers
Hi,

The first error that you are seeing is related to node native extensions for the mongodb module not being able to run on windows. It probably isn't setup to support windows. That is fine, it will fallback to a plain js version that will work for you.

For the second error, where is the default.json file that you are editing? Are you supplying a config file when running the OpenHIM? Like so:
wget https://raw.githubusercontent.com/jembi/openhim-core-js/master/config/default.json
# edit default.json, then
openhim-core --conf=path/to/default.json
This is the best way to provide modified config.

Hope this helps.

Cheers,
Ryan

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Ryan Crichton
Lead Developer, Jembi Health Systems  SOUTH AFRICA
Mobile: +27845829934 | Skype: ryan.graham.crichton
E-mail: ry...@jembi.org

Sorcerer Stone

unread,
Feb 9, 2016, 3:35:29 AM2/9/16
to OpenHIM-Implementers
Hello Ryan,
I edited/saved the default.json file from the folder:  " .. \openhim-core-js-master\config\". I changed the default http port from 8080 to 9090. I did the same to the config.md file located in the same folder. Did not work as mentioned in my original post. But openHIM runs if I stop Tomcat (which uses port 8080) window process. This means somehow openHIM is trying to access the same 8080 port as well.

I had also extracted the default.json file from github the way you (as well as openHIM's manual) described. Same result as the default.json on github is identical to the default.json in openhim-core-js-master.zip.

Is http port identity defined in other files other than in default.json?

Thanks in advance

Ryan Crichton

unread,
Feb 9, 2016, 5:00:26 AM2/9/16
to Sorcerer Stone, OpenHIM-Implementers
Hi,

No, it's only defined in the default.json config file. You are can supply custom config by running the OpenHIM with the --conf parameter like so: openhim-core --conf=path/to/default.json. The bit of config that you need to change is this:

  "api": {
    "enabled" : true,
    "httpsPort": 9090,
    "authWindowSeconds": 10
  },

Cheers,
Ryan

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sorcerer Stone

unread,
Feb 11, 2016, 2:16:02 AM2/11/16
to OpenHIM-Implementers
Hello Ryan,
Here is an update.

Even though I configured openHIM to use port, 9090, as long as Tomcat (which was using port 8080) was running, openHIM kept issuing the following error when I tried to start the core server:


"Error: bind EADDRINUSE 0.0.0.0:8080"

But if I stop Tomcat, openhim-core-js-master is able to execute. I looked at the owner of port 8080. It was node.js. The only project in my computer that uses nodejs is openHIM. So I reverted openHIM back to its original http port of 8080 and changed Tomcat's http port to 9090 instead.

Now both openHIM and Tomcat can co-exist.

Regards,
Sorcerer


On Sunday, February 7, 2016 at 1:56:29 AM UTC-5, Sorcerer Stone wrote:

Ryan Crichton

unread,
Feb 11, 2016, 3:33:04 AM2/11/16
to Sorcerer Stone, OpenHIM-Implementers
Ok, I'm glad you were able to work something out. I have been able to get it running on a different port on my side using the instructions I gave. If you would like to let me know exactly how you were trying to edit the config then I can try see why it's not working for you. Otherwise, if you are happy running tomcat on a different port then we can leave it at that.

I'm curious, what is your interest in the OpenHIM? What are you trying to do with it. Perhaps we could help out. We also have a community call coming up next week Tuesday if you would like to chat to us about your use case?

Cheers,
Ryan

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sorcerer Stone

unread,
Feb 11, 2016, 10:14:31 AM2/11/16
to OpenHIM-Implementers
Hello Ryan,
I was reading your thesis and came across openHIM (BTW, I am not a student). I am interested in your findings. I will see if I can join the chat next week. Thanks for the invitation.

Regards,
Sorcerer

On Sunday, February 7, 2016 at 1:56:29 AM UTC-5, Sorcerer Stone wrote:

Sorcerer Stone

unread,
Feb 16, 2016, 1:25:30 AM2/16/16
to OpenHIM-Implementers
Ryan,
You said there is a community call on Tuesday, today. Where is the URL for this call and at what time (I am in EST timezone)? What is the format for the call?

Regards,
Sorcerer

On Sunday, February 7, 2016 at 1:56:29 AM UTC-5, Sorcerer Stone wrote:

Ryan Crichton

unread,
Feb 16, 2016, 1:59:21 AM2/16/16
to Sorcerer Stone, OpenHIM-Implementers
Hi,

Yes it is today. The call is to discuss any issues relating to the Interoperability Layer (OpenHIM) and the Shared Health Record. We can make some space to discuss any issues you are having and perhaps discuss what you interested in doing with the tool. Then the second part of the call we will be talking briefly about creating a reference HIE. Here are the details of the call as sent out to some OpenHIE mailing lists:

We are having our community call today for the IOL and SHR communities

Tuesday 19 January 2016  at 4 pm CAT / 09 am EST

How to Join - Dial Toll Free Number:

 Access Code 61489468#

Agenda:

    • Implementation and tool questions (Community Support)
    • Reference Implementation discussion
      • New FHIR based SHR
      • OpenHIM with chained mediators and a HIE portal
      • OpenHIM at the client side making connection to an HIE easier
    • *AOB


Hope you can join us.

Cheers,
Ryan

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages