我設定了 redis 7 服務器以僅提供安全的 TLS 連接,并使用 redis-cli 驗證它是否正常作業。但是當我做redis-benchmark時,我得到了這個錯誤:
ERROR: failed to fetch CONFIG from 127.0.0.1:6379
WARNING: Could not fetch server CONFIG
我該如何解決這個錯誤?
uj5u.com熱心網友回復:
這個命令對我來說在唯一的 TLS Redis 服務器上作業正常。
./src/redis-benchmark --tls --cert ./tests/tls/redis.crt --key ./tests/tls/redis.key --cacert ./tests/tls/ca.crt
====== PING_INLINE ======
100000 requests completed in 1.76 seconds
50 parallel clients
...
Redis 服務器已啟動使用
./src/redis-server --tls-port 6379 --port 0 --tls-cert-file ./tests/tls/redis.crt --tls-key-file ./tests/tls/redis.key --tls-ca-cert-file ./tests/tls/ca.crt
已使用Redis TLS 檔案生成密鑰和證書
您可以檢查所有redis-benchmarktls 相關選項
./src/redis-benchmark --help
Usage: redis-benchmark [OPTIONS] [COMMAND ARGS...]
Options:
--tls Establish a secure TLS connection.
--cacert <file> CA Certificate file to verify with.
--cacertdir <dir> Directory where trusted CA certificates are stored.
If neither cacert nor cacertdir are specified, the default
system-wide trusted root certs configuration will apply.
--insecure Allow insecure TLS connection by skipping cert validation.
--cert <file> Client certificate to authenticate with.
--key <file> Private key file to authenticate with.
--tls-ciphers <list> Sets the list of preferred ciphers (TLSv1.2 and below)
in order of preference from highest to lowest separated by colon (":").
See the ciphers(1ssl) manpage for more information about the syntax of this string.
--tls-ciphersuites <list> Sets the list of preferred ciphersuites (TLSv1.3)
in order of preference from highest to lowest separated by colon (":").
See the ciphers(1ssl) manpage for more information about the syntax of this string,
and specifically for TLSv1.3 ciphersuites.
與 tls 無關的選項已被省略。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/515435.html
標籤:ssl雷迪斯TLS1.2
