deployment on okapi


#1

Hello.
I’m trying to deploy a test module on okapi remotely. I follow okapi’s guide on github . I deployed moduleDescriptor.json but I have some problem on deployDescriptor.

When I check clusters with curl:
curl -w '\n' http://192.168.0.28:9130/_/discovery/nodes
I get this response:
[ {
“nodeId” : “10.0.2.15”,
“url” : “http://10.0.2.15:9130
} ]
I use nodeId to write deployDescriptor.json and call
curl -w '\n' -D - -s -X POST -H "Content-type: application/json" -d @/home/alice/atcult/FOLIO/DeploymentDescriptor-template.json http://192.168.0.28:9130/_/discovery/modules
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 95

Deployment failed. Could not connect to port 9131: Connection refused: localhost/127.0.0.1:9131

Here it is the log in okapi vagrant server:
2018-03-27 14:16:14,015 INFO ProxyService No tenantId, defaulting to okapi.supertenant
2018-03-27 14:16:14,016 INFO ProxyContext 269554/discovery REQ 10.0.2.2:54466 okapi.supertenant POST //discovery/modules okapi-1.10.0
2018-03-27 14:16:14,019 INFO DiscoveryManager addAndDeploy: {
“srvcId” : “cataloging-1.0.0”,
“nodeId” : “10.0.2.15”
}
2018-03-27 14:16:14,023 INFO ProxyService No tenantId, defaulting to okapi.supertenant
2018-03-27 14:16:14,025 INFO ProxyContext 543504/deployment REQ 10.0.2.15:40356 okapi.supertenant POST /
/deployment/modules okapi-1.10.0
2018-03-27 14:16:14,026 INFO DeploymentManager deploy instId 10.0.2.15-9131
2018-03-27 14:17:47,157 ERROR ProcessModuleHandle Failed to connect to service at port 9131 : Connection refused: localhost/127.0.0.1:9131
2018-03-27 14:17:47,157 WARN DeploymentManager Deploying cataloging-1.0.0 failed
2018-03-27 14:17:47,157 INFO ProxyContext 543504/deployment RES 500 okapi Deployment failed. Could not connect to port 9131: Connection refused: localhost/127.0.0.1:9131

How can I avoid it to connect to the wrong url “localhost/127.0.0.1:9131” ?

Here my moduleDescriptor.json:

{

“id”: “cataloging-1.0.0”,
“name”: “cataloging”,
“provides”: [
{
“id”: “cataloging”,
“version”: “0.1”,
“handlers”: [
{
“methods”: [ “GET”],
“pathPattern”: “/cataloging/authority-sources”
}
]
}
],
“requires”: [],
“launchDescriptor”: {
“exec”: “java -Dport=%p -jar /etc/folio/mod-cataloging/mod-cataloging-fat.jar”
}
}