![](/img/trans.png)
[英]Unsupported partitioner with Amazon Keyspaces (for Apache Cassandra)
[英]Which username and password should I use for Amazon Keyspaces (managed Cassandra)?
由於身份驗證錯誤,我無法使用 .NET Core 連接到 AWS Keyspaces:
AuthenticationException '提供的用戶名 nick 和/或密碼不正確')
我不確定應該給PlainTextAuthProvider
什么值。
我試過使用:
如何為 AWS Keyspaces 生成憑證?
我的代碼,如果它是相關的:
open System
open Cassandra
[<EntryPoint>]
let main argv =
async {
let cluster =
Cluster.Builder()
.AddContactPoints("cassandra.eu-west-2.amazonaws.com")
.WithPort(9142)
.WithAuthProvider(PlainTextAuthProvider ("username", "password123"))
.WithSSL()
.Build()
use! session =
cluster.ConnectAsync ()
|> Async.AwaitTask
()
}
|> Async.RunSynchronously
0
該選項位於IAM 部分。
導航至:
這將顯示一個彈出窗口,您可以在其中生成憑據。
此外,代碼應指定一個 Keyspace:
open System
open Cassandra
[<EntryPoint>]
let main argv =
async {
let cluster =
Cluster.Builder()
.AddContactPoints("cassandra.eu-west-2.amazonaws.com")
.WithPort(9142)
.WithAuthProvider(PlainTextAuthProvider ("username", "password123"))
.WithSSL()
.Build()
use! session =
cluster.ConnectAsync "test_keyspace"
|> Async.AwaitTask
()
}
|> Async.RunSynchronously
0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.