apiconnect
apiconnect copied to clipboard
Can't get api connect management interface to connect to Datapower
I also posted this in IBM developer forum https://www.ibm.com/mysupport/s/forumsquestion?language=en_US&id=0D50z00006jd0dqCAA
Our company is running API connect apic-v5.0.8.2 in production. I am trying to set up a local dev environment which is similar. I would like to be able to use the "test" feature in the designer which I believe requires Datapower Gateway to be running and connected to management interface.
The wild thing is that this was working last week but now it is not which has left me scratching my head. I suspect it has something to do with node versions or npm configuration. I started having issues when I tried making a project with apiconnect installed as a project dependency not globally installed. I've since removed nvm and all node versions and tried to get it to work with only one version of node and no node version manager to reduce variables. Still no luck.
I am using these guides: https://github.com/ibm-datapower/datapower-tutorials/blob/master/getting-started/start-with-docker.md https://www.ibm.com/support/knowledgecenter/SSMNED_5.0.0/com.ibm.apic.toolkit.doc/tapim_cli_install.html
Platform: mac OS Node: 10.23.0 ( I could not get toolkit to install with newer node versions because of node-gyp) apiconnect npm package: API Connect: v5.0.8.6 (apiconnect: v4.0.15)
Steps
I run
apic edit
API designer is available at http://127.0.0.1:9000/ I have the demo weather API loaded
then I hit the play button in the UI,
I see a modal pop up with a timeline of steps, detect platform, validate system, download and build, start gateway. They complete and eventually this modal goes away but the bar at the bottom with the play button continues to display at "stopped" state for the GW
now, back in the terminal window where I ran "apic edit" I see:
Debug: services.listImpl /Users/chylomicronman
Debug: services.listImpl return undefined
Debug: services.processStarted complete { id: 1,
name: 'chylomicronman-gw',
env:
{ NODE_ENV: 'production',
STRONG_PM_URL: 'http://127.0.0.1:8702';,
PROJECT_DIR: '/Users/chylomicronman',
PROJECT_NAME: 'chylomicronman',
TARGET_URL: null,
DATAPOWER: true,
__APIC_GW: true,
__APIC_APP_HOME: '/Users/chylomicronman' },
gw: true }
Debug: services.startImpl : returning [ { id: 1,
name: 'chylomicronman-gw',
env:
{ NODE_ENV: 'production',
STRONG_PM_URL: 'http://127.0.0.1:8702';,
PROJECT_DIR: '/Users/chylomicronman',
PROJECT_NAME: 'chylomicronman',
TARGET_URL: null,
DATAPOWER: true,
__APIC_GW: true,
__APIC_APP_HOME: '/Users/chylomicronman' },
gw: true } ]
Debug: services.listImpl /Users/chylomicronman
Debug: services.listImpl return undefined
Debug: services.listImpl /Users/chylomicronman
in another terminal I run "apic logs" and see
[Sat Oct 31 07:00:37 2020] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
2020-10-31T11:00:37.326Z pid:73258 worker:0 INFO supervisor starting (pid 73258)
2020-10-31T11:00:37.332Z pid:73258 worker:0 INFO supervisor reporting metrics to `internal:`
2020-10-31T11:00:37.349Z pid:73258 worker:0 INFO supervisor size set to undefined
2020-10-31T11:00:37.640Z pid:73262 worker:1 [Sat Oct 31 07:00:37 2020] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 3.1.3.202010302153 (Agent Core 3.2.6)
2020-10-31T11:00:37.695Z pid:73262 worker:1 [Sat Oct 31 07:00:37 2020] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
2020-10-31T11:00:48.254Z pid:73262 worker:1 [0x8040001c][system][notice] : DataPower IDG is on-line.
2020-10-31T11:01:09.505Z pid:73262 worker:1 [0x8100003b][mgmt][notice] domain(default): Domain configured successfully.
I run docker ps and see two running containers
ibm-apiconnect-toolkit/datapower-api-gateway:1.1.10
ibm-apiconnect-toolkit/datapower-mgmt-server-lite:1.1.10
when I tail the logs of the docker containers I see no errors
after about five minutes I run
apic services
and see
Service chylomicronman-gw failed to start.
Then, I try hitting the play button again and the UI shows me this error
Error Starting Application Unable to start application. See below for more details.
Service chylomicronman-gw started but did not initialize within the timeout period. Dumping log buffer.
2020-10-31T11:26:46.083Z pid:73258 worker:0 WARN received SIGTERM, shutting down
2020-10-31T11:26:46.085Z pid:73258 worker:0 INFO supervisor size set to undefined
2020-10-31T11:26:46.085Z pid:73258 worker:0 INFO supervisor stopped
then when I run "apic services:stop" I see this which is strange because it previously said the gateway failed to start
Debug: skipping prompt. enable-analytics value is set in config
Debug: invoking services:stop
Debug: services.stop undefined undefined undefined
Debug: datapower.cleanupBeforeRestart { name: 'chylomicronman-gw',
deploymentInfo:
{ hash: 'a8c3230f636c178d809ac70d730574fa557df535',
dir:
'/usr/local/bin/node/node-v10.23.0-darwin-x64/lib/node_modules/apiconnect/node_modules/apiconnect-mgmt-lite-datapower' },
env:
{ NODE_ENV: 'production',
STRONG_PM_URL: 'http://127.0.0.1:8702';,
PROJECT_DIR: '/Users/chylomicronman',
PROJECT_NAME: 'chylomicronman',
DATAPOWER: true,
__APIC_GW: true,
__APIC_APP_HOME: '/Users/chylomicronman' },
id: 1,
_groups: List [ { name: 'default', scale: 1, id: 1 } ] }
(node:74579) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated
Debug: services.stop stopping [ 'chylomicronman-gw' ]
Debug: stopService { name: 'chylomicronman-gw',
deploymentInfo:
{ hash: 'a8c3230f636c178d809ac70d730574fa557df535',
dir:
'/usr/local/bin/node/node-v10.23.0-darwin-x64/lib/node_modules/apiconnect/node_modules/apiconnect-mgmt-lite-datapower' },
env:
{ NODE_ENV: 'production',
STRONG_PM_URL: 'http://127.0.0.1:8702';,
PROJECT_DIR: '/Users/chylomicronman',
PROJECT_NAME: 'chylomicronman',
DATAPOWER: true,
__APIC_GW: true,
__APIC_APP_HOME: '/Users/chylomicronman' },
id: 1,
_groups: List [ { name: 'default', scale: 1, id: 1 } ] }
Debug: services.client.tryShutdown [ { id: 1,
name: 'chylomicronman-gw',
env:
{ NODE_ENV: 'production',
STRONG_PM_URL: 'http://127.0.0.1:8702';,
PROJECT_DIR: '/Users/chylomicronman',
PROJECT_NAME: 'chylomicronman',
DATAPOWER: true,
__APIC_GW: true,
__APIC_APP_HOME: '/Users/chylomicronman' },
gw: true,
error: true } ]
Debug: services.client.tryShutdown removing /Users/chylomicronman/.apiconnect/strong-pm
Debug: services.client.tryShutdown shutting pm down!
Stopped chylomicronman-gw
Info: Stopped chylomicronman-gw
Debug: Command completed successfully
Debug: exiting with code 0
I've tried with purely CLI commands and also no luck. This post is already quite long so I won't include the steps I've tried via CLI hopefully this is enough for someone to guide me in the right direction.