Hello,
I’m trying to set up a 3-node CrateDB cluster and now I can’t even connect with crash
now on Node 001. Yesterday, I started with the first node and I was able to connect to it via crash
, and then I configured all of the nodes as the following:
Node 001:
administrator@crate-dn-001:~$ grep -v "^#" /etc/crate/crate.yml | sed '/^[[:space:]]*$/d'
path.data: /data
gateway.expected_nodes: 3
gateway.recover_after_nodes: 3
network.host: _site_, _local_
discovery.seed_hosts:
- 192.168.239.30:4300
- 192.168.239.31:4300
- 192.168.239.32:4300
cluster.initial_master_nodes:
- 192.168.239.30
- 192.168.239.31
- 192.168.239.32
auth.host_based.enabled: true
auth:
host_based:
config:
0:
user: crate
address: _local_
method: trust
99:
method: password
node.name: crate-dn-001
Node 002:
administrator@crate-dn-002:~$ grep -v "^#" /etc/crate/crate.yml | sed '/^[[:space:]]*$/d'
path.data: /data
gateway.expected_nodes: 3
gateway.recover_after_nodes: 3
network.host: _site_, _local_
discovery.seed_hosts:
- 192.168.239.30:4300
- 192.168.239.31:4300
- 192.168.239.32:4300
cluster.initial_master_nodes:
- 192.168.239.30
- 192.168.239.31
- 192.168.239.32
auth.host_based.enabled: true
auth:
host_based:
config:
0:
user: crate
address: _local_
method: trust
99:
method: password
node.name: crate-dn-002
Node 003:
administrator@crate-dn-003:~$ grep -v "^#" /etc/crate/crate.yml | sed '/^[[:space:]]*$/d'
path.data: /data
gateway.expected_nodes: 3
gateway.recover_after_nodes: 3
network.host: _site_, _local_
discovery.seed_hosts:
- 192.168.239.30:4300
- 192.168.239.31:4300
- 192.168.239.32:4300
cluster.initial_master_nodes:
- 192.168.239.30
- 192.168.239.31
- 192.168.239.32
auth.host_based.enabled: true
auth:
host_based:
config:
0:
user: crate
address: _local_
method: trust
99:
method: password
node.name: crate-dn-003
When I restart the nodes, and check the status, I get the following:
Node 001:
administrator@crate-dn-001:~$ sudo systemctl restart crate
administrator@crate-dn-001:~$ sudo systemctl status crate
● crate.service - CrateDB Server
Loaded: loaded (/lib/systemd/system/crate.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-10-01 10:14:28 UTC; 3s ago
Docs: https://crate.io/docs/
Main PID: 12421 (java)
Tasks: 43 (limit: 36863)
Memory: 1.0G
CGroup: /system.slice/crate.service
└─12421 /usr/share/crate/jdk/bin/java -Xms16G -Xmx16G -Djava.awt.headless=true -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccu
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [io.crate.plugin.
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [io.crate.plugin.
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [io.crate.udc.plu
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [org.elasticsearc
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [org.elasticsearc
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [org.elasticsearc
Oct 01 10:14:30 crate-dn-001 crate[12421]: [2021-10-01T10:14:30,425][INFO ][o.e.p.PluginsService ] [crate-dn-001] loaded plugin [org.elasticsearc
Oct 01 10:14:31 crate-dn-001 crate[12421]: [2021-10-01T10:14:31,219][INFO ][o.e.d.DiscoveryModule ] [crate-dn-001] using discovery type [zen] and
Oct 01 10:14:31 crate-dn-001 crate[12421]: [2021-10-01T10:14:31,857][INFO ][psql ] [crate-dn-001] PSQL SSL support is disabled.
Oct 01 10:14:31 crate-dn-001 crate[12421]: [2021-10-01T10:14:31,955][INFO ][i.c.p.PipelineRegistry ] [crate-dn-001] HTTP SSL support is disabled.
administrator@crate-dn-001:~$ sudo systemctl status crate
● crate.service - CrateDB Server
Loaded: loaded (/lib/systemd/system/crate.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-10-01 10:14:28 UTC; 1min 5s ago
Docs: https://crate.io/docs/
Main PID: 12421 (java)
Tasks: 61 (limit: 36863)
Memory: 1.7G
CGroup: /system.slice/crate.service
└─12421 /usr/share/crate/jdk/bin/java -Xms16G -Xmx16G -Djava.awt.headless=true -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccu
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,162][INFO ][o.e.n.Node ] [crate-dn-001] initialized
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,162][INFO ][o.e.n.Node ] [crate-dn-001] starting ...
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,292][INFO ][psql ] [crate-dn-001] publish_address {192.168.239.30
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,304][INFO ][o.e.h.n.Netty4HttpServerTransport] [crate-dn-001] publish_address {192.16
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,315][INFO ][o.e.t.TransportService ] [crate-dn-001] publish_address {192.168.239.30
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,458][INFO ][o.e.b.BootstrapChecks ] [crate-dn-001] bound or publishing to a non-lo
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,461][INFO ][o.e.c.c.Coordinator ] [crate-dn-001] cluster UUID [iXbkexKsQZyDNjMVU
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,577][INFO ][o.e.c.s.MasterService ] [crate-dn-001] elected-as-master ([1] nodes jo
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,624][INFO ][o.e.c.s.ClusterApplierService] [crate-dn-001] master node changed {previo
Oct 01 10:14:32 crate-dn-001 crate[12421]: [2021-10-01T10:14:32,634][INFO ][o.e.n.Node ] [crate-dn-001] started
Node 002:
administrator@crate-dn-002:~$ sudo systemctl status crate
● crate.service - CrateDB Server
Loaded: loaded (/lib/systemd/system/crate.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-10-01 10:16:37 UTC; 39s ago
Docs: https://crate.io/docs/
Main PID: 4317 (java)
Tasks: 66 (limit: 36863)
Memory: 1.4G
CGroup: /system.slice/crate.service
└─4317 /usr/share/crate/jdk/bin/java -Xms16G -Xmx16G -Djava.awt.headless=true -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Xlog:
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,348][INFO ][o.e.n.Node ] [crate-dn-002] initialized
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,348][INFO ][o.e.n.Node ] [crate-dn-002] starting ...
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,488][INFO ][psql ] [crate-dn-002] publish_address {192.168.239.31:5432}, bound_addresse
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,502][INFO ][o.e.h.n.Netty4HttpServerTransport] [crate-dn-002] publish_address {192.168.239.31:4200}, bound_
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,517][INFO ][o.e.t.TransportService ] [crate-dn-002] publish_address {192.168.239.31:4300}, bound_addresse
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,705][INFO ][o.e.b.BootstrapChecks ] [crate-dn-002] bound or publishing to a non-loopback address, enforc
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,708][INFO ][o.e.c.c.Coordinator ] [crate-dn-002] cluster UUID [Eri8ChLNRz23zCUfJOGneA]
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,818][INFO ][o.e.c.s.MasterService ] [crate-dn-002] elected-as-master ([1] nodes joined)[{crate-dn-002}{z
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,861][INFO ][o.e.c.s.ClusterApplierService] [crate-dn-002] master node changed {previous [], current [{crate
Oct 01 10:16:41 crate-dn-002 crate[4317]: [2021-10-01T10:16:41,870][INFO ][o.e.n.Node ] [crate-dn-002] started
Node 003:
administrator@crate-dn-003:~$ sudo systemctl restart crate
administrator@crate-dn-003:~$ sudo systemctl status crate
● crate.service - CrateDB Server
Loaded: loaded (/lib/systemd/system/crate.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-10-01 10:18:04 UTC; 6s ago
Docs: https://crate.io/docs/
Main PID: 4387 (java)
Tasks: 67 (limit: 36863)
Memory: 1.1G
CGroup: /system.slice/crate.service
└─4387 /usr/share/crate/jdk/bin/java -Xms16G -Xmx16G -Djava.awt.headless=true -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Xlog:gc*,gc+age=
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,695][INFO ][o.e.n.Node ] [crate-dn-003] initialized
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,696][INFO ][o.e.n.Node ] [crate-dn-003] starting ...
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,823][INFO ][psql ] [crate-dn-003] publish_address {192.168.239.32:5432}, bound_addresses {[::1]:54
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,835][INFO ][o.e.h.n.Netty4HttpServerTransport] [crate-dn-003] publish_address {192.168.239.32:4200}, bound_addresses {
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,846][INFO ][o.e.t.TransportService ] [crate-dn-003] publish_address {192.168.239.32:4300}, bound_addresses {[::1]:43
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,995][INFO ][o.e.b.BootstrapChecks ] [crate-dn-003] bound or publishing to a non-loopback address, enforcing bootstr
Oct 01 10:18:07 crate-dn-003 crate[4387]: [2021-10-01T10:18:07,997][INFO ][o.e.c.c.Coordinator ] [crate-dn-003] cluster UUID [x7zTdQYtRKG9jOG6Cf4Jdw]
Oct 01 10:18:08 crate-dn-003 crate[4387]: [2021-10-01T10:18:08,058][INFO ][o.e.c.s.MasterService ] [crate-dn-003] elected-as-master ([1] nodes joined)[{crate-dn-003}{tPM64bSrTeu8
Oct 01 10:18:08 crate-dn-003 crate[4387]: [2021-10-01T10:18:08,104][INFO ][o.e.c.s.ClusterApplierService] [crate-dn-003] master node changed {previous [], current [{crate-dn-003}{tP
Oct 01 10:18:08 crate-dn-003 crate[4387]: [2021-10-01T10:18:08,115][INFO ][o.e.n.Node ] [crate-dn-003] started
As far as I can see, it seems like each node is selecting itself as the master, is that correct? If so, then why?
Also, on Node 001, I try to connect with crash
, but unfortunately:
administrator@crate-dn-001:~$ source /home/administrator/venv/cratedb/bin/activate
(cratedb) administrator@crate-dn-001:~$ crash
CONNECT ERROR
(cratedb) administrator@crate-dn-001:~$ crash --verbose
+-----------------------+-----------+---------+-----------+---------------------------------------+
| server_url | node_name | version | connected | message |
+-----------------------+-----------+---------+-----------+---------------------------------------+
| http://localhost:4200 | NULL | 0.0.0 | FALSE | 503 Server Error: Service Unavailable |
+-----------------------+-----------+---------+-----------+---------------------------------------+
CONNECT ERROR
Any ideas why crash
stopped being able to connect locally?
And is the cluster formed correctly with 3 nodes?
Am I missing some configuration settings?