knopkem / dicomweb-proxy

A proxy to translate between dicomweb and traditional dicom dimse services (PACS communication)
Other
68 stars 19 forks source link

Problem with npm bindings #72

Closed ferranalma3d closed 2 years ago

ferranalma3d commented 2 years ago

Hi again!

I'm trying to install the proxy in a new server and i'm having this problem. Any help would be lovely

I've already tried to change de node or npm version or installing new versions of bindings npm

thanks a lot

node src/app.js

/home/alma/alma-dicomproxy/node_modules/bindings/bindings.js:121 throw e; ^

Error: libwrap.so.0: cannot open shared object file: No such file or directory 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 (/home/alma/alma-dicomproxy/node_modules/bindings/bindings.js:112:48) at Object. (/home/alma/alma-dicomproxy/node_modules/dicom-dimse-native/index.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' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! dicomweb-proxy@1.1.5 start: node src/app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the dicomweb-proxy@1.1.5 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-02-21T14_23_37_091Z-debug.log [root@srvvisrxpre02 alma-dicomproxy]# node -v

knopkem commented 2 years ago

Hi, can you post which OS you are using (including version number). The issue you describe seem to be coming from an incompatibility of the the dicom-dimse-native plugin (dll/so) with your system. Note that I reverently added support for unicode which adds dependencies to libiconv that might cause the issue. You could test with an older version to see if this is the issue: https://github.com/knopkem/dicomweb-proxy/releases/tag/1.4.1

ferranalma3d commented 2 years ago

thanks for the quick replay

NAME="Red Hat Enterprise Linux" VERSION="8.5 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.5" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.5 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos" HOME_URL="https://www.redhat.com/" DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/" BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.5 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.5"

ferranalma3d commented 2 years ago

The firts version i've tried which I have in other servers running is from [2021-04-29] and i have the same problem

Thanks a lot

knopkem commented 2 years ago

Hi, it's weird that Red Hat doesn't work. The linux binaries are created on centos 7 which should be compatible. I'll check with centos 8 (similar to Red Hat 8). The best would be to compile the dicom-dimse-native module on the machine itself and copy the compiled binary to the node_modules folder. See https://github.com/knopkem/dicom-dimse-native It might also be a SELinux issue, you could try to turn it off temporarily.

ferranalma3d commented 2 years ago

Good night!

And thanks for quick reply :)

SELinux it was already disabled..and with the dicom-dimse-native module I'm having the same problem

I've change node version and try everything again and i'm now here.. looks the same but maybe you could have a better clue

@. dicomweb-proxy-master]# npm install npm WARN deprecated @@.: This is a stub types definition. socket.io-client provides its own type definitions, so you do not need this installed.

@.*** install /home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/dicom-dimse-native npx prebuild-install -r napi || npx cmake-js compile

npm notice created a lockfile as package-lock.json. You should commit this file. added 519 packages from 465 contributors and audited 520 packages in 22.043s

74 packages are looking for funding run npm fund for details

found 0 vulnerabilities

@.*** dicomweb-proxy-master]# npx cmake-js compile [ '/usr/bin/node',

'/home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/.bin/cmake-js', 'compile' ] info TOOL Using Unix Makefiles generator. info DIST Downloading distribution files to: /root/.cmake-js/node-x64/v12.22.10 http DIST - https://nodejs.org/dist/v12.22.10/SHASUMS256.txt http DIST - https://nodejs.org/dist/v12.22.10/node-v12.22.10-headers.tar.gz info CMD CONFIGURE info REP Build has been failed, trying to do a full rebuild. info CMD CLEAN info RUN [ info RUN 'cmake', info RUN '-E', info RUN 'remove_directory', info RUN '/home/alma/dicomweb-proxy-master/dicomweb-proxy-master/build' info RUN ] info CMD CONFIGURE ERR! OMG '/home/alma/dicomweb-proxy-master/dicomweb-proxy-master/CMakeLists.txt' not found.

Again thanks a lot

CTO

Mestre Dalmau, 19,

08031 Barcelona (Spain)

Mob: +34 638 564 472

Tel.: +34 93 238 05 92

www.alma-medical.com

CLÁUSULA INFORMATIVA PARA E-MAIL:

Este mensaje y sus archivos adjuntos pueden contener información confidencial, no estando permitida su comunicación, reproducción o distribución. Si usted no es el destinatario final, elimínelo e infórmenos por esta vía. De conformidad con lo dispuesto en las normativas vigentes en protección de datos, le informamos que sus datos personales serán tratados bajo la responsabilidad de ALMA IT SYSTEMS S.L. para gestionar la relación que nos vincula, y se conservarán durante no más tiempo del necesario para mantener el fin del tratamiento. No se comunicarán datos a terceros salvo obligación legal. Puede ejercer los derechos de acceso, rectificación, portabilidad, supresión, limitación y oposición enviando un mensaje a @.***, y si considera que el tratamiento no se ajusta a la normativa vigente, podrá presentar una reclamación ante la autoridad de control en www.aepd.es.

