官方网站:https://crate.io ,存储库:https://github.com/crate/crate
-
拉取镜像
aaa@kylin-pc:~/桌面 sudo docker pull docker.1ms.run/crate/crate 输入密码 Using default tag: latest Error response from daemon: no matching manifest for linux/arm64/v8 in the manifest list entries: no match for platform in manifest: not found aaa@kylin-pc:~/桌面 sudo docker pull docker.1ms.run/crate
Using default tag: latest
latest: Pulling from crate
b5c19ec6771d: Pull complete
c77638d5af0c: Pull complete
cddd466f939c: Pull complete
fa64a45453b8: Pull complete
ceb5261e92a2: Pull complete
4f4fb700ef54: Pull complete
072f0818ab95: Pull complete
cfb9966dd80a: Pull complete
4f9b6226a425: Pull complete
f4824ec79e89: Download complete
83daa76baf09: Download complete
Digest: sha256:36cb3767c2403ddc7fff864e4a61d296f0168347ee5c985c174b4a1ad9f91249
Status: Downloaded newer image for docker.1ms.run/crate:latest
docker.1ms.run/crate:latest
按文档说明运行容器,有报错信息。
aaa@kylin-pc:~/桌面$ sudo docker run --publish 4200:4200 --publish 5432:5432 --env CRATE_HEAP_SIZE=1g docker.1ms.run/crate '-Cdiscovery.type=single-node'
WARNING: Using incubator modules: jdk.incubator.vector
[2026-03-19T05:45:15,272][INFO ][o.e.e.NodeEnvironment ] [Cima di Ball] using [1] data paths, mounts [[/data (/dev/sdd6)]], net usable_space [165.7gb], net total_space [199.2gb], types [ext4]
[2026-03-19T05:45:15,275][INFO ][o.e.e.NodeEnvironment ] [Cima di Ball] heap size [1gb], compressed ordinary object pointers [true]
[2026-03-19T05:45:15,303][INFO ][o.e.n.Node ] [Cima di Ball] node name [Cima di Ball], node ID [6prAe901ReayvAjmwICf0Q], cluster name [crate]
[2026-03-19T05:45:15,305][INFO ][o.e.n.Node ] [Cima di Ball] version[6.2.2], pid[1], build[67e250c/NA], OS[Linux/5.10.97-29-9000c/aarch64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/25.0.2+10-LTS]
[2026-03-19T05:45:15,493][INFO ][o.e.p.PluginsService ] [Cima di Ball] loaded plugin [org.elasticsearch.discovery.ec2.Ec2DiscoveryPlugin]
[2026-03-19T05:45:15,494][INFO ][o.e.p.PluginsService ] [Cima di Ball] loaded plugin [org.elasticsearch.plugin.repository.url.URLRepositoryPlugin]
[2026-03-19T05:45:15,494][INFO ][o.e.p.PluginsService ] [Cima di Ball] loaded plugin [org.elasticsearch.repositories.s3.S3RepositoryPlugin]
Mar 19, 2026 5:45:15 AM org.apache.lucene.internal.vectorization.PanamaVectorizationProvider <init>
INFO: Java vector incubator API enabled; uses preferredBitSize=128; FMA enabled
[2026-03-19T05:45:17,443][INFO ][o.e.d.DiscoveryModule ] [Cima di Ball] using discovery type [single-node] and seed hosts providers [settings]
[2026-03-19T05:45:18,145][INFO ][psql ] [Cima di Ball] PSQL SSL support is disabled.
[2026-03-19T05:45:18,363][WARN ][o.e.g.DanglingIndicesState] [Cima di Ball] gateway.auto_import_dangling_indices is disabled, dangling indices will not be detected or imported
[2026-03-19T05:45:18,460][INFO ][o.e.n.Node ] [Cima di Ball] initialized
[2026-03-19T05:45:18,460][INFO ][o.e.n.Node ] [Cima di Ball] starting ...
[2026-03-19T05:45:18,481][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [Cima di Ball] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: No up-and-running site-local (private) addresses found, got [name:lo (lo), name:eth0 (eth0)]
at org.elasticsearch.bootstrap.StartupExceptionProxy.<init>(StartupExceptionProxy.java:30)
at io.crate.bootstrap.CrateDB.execute(CrateDB.java:117)
at io.crate.server.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:87)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:120)
at org.elasticsearch.cli.Command.main(Command.java:86)
at io.crate.bootstrap.CrateDB.main(CrateDB.java:72)
Caused by: java.lang.IllegalArgumentException: No up-and-running site-local (private) addresses found, got [name:lo (lo), name:eth0 (eth0)]
at org.elasticsearch.common.network.NetworkUtils.getSiteLocalAddresses(NetworkUtils.java:186)
at org.elasticsearch.common.network.NetworkService.resolveInternal(NetworkService.java:214)
at org.elasticsearch.common.network.NetworkService.resolveInetAddresses(NetworkService.java:188)
at org.elasticsearch.common.network.NetworkService.resolveBindHostAddresses(NetworkService.java:108)
at io.crate.protocols.postgres.PostgresNetty.resolveBindAddress(PostgresNetty.java:238)
at io.crate.protocols.postgres.PostgresNetty.doStart(PostgresNetty.java:203)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:60)
at org.elasticsearch.node.Node.start(Node.java:983)
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:169)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:207)
at io.crate.bootstrap.CrateDB.execute(CrateDB.java:113)
... 4 more
登录python容器,按照文档提示,用pip安装crash客户端,用各种ip地址登录都失败。
aaa@kylin-pc:~/桌面$ sudo docker exec -it python bash
输入密码
root@kylin-pc:/# pip install crash
...
Installing collected packages: wcwidth, verlib2, urllib3, tabulate, sqlparse, Pygments, platformdirs, orjson, colorama, prompt-toolkit, crate, crash
Successfully installed Pygments-2.19.2 colorama-0.4.6 crash-0.32.0 crate-2.1.2 orjson-3.11.7 platformdirs-4.9.4 prompt-toolkit-3.0.52 sqlparse-0.5.5 tabulate-0.9.0 urllib3-2.6.3 verlib2-0.3.1 wcwidth-0.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
[notice] A new release of pip is available: 25.3 -> 26.0.1
[notice] To update, run: pip install --upgrade pip
root@kylin-pc:/# crash
CONNECT ERROR
root@kylin-pc:/# crash --host "127.0.0.1"
CONNECT ERROR
root@kylin-pc:/# crash --host "0.0.0.0"
CONNECT ERROR
root@kylin-pc:/#
停止crate服务器,重新用--network host参数运行,直接退出 。用docker logs检查发现初始化有内存不足错误。
aaa@kylin-pc:~/桌面$ sudo docker run -itd --network host -v /home/aaa/par:/par --name crate docker.1ms.run/crate
输入密码
06d4a5ba86ec74f4d76cb6173131de5fd7682b206825dc1213d70a6f50ec5181
aaa@kylin-pc:~/桌面$ sudo docker exec -it crate bash
Error response from daemon: container 06d4a5ba86ec74f4d76cb6173131de5fd7682b206825dc1213d70a6f50ec5181 is not running
aaa@kylin-pc:~/桌面$ sudo docker logs crate
WARNING: Using incubator modules: jdk.incubator.vector
[2026-03-19T06:04:03,181][INFO ][o.e.e.NodeEnvironment ] [Monte Ruvi] using [1] data paths, mounts [[/data (/dev/sdd6)]], net usable_space [165.7gb], net total_space [199.2gb], types [ext4]
[2026-03-19T06:04:03,183][INFO ][o.e.e.NodeEnvironment ] [Monte Ruvi] heap size [512mb], compressed ordinary object pointers [true]
[2026-03-19T06:04:03,210][INFO ][o.e.n.Node ] [Monte Ruvi] node name [Monte Ruvi], node ID [xRSLbr9fTbmw7I8rYWUAEw], cluster name [crate]
[2026-03-19T06:04:03,213][INFO ][o.e.n.Node ] [Monte Ruvi] version[6.2.2], pid[1], build[67e250c/NA], OS[Linux/5.10.97-29-9000c/aarch64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/25.0.2+10-LTS]
[2026-03-19T06:04:03,392][INFO ][o.e.p.PluginsService ] [Monte Ruvi] loaded plugin [org.elasticsearch.discovery.ec2.Ec2DiscoveryPlugin]
[2026-03-19T06:04:03,392][INFO ][o.e.p.PluginsService ] [Monte Ruvi] loaded plugin [org.elasticsearch.plugin.repository.url.URLRepositoryPlugin]
[2026-03-19T06:04:03,392][INFO ][o.e.p.PluginsService ] [Monte Ruvi] loaded plugin [org.elasticsearch.repositories.s3.S3RepositoryPlugin]
Mar 19, 2026 6:04:03 AM org.apache.lucene.internal.vectorization.PanamaVectorizationProvider <init>
INFO: Java vector incubator API enabled; uses preferredBitSize=128; FMA enabled
[2026-03-19T06:04:05,346][INFO ][o.e.d.DiscoveryModule ] [Monte Ruvi] using discovery type [zen] and seed hosts providers [settings]
[2026-03-19T06:04:06,016][INFO ][psql ] [Monte Ruvi] PSQL SSL support is disabled.
[2026-03-19T06:04:06,208][WARN ][o.e.g.DanglingIndicesState] [Monte Ruvi] gateway.auto_import_dangling_indices is disabled, dangling indices will not be detected or imported
[2026-03-19T06:04:06,291][INFO ][o.e.n.Node ] [Monte Ruvi] initialized
[2026-03-19T06:04:06,291][INFO ][o.e.n.Node ] [Monte Ruvi] starting ...
[2026-03-19T06:04:06,356][INFO ][psql ] [Monte Ruvi] publish_address {a.a.a.a:5432}, bound_addresses {[::1]:5432}, {127.0.0.1:5432}, {a.a.a.a:5432}
[2026-03-19T06:04:06,365][INFO ][o.e.h.n.Netty4HttpServerTransport] [Monte Ruvi] publish_address {a.a.a.a:4200}, bound_addresses {[::1]:4200}, {127.0.0.1:4200}, {a.a.a.a:4200}
[2026-03-19T06:04:06,374][INFO ][o.e.t.TransportService ] [Monte Ruvi] publish_address {a.a.a.a:4300}, bound_addresses {[::1]:4300}, {127.0.0.1:4300}, {a.a.a.a:4300}
[2026-03-19T06:04:06,459][INFO ][o.e.b.BootstrapChecks ] [Monte Ruvi] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] by adding `vm.max_map_count = 262144` to `/etc/sysctl.conf` or invoking `sysctl -w vm.max_map_count=262144`
[2026-03-19T06:04:06,472][INFO ][o.e.n.Node ] [Monte Ruvi] stopping ...
[2026-03-19T06:04:06,480][INFO ][o.e.n.Node ] [Monte Ruvi] stopped
[2026-03-19T06:04:06,480][INFO ][o.e.n.Node ] [Monte Ruvi] closing ...
[2026-03-19T06:04:06,503][INFO ][o.e.n.Node ] [Monte Ruvi] closed
重新用文档中已有的参数加--network host参数,成功运行了服务器端。
aaa@kylin-pc:~/桌面$ sudo docker rm crate
crate
aaa@kylin-pc:~/桌面$ sudo docker run -itd --network host -v /home/aaa/par:/par --env CRATE_HEAP_SIZE=1g --name crate docker.1ms.run/crate '-Cdiscovery.type=single-node'
3e7afa85032c3b41528a3d27dd5c92c0886ac57567eca963266fc0589dcedb1e
aaa@kylin-pc:~/桌面$ sudo docker logs crate
WARNING: Using incubator modules: jdk.incubator.vector
[2026-03-19T06:09:53,903][INFO ][o.e.e.NodeEnvironment ] [Hohe Weiße] using [1] data paths, mounts [[/data (/dev/sdd6)]], net usable_space [165.7gb], net total_space [199.2gb], types [ext4]
[2026-03-19T06:09:53,905][INFO ][o.e.e.NodeEnvironment ] [Hohe Weiße] heap size [1gb], compressed ordinary object pointers [true]
[2026-03-19T06:09:53,932][INFO ][o.e.n.Node ] [Hohe Weiße] node name [Hohe Weiße], node ID [UJAd7OHvQQ6fM2NNuk3wdQ], cluster name [crate]
[2026-03-19T06:09:53,935][INFO ][o.e.n.Node ] [Hohe Weiße] version[6.2.2], pid[1], build[67e250c/NA], OS[Linux/5.10.97-29-9000c/aarch64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/25.0.2+10-LTS]
[2026-03-19T06:09:54,113][INFO ][o.e.p.PluginsService ] [Hohe Weiße] loaded plugin [org.elasticsearch.discovery.ec2.Ec2DiscoveryPlugin]
[2026-03-19T06:09:54,113][INFO ][o.e.p.PluginsService ] [Hohe Weiße] loaded plugin [org.elasticsearch.plugin.repository.url.URLRepositoryPlugin]
[2026-03-19T06:09:54,113][INFO ][o.e.p.PluginsService ] [Hohe Weiße] loaded plugin [org.elasticsearch.repositories.s3.S3RepositoryPlugin]
Mar 19, 2026 6:09:54 AM org.apache.lucene.internal.vectorization.PanamaVectorizationProvider <init>
INFO: Java vector incubator API enabled; uses preferredBitSize=128; FMA enabled
[2026-03-19T06:09:56,039][INFO ][o.e.d.DiscoveryModule ] [Hohe Weiße] using discovery type [single-node] and seed hosts providers [settings]
[2026-03-19T06:09:56,689][INFO ][psql ] [Hohe Weiße] PSQL SSL support is disabled.
[2026-03-19T06:09:56,891][WARN ][o.e.g.DanglingIndicesState] [Hohe Weiße] gateway.auto_import_dangling_indices is disabled, dangling indices will not be detected or imported
[2026-03-19T06:09:56,974][INFO ][o.e.n.Node ] [Hohe Weiße] initialized
[2026-03-19T06:09:56,974][INFO ][o.e.n.Node ] [Hohe Weiße] starting ...
[2026-03-19T06:09:57,040][INFO ][psql ] [Hohe Weiße] publish_address {a.a.a.a:5432}, bound_addresses {[::1]:5432}, {127.0.0.1:5432}, {a.a.a.a:5432}
[2026-03-19T06:09:57,047][INFO ][o.e.h.n.Netty4HttpServerTransport] [Hohe Weiße] publish_address {a.a.a.a:4200}, bound_addresses {[::1]:4200}, {127.0.0.1:4200}, {a.a.a.a:4200}
[2026-03-19T06:09:57,057][INFO ][o.e.t.TransportService ] [Hohe Weiße] publish_address {a.a.a.a:4300}, bound_addresses {[::1]:4300}, {127.0.0.1:4300}, {a.a.a.a:4300}
[2026-03-19T06:09:57,156][WARN ][o.e.b.BootstrapChecks ] [Hohe Weiße] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] by adding `vm.max_map_count = 262144` to `/etc/sysctl.conf` or invoking `sysctl -w vm.max_map_count=262144`
[2026-03-19T06:09:57,162][INFO ][o.e.c.c.Coordinator ] [Hohe Weiße] setting initial configuration to VotingConfiguration{UJAd7OHvQQ6fM2NNuk3wdQ}
[2026-03-19T06:09:57,283][INFO ][o.e.c.s.MasterService ] [Hohe Weiße] elected-as-master ([1] nodes joined)[{Hohe Weiße}{UJAd7OHvQQ6fM2NNuk3wdQ}{CCTWpttmTB-8sRt4rd2N6g}{a.a.a.a}{a.a.a.a:4300}{dm}{http_address=a.a.a.a:4200} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 1, version: 1, reason: master node changed {previous [], current [{Hohe Weiße}{UJAd7OHvQQ6fM2NNuk3wdQ}{CCTWpttmTB-8sRt4rd2N6g}{a.a.a.a}{a.a.a.a:4300}{dm}{http_address=a.a.a.a:4200}]}
[2026-03-19T06:09:57,312][INFO ][o.e.c.c.CoordinationState] [Hohe Weiße] cluster UUID set to [wppSGPB2R0GVZLdEOdfGUA]
[2026-03-19T06:09:57,329][INFO ][o.e.c.s.ClusterApplierService] [Hohe Weiße] master node changed {previous [], current [{Hohe Weiße}{UJAd7OHvQQ6fM2NNuk3wdQ}{CCTWpttmTB-8sRt4rd2N6g}{a.a.a.a}{a.a.a.a:4300}{dm}{http_address=a.a.a.a:4200}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
[2026-03-19T06:09:57,337][INFO ][o.e.n.Node ] [Hohe Weiße] started
[2026-03-19T06:09:57,354][INFO ][o.e.g.GatewayService ] [Hohe Weiße] recovered [0] indices into cluster_state
再用crash登录127.0.0.1就成功了。建10000000行的表并查询,分别用了31秒和1秒,不算很快。
root@kylin-pc:/# crash --host "127.0.0.1"
CONNECT OK
cr> show tables;
+------------+
| table_name |
+------------+
+------------+
SHOW 0 rows in set (0.048 sec)
cr> create table t as select i%2 a,i%7 b,i%11 c from generate_series(1,10000000)t(i);
CREATE OK, 10000000 rows affected (31.223 sec)
cr> select count(*) from t group by a;
+---------+
| count |
+---------+
| 5000000 |
| 5000000 |
+---------+
SELECT 2 rows in set (1.401 sec)
其实crate容器中也包含crash客户端。