我在 centos7 和 vmware 上安装了 cassandra 3.11.3-1
我在安装 cassandra 时没有出错。我启动了 cassandra 并面对这些日志。
[root@localhost ~]# service cassandra start
Starting cassandra (via systemctl): [ OK ]
[root@localhost ~]# systemctl status cassandra
cassandra.service - LSB: distributed storage system for structured data
Loaded: loaded (/etc/rc.d/init.d/cassandra; bad; vendor preset: disabled)
Active: deactivating (stop) (Result: exit-code) since 2018-08-02 15:15:45
KST; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 10366 ExecStart=/etc/rc.d/init.d/cassandra start (code=exited,
status=0/SUCCESS)
Main PID: 10450 (code=exited, status=3); : 10478 (cassandra)
Tasks: 2
CGroup: /system.slice/cassandra.service
└─control
├─10478 /bin/bash /etc/rc.d/init.d/cassandra stop
└─10549 sleep 0.5
02 15:15:39 localhost.localdomain systemd[1]: Starting LSB: distributed
stora....
02 15:15:39 localhost.localdomain su[10376]: (to cassandra) root on none
02 15:15:41 localhost.localdomain cassandra[10366]: Starting Cassandra: OK
02 15:15:41 localhost.localdomain systemd[1]: Started LSB: distributed
storag....
02 15:15:45 localhost.localdomain systemd[1]: cassandra.service: main
process...D
02 15:15:45 localhost.localdomain su[10489]: (to cassandra) root on none
02 15:15:45 localhost.localdomain cassandra[10478]: Shutdown Cassandra:
bash: …
Hint: Some lines were ellipsized, use -l to show in full.
这意味着“cassandra 启动没问题”对吗?但是当我像这样“nodetool status”检查节点状态时
然后我遇到了这个日志。
"] nodetool status"
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException:
Connection refused)
所以我在谷歌上搜索了很多。我找到了一些信息。所以我尝试了这个。
- 编辑 cassandra-env.sh "JVM_OPTS -Djava.rmi.server.hostname=127.0.0.1"
- 扩展内存大小:1GB -> 2GB
但我仍然面临同样的错误。
请有人帮助我。
------------- 系统日志 ----------------------------------
INFO [main] 2018-08-02 15:15:44,866 YamlConfigurationLoader.java:89 - 配置位置:文件:/etc/cassandra/default.conf/cassandra.yaml
错误 [main] 2018-08-02 15:15:45,043 CassandraDaemon.java:708 - 启动期间遇到异常:无效 yaml:文件:/etc/cassandra/default.conf/cassandra.yaml 错误:扫描简单密钥时;找不到预期的“:”;在“阅读器”第 601 行第 1 列中: