3

I followed the instructions for creating a standard project for Strongloop with IBM API Connect.

Link to the tutorial

At the "Start your API" step, when clicking on the start button, the API didn't start.

In my console, there was this error message:

Unhandled rejection Error: Service manager failed to start. 
Please review /Users/edouardm/.apiconnect/strong-pm/start.log for details.

This document stated:

loopback-connector-sqlite3 must be installed to use the sql backend.
Use the --json-file-db option if you are unable to install loopback-connector-sqlite3.

Hence, I installed locally (and then globally) this component, but the same error was still happening.

The Stack Trace doesn't give me any clue either...

at ChildProcess.<anonymous> (/usr/local/lib/node_modules/apiconnect/node_modules/apiconnect-cli-pm/lib/start/pm.js:122:23)
at ChildProcess.g (events.js:260:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
at Process.onexit (/usr/local/lib/node_modules/apiconnect/node_modules/apiconnect-cli-edit/node_modules/apim-ui/node_modules/loopback-workspace/node_modules/loopback/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31)
joe
  • 2,468
  • 2
  • 12
  • 19
Prime360
  • 47
  • 5

1 Answers1

5

I just ran the sample, and didn't run into the issue that you mentioned. Here is some data that may help you.

My node, npm, and apic versions:

  • node version: 4.1.2

  • npm version: 2.14.4

  • apic version: 1.0.2

Double check to see that your model is using the In-memory DB and that you clicked the save icon in the right corner of your screen after making the changes.

Hongbin Wang
  • 1,186
  • 2
  • 14
  • 34
joe
  • 2,468
  • 2
  • 12
  • 19
  • I double checked... node -v : v4.2.6; npm -v ; 2.14.12; apic -v : 1.0.2 – Prime360 Apr 29 '16 at 09:13
  • So I ran the server manually with `npm run start`. I could only make temporary changes. When restarting the server, the data had indeed not been saved. Should the data be stored on my computer - thanks to a component such as loopback-connector-sqlite3 - or on some IBM online database ? – Prime360 Apr 29 '16 at 09:46
  • API Connect/Strongloop have the ability to connect to external datasources like the IBM Cloud service offering, Cloudant, by adding the correct Loopback components to your project, providing credentials, and connecting the external datasource to your model. However, this simple tutorial just uses the provided in-memory database. https://docs.strongloop.com/display/public/LB/Connect+your+API+to+a+data+source – joe Apr 29 '16 at 13:42