INFORMATION CLAUSE FOR E-mails:

This message and its attached files may contain confidential information. Communication, reproduction or distribution of this message is prohibited. If you are not the final recipient, please delete it and inform us via this channel. In accordance with the provisions of the current legislation on data protection, we inform you that your personal data will be processed under the responsibility of ALMA IT SYSTEMS S.L. to manage the relationship that binds us, and will be stored for no longer than is necessary in maintaining the purpose of processing. The data will not be transferred to third parties unless legally obliged to do so. You may exercise your rights of access, rectification, portability, erasure, restriction and opposition by sending an e-mail to @.***, and if you consider that the processing does not comply with the current legislation, you may file a claim with the supervisory authority

El mar, 22 feb 2022 a las 21:05, Michael Knopke @.***>) escribió:

Hi, it's weird that Red Hat doesn't work. The linux binaries are created on centos 7 which should be compatible. I'll check with centos 8 (similar to Red Hat 8). The best would be to compile the dicom-dimse-native module on the machine itself and copy the compiled binary to the node_modules folder. See https://github.com/knopkem/dicom-dimse-native It might also be a SELinux issue, you could try to turn it off temporarily.

— Reply to this email directly, view it on GitHub https://github.com/knopkem/dicomweb-proxy/issues/72#issuecomment-1048166280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUTE3NFROXWGQQM775X7GDU4PT7DANCNFSM5O6ZFW6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ferranalma3d commented 2 years ago

Hi,

I've tried > npx prebuild-install -r napi || npx cmake-js compile

then npm rebuild dicom-dimse-native

then i get his issue

In file included from /home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/dicom-dimse-native/src/BaseAsyncWorker.h:7, from /home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/dicom-dimse-native/src/EchoAsyncWorker.h:3, from /home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/dicom-dimse-native/src/Addon.cc:3: /home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/dicom-dimse-native/src/Utils.h:26:10: fatal error: dcmtk/dcmj2k/djdecode.h: No such file or directory

include "dcmtk/dcmj2k/djdecode.h" / for dcmj2k decoder/

      ^~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. gmake[2]: [CMakeFiles/dcmtk.dir/build.make:76: CMakeFiles/dcmtk.dir/src/Addon.cc.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:805: CMakeFiles/dcmtk.dir/all] Error 2 gmake: [Makefile:146: all] Error 2 ERR! OMG Process terminated: 2 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @. install: npx prebuild-install -r napi || npx cmake-js compile npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @.*** install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-02-22T22_14_46_886Z-debug.log

CTO

Mestre Dalmau, 19,

08031 Barcelona (Spain)

Mob: +34 638 564 472

Tel.: +34 93 238 05 92

www.alma-medical.com

CLÁUSULA INFORMATIVA PARA E-MAIL:

Este mensaje y sus archivos adjuntos pueden contener información confidencial, no estando permitida su comunicación, reproducción o distribución. Si usted no es el destinatario final, elimínelo e infórmenos por esta vía. De conformidad con lo dispuesto en las normativas vigentes en protección de datos, le informamos que sus datos personales serán tratados bajo la responsabilidad de ALMA IT SYSTEMS S.L. para gestionar la relación que nos vincula, y se conservarán durante no más tiempo del necesario para mantener el fin del tratamiento. No se comunicarán datos a terceros salvo obligación legal. Puede ejercer los derechos de acceso, rectificación, portabilidad, supresión, limitación y oposición enviando un mensaje a @.***, y si considera que el tratamiento no se ajusta a la normativa vigente, podrá presentar una reclamación ante la autoridad de control en www.aepd.es.

INFORMATION CLAUSE FOR E-mails:

This message and its attached files may contain confidential information. Communication, reproduction or distribution of this message is prohibited. If you are not the final recipient, please delete it and inform us via this channel. In accordance with the provisions of the current legislation on data protection, we inform you that your personal data will be processed under the responsibility of ALMA IT SYSTEMS S.L. to manage the relationship that binds us, and will be stored for no longer than is necessary in maintaining the purpose of processing. The data will not be transferred to third parties unless legally obliged to do so. You may exercise your rights of access, rectification, portability, erasure, restriction and opposition by sending an e-mail to @.***, and if you consider that the processing does not comply with the current legislation, you may file a claim with the supervisory authority

El mar, 22 feb 2022 a las 22:19, Ferran Garcia @.***>) escribió:

Good night!

And thanks for quick reply :)

