Comments - MySQL Cluster setup and MaxScale configuration

7 years, 2 months ago Nguyen Tuan Duc

Pls help me for the error "Unable to connect to MaxScale at /tmp/maxadmin.sock" <<code>>]# ./maxscale -c ../ Info : MaxScale will be run in the terminal process. Configuration file : /etc/maxscale.cnf Log directory : /var/log/maxscale Data directory : /var/lib/maxscale Module directory : /usr/lib64/maxscale Service cache : /var/cache/maxscale

2017-02-07 14:45:21 notice : MariaDB MaxScale 2.0.4 started 2017-02-07 14:45:21 notice : MaxScale is running in process 3351 2017-02-07 14:45:21 notice : Configuration file: /etc/maxscale.cnf 2017-02-07 14:45:21 notice : Log directory: /var/log/maxscale 2017-02-07 14:45:21 notice : Data directory: /var/lib/maxscale 2017-02-07 14:45:21 notice : Module directory: /usr/lib64/maxscale 2017-02-07 14:45:21 notice : Service cache: /var/cache/maxscale 2017-02-07 14:45:21 notice : Initialise readconnroute router module V1.1.0. 2017-02-07 14:45:21 notice : Loaded module readconnroute: V1.1.0 from /usr/lib64/maxscale/libreadconnroute.so 2017-02-07 14:45:21 notice : Initialise the MySQL Cluster Monitor module V2.1.0. 2017-02-07 14:45:21 notice : Loaded module ndbclustermon: V2.1.0 from /usr/lib64/maxscale/libndbclustermon.so 2017-02-07 14:45:21 notice : No query classifier specified, using default 'qc_sqlite'. 2017-02-07 14:45:21 notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib64/maxscale/libqc_sqlite.so 2017-02-07 14:45:21 notice : Configuration was successfully verified.

  1. maxadmin Unable to connect to MaxScale at /tmp/maxadmin.sock: No such file or directory<</code>>
 
7 years, 2 months ago Markus Mäkelä

MaxScale 2.0 introduced UNIX domain sockets for MaxAdmin as the default method of connecting. Instead of using port=6603 you can use socket=default to configure the cli service to create a socket instead of a network port. For more details, refer to the MaxAdmin documentation.

You can use the network interface by defining at least one network option for maxadmin: maxadmin -P 6603 -p

 
7 years, 2 months ago Nguyen Tuan Duc

This is my maxscale config:

# cat /etc/maxscale.cnf
[Cluster Service]
type=service
router=readconnroute
router_options=ndb
servers=server1,server2
user=test
passwd=test
version_string=5.6.28-CLUSTER

[Cluster Listener]
type=listener
service=Cluster Service
protocol=MySQLClient
port=4906

[NDB Cluster Monitor]
type=monitor
module=ndbclustermon
servers=server1,server2
user=monitor
passwd=monitor
monitor_interval=8000

[server1]

#SQL node1
type=server
address=127.0.0.1
port=3306
protocol=MySQLBackend

[server2]
#SQL node2
type=server
address=192.168.84.86
port=3306
protocol=MySQLBackend

[MaxAdmin]
type=service
router=cli

[MaxAdmin Unix Listener]
type=listener
service=MaxAdmin
protocol=maxscaled
socket=default
 

But it is still error:

# maxadmin
Unable to connect to MaxScale at /tmp/maxadmin.sock: No such file or directory
 
 
7 years, 2 months ago Markus Mäkelä

Check the error logs for any errors that could explain why the socket file was not created. If a simple restart of MaxScale doesn't fix it, I'd recommend filing a bug at jira.mariadb.org.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.