简体   繁体   English

ibmmq 节点客户端找不到 MQ C 库,始终失败

[英]ibmmq node client can't find MQ C Library, fails consistently

I'm trying to create a node app that dockerizes the server and the MQ container, and use the ibmmq node client to interact with said container.我正在尝试创建一个对服务器和 MQ 容器进行 docker 化的节点应用程序,并使用 ibmmq 节点客户端与所述容器进行交互。 I'm running into an issue where I'm not able to get my server running because the MQ C library can't be found.我遇到了一个问题,我无法让我的服务器运行,因为找不到 MQ C 库。 The specific error in question:有问题的具体错误:

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'

When I go to check /opt/... there is no folder mqm.当我 go 检查 /opt/... 时,没有文件夹 mqm。 I'm not really sure when it would be created in the process.我不太确定何时会在此过程中创建它。

Here is my docker file:这是我的 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"]

The specific code that triggers the issue:触发问题的具体代码:

import mq from 'ibmmq'

const MQC = mq.MQC

I've tried a few things, including not letting the c library build but nothing is working.我尝试了一些方法,包括不让 c 库构建,但没有任何效果。 Any help would be appreciated, thanks in advance!任何帮助将不胜感激,在此先感谢!

See https://github.com/ibm-messaging/mq-mqi-nodejs/tree/master/samples for a working Dockerfile example using npm install .请参阅https://github.com/ibm-messaging/mq-mqi-nodejs/tree/master/samples以了解使用npm install的工作 Dockerfile 示例。

The postinstall script for linux x64 will normally pull in the MQ Redist C client package. If the postinstall is not run for some reason, or cannot download the package, then you have to install the MQ C client manually. linux x64 的安装后脚本通常会引入 MQ Redist C 客户端 package。如果安装后由于某种原因未运行,或者无法下载 package,则必须手动安装 MQ C 客户端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ibmmq (Node.js) 中的 GetDone 不会停止队列的侦听器 - GetDone in ibmmq (Node.js) doesn't stop listener of the queue 外壳找不到我的ruby gem /节点库 - shell can't find my ruby gem/ node library 无法使用 Google 的 node.js 客户端库生成 JWT 客户端 - Can't generate JWT client with Google's node.js client library 尝试在OS X上安装node.js失败,但是我找不到支持 - Attempt to install node.js on OS X fails but I can't find support 无法使用 Google 的 node.js 客户端库生成 JWT 客户端。 运行代码时出现 Typeerror - Can't generate JWT client with Google's node.js client library. Getting Typeerror while running the code 在 ibmmq Node.js 中获取消息 - Getting message in ibmmq Node.js 测试在本地通过,但在 Jenkins 作业中始终失败 - Node、Express、Mocha - Test passes locally, but consistently fails in a Jenkins job - Node, Express, Mocha apache ssl(443)node.js ssl(8081)。 客户端找不到socket.io.js - apache ssl (443) node.js ssl (8081). Client can't find socket.io.js C ++ / Node.js:binding.gyp库失败 - C++ / Node.js :binding.gyp library fails 我无法以编程方式使用 node.js 客户端库从 google-cloud-automl 获取 model id - I can't programmatically get the model id from google-cloud-automl with node.js client library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM