AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 894110
Accepted
MikiBelavista
MikiBelavista
Asked: 2018-01-26 08:35:58 +0800 CST2018-01-26 08:35:58 +0800 CST 2018-01-26 08:35:58 +0800 CST

Cassandra多节点安装,由于权限被拒绝而无法打开文件/var/log/cassandra/gc.log

  • 772

我想在 4 个远程节点上安装 Cassandra。一切正常,直到我检查状态时指出

nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens       Owns (effective)  Host ID                               Rack
UN  127.0.0.1  103.68 KiB  256          100.0%            4e03d80f-5972-4bc7-b36d-6e536ebfa808  rack1

我已将 listen_address 正确设置为 192.68.0.25 并将种子设置为 192.69.0.13

我在另一个节点上也一样

Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens       Owns (effective)  Host ID                               Rack
UN  127.0.0.1  103.64 KiB  256          100.0%            c7ad74b0-9fa1-4068-a2f8-24e45523b731  rack1

这是我从命令 shell 运行 cassandra 时得到的

    OpenJDK 64-Bit Server VM warning: Cannot open file /var/log/cassandra/gc.log due to Permission denied

18:06:55,305 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.cassandra] to DEBUG
18:06:55,305 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.thinkaurelius.thrift] to ERROR
18:06:55,305 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
18:06:55,305 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6ea12c19 - Registering current configuration as safe fallback point

INFO  [main] 2018-01-25 18:06:55,399 YamlConfigurationLoader.java:89 - Configuration location: file:/etc/cassandra/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/etc/cassandra/cassandra.yaml
 Error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=seed_provider for JavaBean=org.apache.cassandra.config.Config@3d36e4cd; java.lang.reflect.InvocationTargetException;  in 'reader', line 10, column 1:
    cluster_name: 'Test Cluster'
    ^
Invalid yaml: file:/etc/cassandra/cassandra.yaml

其实我没有gc.log。这是文件夹的内容

/var/log/cassandra$ ls *.log
debug.log  system.log

和

/var/log$ ls -lia cassandra/
total 284
8389155 drwxr-xr-x  2 cassandra cassandra   4096 jan.  25 15:50 .
8257787 drwxrwxr-x 14 root      syslog      4096 jan.  25 15:49 ..
8389157 -rw-r--r--  1 cassandra cassandra 178071 jan.  25 17:50 debug.log
8389086 -rw-r--r--  1 cassandra cassandra  53037 jan.  25 18:16 gc.log.0.current
8389150 -rw-r--r--  1 cassandra cassandra  41003 jan.  25 17:50 system.log
remote-access
  • 1 1 个回答
  • 751 Views

1 个回答

  • Voted
  1. Best Answer
    Gabor Vincze
    2018-01-26T08:51:57+08:002018-01-26T08:51:57+08:00

    确保您的 /etc/hosts 文件格式有效,例如

    root@my-cass1-1:~# cat /etc/hosts | egrep -v "^#|::"
    127.0.0.1 localhost
    192.168.xxx.13 my-cass1-1.int.xxxxxxxxx.tld my-cass1-1
    

    而且里面没有 localhost.localdomain 的东西。

    在 cassandra.yaml 中设置这两个选项:

    root@my-cass1-1:~# cat /etc/cassandra/cassandra.yaml | grep 192.168
              - seeds: "192.168.xxx.111,192.168.xxx.112,192.168.xxx.13,192.168.xxx.10"
    listen_address: 192.168.xxx.13
    broadcast_rpc_address: 192.168.xxx.13
    
    • 3

相关问题

  • 你最喜欢的票务系统是什么?[关闭]

  • 为什么 Tramp 在向远程主机发送 Perl 脚本时会挂起?

  • 您为承包商/非员工处理 vpn 访问的方法是什么

  • 使用 PerfMon 连接到远程计算机

  • IP-KVM(在我的例子中是 ADDER Ipeps):轻松防火墙穿越

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve