[Cassandra] unauthorized error from server code=2100 unauthorized 해결
카산드라를 압축 해제하는 형태로 리눅스에 설치해서 실행을 시키고 접속을 하는 과정중에 계정 생성도, 계정 조회도 안되는 문제를 발견할 수 있었습니다.
접속한 계정은 초기 계정인 cassandra/cassandra입니다.
아니... 초기 설정 그대로 사용한 거고, 초기 계정 그대로 사용했는데 권한 문제가 생기는게 말이 돼!? 그냥 apt-get install cassandra 같은 패키지 형태로 받을 걸 그랬나...하고 고민하다가 구글 좀 뒤져봤는데 해결 방법이 있더군요.
1) 카산드라설치폴더/bin/cassandra.yaml 파일을 열어줍니다.
2) authenticator: AllowAllAuthenticator를 PasswordAuthenticator로 변경해줍니다.
끝입니다.
이제 카산드라를 재실행하고 초기 계정인 cassandra/cassandra로 로그인 하고 list users;로 확인해보면
잘 나옵니다!
https://cassandra.apache.org/doc/latest/cassandra/operating/security.html#authentication
Security | Apache Cassandra Documentation
Enabling authentication and authorization places additional load on the cluster by frequently reading from the system_auth tables. Furthermore, these reads are in the critical paths of many client operations, and so has the potential to severely impact qua
cassandra.apache.org
여기 카산드라 다큐먼트 문서를 참고했습니다.
다른 이야기지만 처음에 에러가 발생했을 당시 저 옵션을 변경하라고 해서 변경해서 실행해봤는데 실행이 안됐습니다.
뭐지??? 싶었는데 알고보니... 제가 authorizer와 authenticator 항목을 헷갈리게 잘못 입력했더라구요...ㅋㅋㅋ 멍청....
문서 크기가 크니까 텍스트 뷰어로 열고 Ctrl+F로 찾는 편이 빠릅니다!
'Database > NoSQL' 카테고리의 다른 글
[NoSQL] Cassandra(카산드라) 설치 방법 (tar.gz) (0) | 2021.11.17 |
---|