Skip FOLIO Project Navigation

Runs separate clusters not one

I’ve installed Folio and ran all the example tests on one instance in dev mode with no problem. Now I am going through the guide and testing a cluster on the same machine and instead of of getting a cluster with 2 nodes, I get a 2 clusters with a single node each.

Node 1 on port 9130:
[root@dsi1a okapi]# java -jar okapi-core/target/okapi-core-fat.jar cluster
14:37:34 INFO Messages Loading messages from /infra-messages/Messages_en.properties …
Aug 14, 2019 2:37:34 PM com.hazelcast.config.AbstractXmlConfigHelper
WARNING: Name of the hazelcast schema location is incorrect, using default
14:37:35 WARN MainDeploy clusterHost not set
14:37:35 WARN MainDeploy clusterPort not set
14:37:35 INFO jFactory$Slf4jLogger [LOCAL] [dev] [3.12] Prefer IPv4 stack is true, prefer IPv6 addresses is false
14:37:35 INFO jFactory$Slf4jLogger [LOCAL] [dev] [3.12] Picked [152.10.6.201]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
14:37:35 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Hazelcast 3.12 (20190409 - 915d83a) starting at [152.10.6.201]:5701
14:37:35 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Copyright © 2008-2019, Hazelcast, Inc. All Rights Reserved.
14:37:36 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Backpressure is disabled
14:37:36 WARN jFactory$Slf4jLogger Property hazelcast.rest.enabled is deprecated. Use configuration object/element instead.
14:37:36 WARN jFactory$Slf4jLogger Property hazelcast.memcache.enabled is deprecated. Use configuration object/element instead.
14:37:37 WARN jFactory$Slf4jLogger Property hazelcast.rest.enabled is deprecated. Use configuration object/element instead.
14:37:37 WARN jFactory$Slf4jLogger Property hazelcast.memcache.enabled is deprecated. Use configuration object/element instead.
14:37:37 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Creating MulticastJoiner
14:37:37 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Starting 2 partition threads and 3 generic threads (1 dedicated for priority tasks)
14:37:37 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
14:37:37 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] [152.10.6.201]:5701 is STARTING
14:37:39 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12]

Members {size:1, ver:1} [
Member [152.10.6.201]:5701 - c34935b9-1d53-4de2-b1d2-2f2729aea7d5 this
]

14:37:39 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] [152.10.6.201]:5701 is STARTED
14:37:41 INFO jFactory$Slf4jLogger [152.10.6.201]:5701 [dev] [3.12] Initializing cluster partition table arrangement…
14:37:41 INFO oduleVersionReporter Module okapi-core 2.31.0-SNAPSHOT started
14:37:41 INFO oduleVersionReporter git: https://github.com/folio-org/okapi.git f5cc7ac5e99eef6fce88873458c51ad858abf7d6
14:37:41 INFO MainVerticle cluster NodeId c34935b9-1d53-4de2-b1d2-2f2729aea7d5
14:37:41 INFO MainVerticle Proxy using inmemory storage
14:37:41 WARN InternalModule InternalModule starting okapiversion=2.31.0-SNAPSHOT
14:37:41 INFO MainVerticle Checking for working distributed lock. Cluster=true
14:37:41 INFO MainVerticle Distributed lock ok
14:37:41 INFO Storage prepareDatabases: NORMAL
14:37:41 INFO TenantManager No storage to load tenants from, so starting with empty
14:37:41 INFO MainVerticle Creating the superTenant supertenant
14:37:41 INFO MainVerticle API Gateway started PID 9643@dsi1a.library.appstate.edu. Listening on port 9130
14:37:41 INFO MainVerticle Deploy completed succesfully
14:37:42 INFO TenantManager starting supertenant
14:37:42 INFO TenantManager handleTimer tenant=supertenant module=null seq1=0
14:37:42 INFO TenantManager handleTimer done no=0
14:40:45 INFO ProxyContext 870392/discovery REQ 0:0:0:0:0:0:0:1:47884 supertenant GET //discovery/nodes okapi-2.31.0-SNAPSHOT
14:40:45 INFO ProxyContext 870392/discovery RES 200 57433us okapi-2.31.0-SNAPSHOT /
/discovery/nodes

Node 2 on port 9150:

