简体   繁体   English

Maxscale:在 maxscale.cnf 中设置 admin_ssl 参数时出现 maxctrl 错误

[英]Maxscale: maxctrl error when admin_ssl parameters are set in maxscale.cnf

System:系统:

  • Maxscale 2.5.9 Maxscale 2.5.9
  • Ubuntu 20.04 Ubuntu 20.04

In order to access the Web AdminGUI my maxsclale.cnf file looks like this:为了访问 Web AdminGUI,我的 maxsclale.cnf 文件如下所示:

[maxscale]
threads=auto
admin_host=0.0.0.0
admin_secure_gui=1
admin_auth=1
admin_enabled=1
admin_gui=1
admin_ssl_key=/etc/ssl/certs/maxscale-key.pem
admin_ssl_cert=/etc/ssl/certs/maxscale-cert.pem
admin_ssl_ca_cert=/etc/ssl/certs/ca-certificates.crt

[...all other configuration..]

With this configuration I can access the Web-AdminGUI on port 8989 from the internal ip address (not 127.0.0.1) by browser.使用此配置,我可以通过浏览器从内部 ip 地址(不是 127.0.0.1)访问端口 8989 上的 Web-AdminGUI。 The SSL key/certs are self-signed. SSL 密钥/证书是自签名的。

BUT When using the command line like:但是当使用命令行时:

maxctrl list servers

I get the following error:我收到以下错误:

Error: Error: socket hang up

When I remove or comment out the lines with the admin_ssl_XXX parameters and restart maxscale, command line works again, but of course the Web-AdminGUI does not.当我删除或注释掉带有admin_ssl_XXX参数的行并重新启动 maxscale 时,命令行再次工作,但当然 Web-AdminGUI 不能。

I tried with various SSL certificate creations (also the one that is listed on the mariadb.com-Website https://mariadb.com/docs/security/encryption/in-transit/create-self-signed-certificates-keys-openssl/#create-self-signed-certificates-keys-openssl ), the issue remains.我尝试使用各种 SSL 证书创建(也是 mariadb.com-网站https:// mariadb-key/s-open-docs/security/encryption /#create-self-signed-certificates-keys-openssl ),问题仍然存在。

No errors in the maxscale.log whatsoever. maxscale.log 中没有任何错误。

What is the best way to debug this issue?调试此问题的最佳方法是什么? Or do you have by any chance the right answer at hand?或者你手头有正确的答案吗?

YOUR help is greatly appreciated!非常感谢您的帮助!

BR. BR。 Martin马丁

You should use maxctrl --secure to encrypt the connections used by it.您应该使用maxctrl --secure来加密它使用的连接。

Since you are using self-signed certificates, you have to also specify the CA certificate with --tls-ca-cert=/etc/ssl/certs/ca-certificates.crt if it's not installed in the system certificate store.由于您使用的是自签名证书,因此如果系统证书存储中未安装 CA 证书,则还必须使用--tls-ca-cert=/etc/ssl/certs/ca-certificates.crt指定它。

In addition, you probably need to use --tls-verify-server-cert=false to disable any warnings about self-signed certificates.此外,您可能需要使用--tls-verify-server-cert=false来禁用有关自签名证书的任何警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM