2017-05-16 2 views
0

Ich habe IBM SDK Toolkit, Python, Microsoft Visual Studio, Oracle Instant Client installiert. Ich habe Pfadvariablen für alle sie gesetzt. Erstellt ein APIC-Loopback-Projekt, ich brauche Oracledb-Anschluss, So installiert Oracledb-Anschluss. Ich habe die Datenquelle erstellt und kann mich mit der Datenbank verbinden (Ich konnte eine Tabelle erstellen) Aber wenn ich versuche, die API durch den Aufruf einer Methode zu testen, gibt sie -1 als Statuscode zurück nicht in der Lage, den Server lokal zu starten/auszuführen, seine Rückkehr mit einigen Fehlern zurück. Ich habe die Fehlerdatei angehängt, bitte schauen Sie sich das an und können Sie mir bitte mitteilen, was fehlte und was die Lösung für das Problem sein wird.API connect Designer kann den Server nicht starten

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 [email protected] 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 

Antwort

1

Es scheint, dies ist ein bekanntes Problem mit Loopback und dem OracleDb Verbinder, wie in dieser Ausgabe zu sehen:

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

Das Update sieht stark in einer späteren Version der NPM-Modul zur Verfügung gestellt werden -agent:

in https://www.npmjs.com/package/strong-agent v2.1.2 Fest

Als Workaround für das aktuelle Problem können Sie die oracledb.getConnection() aktualisieren, um configurable: true wie im obigen Problem erläutert zu enthalten.