redis在使用redis基准测试时无法获得CONFIG



我设置了redis 7服务器,只提供安全的TLS连接,并使用redis cli验证了它是否正常工作。但当我做redis基准测试时,我会得到这个错误:

ERROR: failed to fetch CONFIG from 127.0.0.1:6379
WARNING: Could not fetch server CONFIG

如何修复此错误?

此命令在仅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无关的选项。

最新更新