Reputation: 23489
I'm running Ubuntu 16.04 with mariadb,
And I've downloaded maxscale on the official website, installed,
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
[maxscale]
threads=1
[server1]
type=server
address=127.0.0.1
port=3306
protocol=MySQLBackend
Any ideas?
Upvotes: 0
Views: 3365
Reputation: 2566
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.
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. The Read-Connection-Listener
is the network port where clients can connect and it links to the previously defined service. The last object, MySQL-Monitor
, is the database monitor which actively monitors the state of the database servers.
The mysqlmon
module defined in the configuration is for the standard Master-Slave replication clusters. If you're using Galera clusters, you'd want to use the galeramon
module.
Upvotes: 2