[root@dsi1a okapi]# java -Dport=9150 -jar okapi-core/target/okapi-core-fat.jar cluster
14:39:48 INFO Messages Loading messages from /infra-messages/Messages_en.properties …
Aug 14, 2019 2:39:48 PM com.hazelcast.config.AbstractXmlConfigHelper
WARNING: Name of the hazelcast schema location is incorrect, using default
14:39:49 WARN MainDeploy clusterHost not set
14:39:49 WARN MainDeploy clusterPort not set
14:39:49 INFO jFactory$Slf4jLogger [LOCAL] [dev] [3.12] Prefer IPv4 stack is true, prefer IPv6 addresses is false
14:39:49 INFO jFactory$Slf4jLogger [LOCAL] [dev] [3.12] Picked [152.10.6.201]:5702, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5702], bind any local is true
14:39:49 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Hazelcast 3.12 (20190409 - 915d83a) starting at [152.10.6.201]:5702
14:39:49 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Copyright © 2008-2019, Hazelcast, Inc. All Rights Reserved.
14:39:50 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Backpressure is disabled
14:39:50 WARN jFactory$Slf4jLogger Property hazelcast.rest.enabled is deprecated. Use configuration object/element instead.
14:39:50 WARN jFactory$Slf4jLogger Property hazelcast.memcache.enabled is deprecated. Use configuration object/element instead.
14:39:50 WARN jFactory$Slf4jLogger Property hazelcast.rest.enabled is deprecated. Use configuration object/element instead.
14:39:50 WARN jFactory$Slf4jLogger Property hazelcast.memcache.enabled is deprecated. Use configuration object/element instead.
14:39:50 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Creating MulticastJoiner
14:39:51 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Starting 2 partition threads and 3 generic threads (1 dedicated for priority tasks)
14:39:51 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
14:39:51 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] [152.10.6.201]:5702 is STARTING
14:39:53 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12]

Members {size:1, ver:1} [
Member [152.10.6.201]:5702 - aa3ae5ca-826c-42a0-8c4f-efe726b330e9 this
]

14:39:53 WARN jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
14:39:53 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] [152.10.6.201]:5702 is STARTED
14:39:55 INFO jFactory$Slf4jLogger [152.10.6.201]:5702 [dev] [3.12] Initializing cluster partition table arrangement…
14:39:55 INFO oduleVersionReporter Module okapi-core 2.31.0-SNAPSHOT started
14:39:55 INFO oduleVersionReporter git: https://github.com/folio-org/okapi.git f5cc7ac5e99eef6fce88873458c51ad858abf7d6
14:39:55 INFO MainVerticle cluster NodeId aa3ae5ca-826c-42a0-8c4f-efe726b330e9
14:39:55 INFO MainVerticle Proxy using inmemory storage
14:39:55 WARN InternalModule InternalModule starting okapiversion=2.31.0-SNAPSHOT
14:39:55 INFO MainVerticle Checking for working distributed lock. Cluster=true
14:39:55 INFO MainVerticle Distributed lock ok
14:39:55 INFO Storage prepareDatabases: NORMAL
14:39:55 INFO TenantManager No storage to load tenants from, so starting with empty
14:39:55 INFO MainVerticle Creating the superTenant supertenant
14:39:56 INFO MainVerticle API Gateway started PID 9806@dsi1a.library.appstate.edu. Listening on port 9150
14:39:56 INFO MainVerticle Deploy completed succesfully
14:39:56 INFO TenantManager starting supertenant
14:39:56 INFO TenantManager handleTimer tenant=supertenant module=null seq1=0
14:39:56 INFO TenantManager handleTimer done no=0
14:40:28 INFO ProxyContext 088568/discovery REQ 0:0:0:0:0:0:0:1:54956 supertenant GET //discovery/nodes okapi-2.31.0-SNAPSHOT
14:40:28 INFO ProxyContext 088568/discovery RES 200 39619us okapi-2.31.0-SNAPSHOT /
/discovery/nodes

and from the open command line in a third terminal I test with curl:

[root@dsi1a ~]# curl -w ‘\n’ -D - ://localhost:9150/_/discovery/nodes

HTTP/1.1 200 OK

Content-Type: application/json

X-Okapi-Trace: GET okapi-2.31.0-SNAPSHOT /_/discovery/nodes : 200 39014us

content-length: 94

[ {

“nodeId” : “aa3ae5ca-826c-42a0-8c4f-efe726b330e9”,

“url” : “://localhost:9150”

} ]

[root@dsi1a ~]# curl -w ‘\n’ -D - ://localhost:9130/_/discovery/nodes

HTTP/1.1 200 OK

Content-Type: application/json

X-Okapi-Trace: GET okapi-2.31.0-SNAPSHOT /_/discovery/nodes : 200 56858us

content-length: 94

[ {

“nodeId” : “c34935b9-1d53-4de2-b1d2-2f2729aea7d5”,

“url” : “://localhost:9130”

} ]

As can be seen here, I have to do a call to each port to get a response from that node.

What might I be missing here? TIA

PS: had to remove http everywhere cause it told me new users could not put more than 2 links in and it took my command line examples as links I guess.

Hi Thomas. There are very few developers and devops people on discuss.folio.org—it is mostly subject matter experts. I recommend joining the slack team (https://slack-invitation.folio.org/) and posting your question to the sys-ops channel there.

1 Like