0

我已经安装了 IBM SDK 工具包、Python、Microsoft Visual Studio、Oracle Instant Client。我已经为所有这些设置了路径变量。创建了一个APIC环回项目,我需要oracledb连接器,所以安装了oracledb连接器。我已经创建了数据源,并且能够连接到数据库。(我能够创建一个表)但是当我尝试通过调用任何方法来测试 api 时,它返回 -1 作为状态码我无法在本地启动/运行服务器,它返回一些错误。我已附上错误文件,请查看该文件,您能否让我知道缺少什么以及解决该问题的方法。

Service api-mob started but did not initialize within the timeout period. Dumping log buffer.
2017-05-16T14:50:12.181Z pid:5592 worker:0 INFO strong-agent native addon missing, install a compiler
2017-05-16T14:50:12.197Z pid:5592 worker:0 INFO strong-agent v2.0.4 profiling app 'api-mob' pid '5592'
2017-05-16T14:50:12.197Z pid:5592 worker:0 INFO strong-agent[5592] started profiling agent
2017-05-16T14:50:12.197Z pid:5592 worker:0 INFO supervisor starting (pid 5592)
2017-05-16T14:50:12.212Z pid:5592 worker:0 INFO strong-agent strong-agent using strong-cluster-control v2.2.3
2017-05-16T14:50:12.212Z pid:5592 worker:0 INFO supervisor reporting metrics to `internal:`
2017-05-16T14:50:12.228Z pid:5592 worker:0 INFO strong-agent not profiling, agent metrics requires a valid license.
2017-05-16T14:50:12.228Z pid:5592 worker:0 Please contact sales@strongloop.com for assistance.
2017-05-16T14:50:12.243Z pid:5592 worker:0 INFO supervisor size set to 1
2017-05-16T14:50:12.429Z pid:5592 worker:0 INFO supervisor started worker 1 (pid 12080)
2017-05-16T14:50:12.429Z pid:5592 worker:0 INFO supervisor resized to 1
2017-05-16T14:50:12.751Z pid:12080 worker:1 INFO strong-agent native addon missing, install a compiler
2017-05-16T14:50:12.754Z pid:12080 worker:1 INFO strong-agent v2.0.4 profiling app 'api-mob' pid '12080'
2017-05-16T14:50:12.756Z pid:12080 worker:1 INFO strong-agent[12080] started profiling agent
2017-05-16T14:50:14.614Z pid:12080 worker:1 C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback\lib\application.js:246
2017-05-16T14:50:14.614Z pid:12080 worker:1     throw err;
2017-05-16T14:50:14.614Z pid:12080 worker:1     ^
2017-05-16T14:50:14.614Z pid:12080 worker:1 TypeError: Cannot redefine property: getConnection
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Function.defineProperty (native)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at install (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:264:10)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:64:38
2017-05-16T14:50:14.614Z pid:12080 worker:1     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:32
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Array.forEach (native)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at each (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:8)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at around (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:60:3)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Object.after (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:24:40)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at oracleBase (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:25:9)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at oracledb (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:20:10)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Module.module.__proto__.require (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\agent.js:193:50)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at require (internal/module.js:20:19)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Object.<anonymous> (C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback-connector-oracle\lib\oracle.js:12:14)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Module._compile (module.js:570:32)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Object.Module._extensions..js (module.js:579:10)
2017-05-16T14:50:14.614Z pid:12080 worker:1     at Module.load (module.js:487:32)
2017-05-16T14:50:14.630Z pid:5592 worker:0 ERROR supervisor worker id 1 (pid 12080) accidental exit with 1
2017-05-16T14:50:16.912Z pid:5592 worker:0 INFO supervisor started worker 2 (pid 10704)
2017-05-16T14:50:16.912Z pid:5592 worker:0 INFO supervisor resized to 1
2017-05-16T14:50:17.243Z pid:10704 worker:2 INFO strong-agent native addon missing, install a compiler
2017-05-16T14:50:17.243Z pid:10704 worker:2 INFO strong-agent v2.0.4 profiling app 'api-mob' pid '10704'
2017-05-16T14:50:17.246Z pid:10704 worker:2 INFO strong-agent[10704] started profiling agent
2017-05-16T14:50:19.098Z pid:10704 worker:2 C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback\lib\application.js:246
2017-05-16T14:50:19.098Z pid:10704 worker:2     throw err;
2017-05-16T14:50:19.098Z pid:10704 worker:2     ^
2017-05-16T14:50:19.098Z pid:10704 worker:2 TypeError: Cannot redefine property: getConnection
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Function.defineProperty (native)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at install (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:264:10)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:64:38
2017-05-16T14:50:19.098Z pid:10704 worker:2     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:32
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Array.forEach (native)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at each (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:8)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at around (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:60:3)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Object.after (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:24:40)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at oracleBase (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:25:9)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at oracledb (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:20:10)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Module.module.__proto__.require (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\agent.js:193:50)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at require (internal/module.js:20:19)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Object.<anonymous> (C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback-connector-oracle\lib\oracle.js:12:14)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Module._compile (module.js:570:32)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Object.Module._extensions..js (module.js:579:10)
2017-05-16T14:50:19.098Z pid:10704 worker:2     at Module.load (module.js:487:32)
2017-05-16T14:50:19.114Z pid:5592 worker:0 ERROR supervisor worker id 2 (pid 10704) accidental exit with 1
2017-05-16T14:50:21.378Z pid:5592 worker:0 INFO supervisor started worker 3 (pid 11664)
2017-05-16T14:50:21.378Z pid:5592 worker:0 INFO supervisor resized to 1
2017-05-16T14:50:21.664Z pid:11664 worker:3 INFO strong-agent native addon missing, install a compiler
2017-05-16T14:50:21.664Z pid:11664 worker:3 INFO strong-agent v2.0.4 profiling app 'api-mob' pid '11664'
2017-05-16T14:50:21.666Z pid:11664 worker:3 INFO strong-agent[11664] started profiling agent
2017-05-16T14:50:23.672Z pid:11664 worker:3 C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback\lib\application.js:246
2017-05-16T14:50:23.672Z pid:11664 worker:3     throw err;
2017-05-16T14:50:23.672Z pid:11664 worker:3     ^
2017-05-16T14:50:23.672Z pid:11664 worker:3 TypeError: Cannot redefine property: getConnection
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Function.defineProperty (native)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at install (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:264:10)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:64:38
2017-05-16T14:50:23.672Z pid:11664 worker:3     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:32
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Array.forEach (native)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at each (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:8)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at around (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:60:3)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Object.after (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:24:40)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at oracleBase (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:25:9)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at oracledb (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:20:10)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Module.module.__proto__.require (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\agent.js:193:50)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at require (internal/module.js:20:19)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Object.<anonymous> (C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback-connector-oracle\lib\oracle.js:12:14)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Module._compile (module.js:570:32)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Object.Module._extensions..js (module.js:579:10)
2017-05-16T14:50:23.672Z pid:11664 worker:3     at Module.load (module.js:487:32)
2017-05-16T14:50:23.682Z pid:5592 worker:0 ERROR supervisor worker id 3 (pid 11664) accidental exit with 1
2017-05-16T14:50:25.943Z pid:5592 worker:0 INFO supervisor started worker 4 (pid 12124)
2017-05-16T14:50:25.943Z pid:5592 worker:0 INFO supervisor resized to 1
2017-05-16T14:50:26.312Z pid:12124 worker:4 INFO strong-agent native addon missing, install a compiler
2017-05-16T14:50:26.312Z pid:12124 worker:4 INFO strong-agent v2.0.4 profiling app 'api-mob' pid '12124'
2017-05-16T14:50:26.312Z pid:12124 worker:4 INFO strong-agent[12124] started profiling agent
2017-05-16T14:50:28.144Z pid:12124 worker:4 C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback\lib\application.js:246
2017-05-16T14:50:28.144Z pid:12124 worker:4     throw err;
2017-05-16T14:50:28.144Z pid:12124 worker:4     ^
2017-05-16T14:50:28.144Z pid:12124 worker:4 TypeError: Cannot redefine property: getConnection
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Function.defineProperty (native)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at install (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:264:10)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:64:38
2017-05-16T14:50:28.144Z pid:12124 worker:4     at C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:32
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Array.forEach (native)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at each (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:138:8)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at around (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:60:3)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Object.after (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\proxy.js:24:40)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at oracleBase (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:25:9)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at oracledb (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\probes\oracledb.js:20:10)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Module.module.__proto__.require (C:\Users\abc\AppData\Roaming\npm\node_modules\apiconnect\node_modules\strong-agent\lib\agent.js:193:50)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at require (internal/module.js:20:19)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Object.<anonymous> (C:\Users\abc\Documents\API-EtoE\api-mob\node_modules\loopback-connector-oracle\lib\oracle.js:12:14)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Module._compile (module.js:570:32)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Object.Module._extensions..js (module.js:579:10)
2017-05-16T14:50:28.144Z pid:12124 worker:4     at Module.load (module.js:487:32)
2017-05-16T14:50:28.164Z pid:5592 worker:0 ERROR supervisor worker id 4 (pid 12124) accidental exit with 1
2017-05-16T14:50:30.325Z pid:5592 worker:0 INFO supervisor started worker 5 (pid 11156)
2017-05-16T14:50:30.325Z pid:5592 worker:0 INFO supervisor resized to 1
4

1 回答 1

1

这似乎是 Loopback 和 Oracledb 连接器的一个已知问题,如本期所示:

https://github.com/strongloop/loopback/issues/2873

NPM 模块 strong-agent 的更高版本中似乎提供了该修复:

https://www.npmjs.com/package/strong-agent v2.1.2中修复

作为当前问题的解决方法,您可以更新oracledb.getConnection()以包含configurable: true,如上述问题中所述。

于 2017-05-17T14:10:58.300 回答