Ok, some history is due here. I have an instance that started off life as v4.2.0.
We made the leap from that version to v6.0.0(4). The program is heavily modified (but not core).
Last weekend we made the leap to v6.1.0.
Ubuntu 18.04
Apache 2.4x
MySQL 14.14
AWS
After entering the missing table columns and setting the config in the globals. In the error log I see this message.
Failed to start and connect to local ccdaservice server on port 6661
This is a WTF (what the fun, we are having!) moment.
I compared the setting against the demo version and there are no ports set.
So, I dug through the code and found the serveccda.js where the port is being listened to.
The ufw is inactive. What could be blocking the communications on the localhost?
GET https://e.myaws_server.org/interface/modules/zend_modules/public/encounterccdadispatch/index?combination=61356&view=1&recipient=self¶m=642 500 (Internal Server Error)
Can you manually start the ccda service from the command line? Iād isolate that first and figure out if its something on the node side or something on php being unable to call out to the node service.
Iām no expert on this, am just learning about CCDA myself but have gotten it working.
Why is it youāre using Node.js version 12? The OpenEMR documentation recommends installing it from upstream and says itās tested with version version 14. Node.js version 12 is end-of-life on 2022-04-30 where as version 14 is end-of-life on 2023-04-30.
Did you run ānpm initā before running ānpm install --productionā?
Are you using ānpm install --productionā with or without sudo?
OpenEMRās ccdaservice README.md recommends using sudo but in reading around Iāve found people recommending not doing so, so Iām currently not.
Are you using āAllowOverride FileInfoā in the Apache config?
Pete,
thanks for joining the conversation. This is not a new install. This is a migration that has lots of modifications that required me to redo the modification from a previous version 4.2.0 into v6. I started back when version 6.0.0 was released. I have to migrate a little code at a time see what breaks and fix it. I have not read the new documentation on which version of npm the system should be using. Thanks for the info =^).
I will upgrade the npm on the server. I brought up the server last year and when version 12 of npm was fine. Every suggestions helps get me closer to the solution.
I ran the command to remove nodejs. The results are that node version stays the same.
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ node -v
v16.14.2
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ sudo apt-get remove --purge nodejs npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'npm' is not installed, so not removed
The following packages were automatically installed and are no longer required:
gyp libc-ares2 libhttp-parser2.7.1 libicu60 libjs-async libjs-inherits libjs-node-uuid libssl1.0-dev \libuv1-dev python-pkg-resources
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
nodejs*
0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded.
After this operation, 123 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 190930 files and directories currently installed.)
Removing nodejs (14.19.1-1nodesource1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ node -v
v16.14.2
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$
I ran
sudo apt-get install -y nodejs
This is what happened next.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp libc-ares2 libhttp-parser2.7.1 libicu60 libjs-async libjs-inherits libjs-node-uuid libssl1.0-dev libuv1-dev python-pkg-resources
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 0 B/25.5 MB of archives.
After this operation, 123 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 185968 files and directories currently installed.)
Preparing to unpack .../nodejs_14.19.1-1nodesource1_amd64.deb ...
Unpacking nodejs (14.19.1-1nodesource1) ...
Setting up nodejs (14.19.1-1nodesource1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Then ran:
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ sudo npm install --production
up to date, audited 102 packages in 977ms
13 packages are looking for funding
run `npm fund` for details
5 vulnerabilities (4 moderate, 1 high)
To address issues that do not require attention, run:
npm audit fix (Brady said never fix these)
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
It should be working but it is not. I am going to reboot the server as a last resort.
Seems to have gotten worse now that I upgraded. Node -v is still 16.x.x Nodejs version is 14.x
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ nodejs serveccda.js
/var/www/html/hb600/ccdaservice/node_modules/bindings/bindings.js:121
throw e;
^
Error: The module '/var/www/html/hb600/ccdaservice/node_modules/libxmljs2/build/Release/xmljs.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at bindings (/var/www/html/hb600/ccdaservice/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/var/www/html/hb600/ccdaservice/node_modules/libxmljs2/lib/bindings.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32) {
code: 'ERR_DLOPEN_FAILED'
}
Sherwin delete the ccdaservice directory. replace ccdaservice directory from install zip.
Now npm -install. I believe node 16 works and is what we use on demo farm.
I removed and replaced the directory with the one from the install zip. Ran the npm i command. Here are the results.
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ sudo npm i
added 68 packages, and audited 70 packages in 2s
4 packages are looking for funding
run `npm fund` for details
1 high severity vulnerability
To address all issues, run:
npm audit fix
Run `npm audit` for details.
Not so fast. When I select a patient chart. The new tab opens and just swirls. Never loads. It just goes in circles. I am getting dizzy.
Upgrading old systems is the pits sometimes. Here is what happened after the reboot.
ubuntu@ip-172-31-27-136:/var/www/html/hb600/ccdaservice$ node serveccda.js
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 00/00/0000, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (/var/www/html/hb600/node_modules/moment/moment.js:319:25)
at configFromString (/var/www/html/hb600/node_modules/moment/moment.js:2536:19)
at configFromInput (/var/www/html/hb600/node_modules/moment/moment.js:2978:13)
at prepareConfig (/var/www/html/hb600/node_modules/moment/moment.js:2961:13)
at createFromConfig (/var/www/html/hb600/node_modules/moment/moment.js:2928:44)
at createLocalOrUTC (/var/www/html/hb600/node_modules/moment/moment.js:3022:16)
at createLocal (/var/www/html/hb600/node_modules/moment/moment.js:3026:16)
at Function.createInZone [as parseZone] (/var/www/html/hb600/node_modules/moment/moment.js:4985:28)
at exports.time (/var/www/html/hb600/ccdaservice/oe-blue-button-generate/lib/translate.js:74:20)
at /var/www/html/hb600/ccdaservice/oe-blue-button-generate/lib/engine.js:29:27
Iāve seen that recently. I seem to remember that itās not an issue though; Iām looking for it in my notesā¦
Are you still generating a downloadable CCDA?