[英]GetDone in ibmmq (Node.js) doesn't stop listener of the queue
[英]ibmmq node client can't find MQ C Library, fails consistently
我正在尝试创建一个对服务器和 MQ 容器进行 docker 化的节点应用程序,并使用 ibmmq 节点客户端与所述容器进行交互。 我遇到了一个问题,我无法让我的服务器运行,因为找不到 MQ C 库。 有问题的具体错误:
Cannot find MQ C library.
System appears to be: linux[x64]
Has the MQ C client been installed?
Have you run setmqenv?
Error: ENOENT: no such file or directory, open '/opt/mqm/lib/libmqm_r.so'
at Object.openSync (fs.js:462:3)
at readFileSync (fs.js:364:35)
at new DynamicLibrary (/server/node_modules/ffi-napi/lib/dynamic_library.js:68:23)
at Object.Library (/server/node_modules/ffi-napi/lib/library.js:47:10)
at loadLib (/server/node_modules/ibmmq/lib/mqi.js:290:18)
at loadLibMulti (/server/node_modules/ibmmq/lib/mqi.js:417:13)
at Object.<anonymous> (/server/node_modules/ibmmq/lib/mqi.js:436:1)
at Module.<anonymous> (internal/modules/cjs/loader.js:999:30)
at Module._compile (/server/node_modules/source-map-support/source-map-support.js:568:25)
at internal/modules/cjs/loader.js:1027:10
[ERROR] 07:40:21 Error: ENOENT: no such file or directory, open '/opt/mqm/lib/libmqm_r.so'
当我 go 检查 /opt/... 时,没有文件夹 mqm。 我不太确定何时会在此过程中创建它。
这是我的 docker 文件:
FROM node:12
# Non-development values will be provided by Drone when
# deploying to staging or production
ARG ENV="development"
WORKDIR /server
COPY package.json .
COPY yarn.lock .
RUN yarn install --production=false
COPY . .
# In non-dev environments, we need to build executable code
# during image build time so that we're not doing it at
# container startup (which would cause significant down-time)
RUN if [ $ENV = "staging" ] || [ $ENV = "production" ]; \
then yarn build; \
fi
CMD ["yarn", "serve"]
触发问题的具体代码:
import mq from 'ibmmq'
const MQC = mq.MQC
我尝试了一些方法,包括不让 c 库构建,但没有任何效果。 任何帮助将不胜感激,在此先感谢!
请参阅https://github.com/ibm-messaging/mq-mqi-nodejs/tree/master/samples以了解使用npm install
的工作 Dockerfile 示例。
linux x64 的安装后脚本通常会引入 MQ Redist C 客户端 package。如果安装后由于某种原因未运行,或者无法下载 package,则必须手动安装 MQ C 客户端。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.