Instalação multinode Cassandra, Não é possível abrir o arquivo /var/log/cassandra/gc.log devido à Permissão negada

1

Eu quero instalar o Cassandra em 4 nós remotos. Tudo funciona bem até eu chegar ao ponto quando eu verificar o status

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

Configurei corretamente o listen_address para 192.68.0.25 e sementes para 192.69.0.13

Eu tenho o mesmo no outro nó

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

Isto é o que eu tenho quando eu executo o cassandra a partir do shell de comando

    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

Na verdade eu não tenho gc.log.Este é o conteúdo da pasta

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

e

/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
    
por MikiBelavista 25.01.2018 / 17:35

1 resposta

3

Certifique-se de que seu formato de arquivo / etc / hosts seja válido, como

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

E não há material localhost.localdomain.

em cassandra.yaml defina estas duas opções:

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
    
por 25.01.2018 / 17:51