[英]Can't start mariadb MaxScale service on Ubuntu
I'm running Ubuntu 16.04 with mariadb, 我正在使用mariadb运行Ubuntu 16.04,
And I've downloaded maxscale on the official website, installed, 而且我已经在官方网站上下载了maxscale,并进行了安装,
https://downloads.mariadb.com/MaxScale/2.0.4/ubuntu/dists/xenial/main/binary-amd64/maxscale-2.0.4-1.ubuntu.xenial.x86_64.deb
https://downloads.mariadb.com/MaxScale/2.0.4/ubuntu/dists/xenial/main/binary-amd64/maxscale-2.0.4-1.ubuntu.xenial.x86_64.deb
And now I can't start the service, not so helpful 现在我无法启动服务,不是那么有用
2017-02-28 11:41:11 notice : Working directory: /var/log/maxscale
2017-02-28 11:41:11 notice : MariaDB MaxScale 2.0.4 started
2017-02-28 11:41:11 notice : MaxScale is running in process 21493
2017-02-28 11:41:11 notice : Configuration file: /etc/maxscale.cnf
2017-02-28 11:41:11 notice : Log directory: /var/log/maxscale
2017-02-28 11:41:11 notice : Data directory: /var/lib/maxscale
2017-02-28 11:41:11 notice : Module directory: /usr/lib/x86_64-linux-gnu/maxscale
2017-02-28 11:41:11 notice : Service cache: /var/cache/maxscale
2017-02-28 11:41:11 notice : No query classifier specified, using default 'qc_sqlite'.
2017-02-28 11:41:11 notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib/x86_64-linux-gnu/maxscale/libqc_sqlite.so
2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting.
2017-02-28 11:41:11 MaxScale is shut down.
/etc/maxscale.cnf /etc/maxscale.cnf
[maxscale]
threads=1
[server1]
type=server
address=127.0.0.1
port=3306
protocol=MySQLBackend
Any ideas? 有任何想法吗?
The reason why it fails to start is because you didn't define a service. 它无法启动的原因是因为您没有定义服务。 Although this is explained in the error message, it's not quite easy to interpret:
2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting.
尽管错误消息中对此进行了解释,但它并不是很容易
2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting.
: 2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting.
2017-02-28 11:41:11 error : Failed to start all MaxScale services. Exiting.
Try adding the following three objects into your configuration: 尝试将以下三个对象添加到您的配置中:
[Read-Connection-Router]
type=service
router=readconnroute
servers=server1
user=maxuser
passwd=maxpwd
[Read-Connection-Listener]
type=listener
service=Read-Connection-Router
protocol=MySQLClient
port=4008
[MySQL-Monitor]
type=monitor
module=mysqlmon
servers=server1
user=maxuser
passwd=maxpwd
monitor_interval=1000
The Read-Connection-Router
is the service that MaxScale provides. Read-Connection-Router
是MaxScale提供的服务。 The Read-Connection-Listener
is the network port where clients can connect and it links to the previously defined service. Read-Connection-Listener
是客户端可以连接的网络端口,它链接到先前定义的服务。 The last object, MySQL-Monitor
, is the database monitor which actively monitors the state of the database servers. 最后一个对象
MySQL-Monitor
是数据库监视器,它主动监视数据库服务器的状态。
The mysqlmon
module defined in the configuration is for the standard Master-Slave replication clusters. 配置中定义的
mysqlmon
模块适用于标准的主从复制集群。 If you're using Galera clusters, you'd want to use the galeramon
module. 如果您使用的是Galera群集,则需要使用
galeramon
模块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.