SELinux it was already disabled..and with the dicom-dimse-native module I'm having the same problem

I've change node version and try everything again and i'm now here.. looks the same but maybe you could have a better clue

@. dicomweb-proxy-master]# npm install npm WARN deprecated @@.: This is a stub types definition. socket.io-client provides its own type definitions, so you do not need this installed.

@.*** install /home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/dicom-dimse-native npx prebuild-install -r napi || npx cmake-js compile

npm notice created a lockfile as package-lock.json. You should commit this file. added 519 packages from 465 contributors and audited 520 packages in 22.043s

74 packages are looking for funding run npm fund for details

found 0 vulnerabilities

@.*** dicomweb-proxy-master]# npx cmake-js compile [ '/usr/bin/node',

'/home/alma/dicomweb-proxy-master/dicomweb-proxy-master/node_modules/.bin/cmake-js', 'compile' ] info TOOL Using Unix Makefiles generator. info DIST Downloading distribution files to: /root/.cmake-js/node-x64/v12.22.10 http DIST - https://nodejs.org/dist/v12.22.10/SHASUMS256.txt http DIST - https://nodejs.org/dist/v12.22.10/node-v12.22.10-headers.tar.gz info CMD CONFIGURE info REP Build has been failed, trying to do a full rebuild. info CMD CLEAN info RUN [ info RUN 'cmake', info RUN '-E', info RUN 'remove_directory', info RUN '/home/alma/dicomweb-proxy-master/dicomweb-proxy-master/build' info RUN ] info CMD CONFIGURE ERR! OMG '/home/alma/dicomweb-proxy-master/dicomweb-proxy-master/CMakeLists.txt' not found.

Again thanks a lot

  • Ferran Garcia*

CTO

Mestre Dalmau, 19,

08031 Barcelona (Spain)

Mob: +34 638 564 472

Tel.: +34 93 238 05 92

www.alma-medical.com

CLÁUSULA INFORMATIVA PARA E-MAIL:

Este mensaje y sus archivos adjuntos pueden contener información confidencial, no estando permitida su comunicación, reproducción o distribución. Si usted no es el destinatario final, elimínelo e infórmenos por esta vía. De conformidad con lo dispuesto en las normativas vigentes en protección de datos, le informamos que sus datos personales serán tratados bajo la responsabilidad de ALMA IT SYSTEMS S.L. para gestionar la relación que nos vincula, y se conservarán durante no más tiempo del necesario para mantener el fin del tratamiento. No se comunicarán datos a terceros salvo obligación legal. Puede ejercer los derechos de acceso, rectificación, portabilidad, supresión, limitación y oposición enviando un mensaje a @.***, y si considera que el tratamiento no se ajusta a la normativa vigente, podrá presentar una reclamación ante la autoridad de control en www.aepd.es.

INFORMATION CLAUSE FOR E-mails:

This message and its attached files may contain confidential information. Communication, reproduction or distribution of this message is prohibited. If you are not the final recipient, please delete it and inform us via this channel. In accordance with the provisions of the current legislation on data protection, we inform you that your personal data will be processed under the responsibility of ALMA IT SYSTEMS S.L. to manage the relationship that binds us, and will be stored for no longer than is necessary in maintaining the purpose of processing. The data will not be transferred to third parties unless legally obliged to do so. You may exercise your rights of access, rectification, portability, erasure, restriction and opposition by sending an e-mail to @.***, and if you consider that the processing does not comply with the current legislation, you may file a claim with the supervisory authority

El mar, 22 feb 2022 a las 21:05, Michael Knopke @.***>) escribió:

Hi, it's weird that Red Hat doesn't work. The linux binaries are created on centos 7 which should be compatible. I'll check with centos 8 (similar to Red Hat 8). The best would be to compile the dicom-dimse-native module on the machine itself and copy the compiled binary to the node_modules folder. See https://github.com/knopkem/dicom-dimse-native It might also be a SELinux issue, you could try to turn it off temporarily.

— Reply to this email directly, view it on GitHub https://github.com/knopkem/dicomweb-proxy/issues/72#issuecomment-1048166280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUTE3NFROXWGQQM775X7GDU4PT7DANCNFSM5O6ZFW6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

knopkem commented 2 years ago

This is weird, it should find the include file. In fact I just tested compiling from source out of the node_modules folder and it worked. There are 2 things you can do:

1) Try compiling from master directly

2) if you get the same issue:

ferranalma3d commented 2 years ago

Hello,

WORKING!

The problem was that de library libwrap.so.0 was missing..

image

Once I copy this library from other server it works.

I've google it, it looks that Linux Red Had has deprecated / elimintaed this library and it's not working anymore.

Thanks a lot for the help!!

knopkem commented 2 years ago

ok, good to know