[MXS-1131] MySQL Cluster setup and MaxScale configuration: unable to connect maxadmin Created: 2017-02-08  Updated: 2017-03-15  Resolved: 2017-03-15

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: dic (Inactive) Assignee: markus makela
Resolution: Cannot Reproduce Votes: 0
Labels: None

Attachments: Text File maxscale1.log    

 Description   

Follow instruction at: https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-14/mysql-cluster-setup-and-maxscale-configuration/#comment_2746.

  1. 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

  1. ./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-08 15:11:46 notice : MariaDB MaxScale 2.0.4 started
2017-02-08 15:11:46 notice : MaxScale is running in process 3611
2017-02-08 15:11:46 notice : Configuration file: /etc/maxscale.cnf
2017-02-08 15:11:46 notice : Log directory: /var/log/maxscale
2017-02-08 15:11:46 notice : Data directory: /var/lib/maxscale
2017-02-08 15:11:46 notice : Module directory: /usr/lib64/maxscale
2017-02-08 15:11:46 notice : Service cache: /var/cache/maxscale
2017-02-08 15:11:46 notice : Initialise CLI router module V1.0.0.
2017-02-08 15:11:46 notice : Loaded module cli: V1.0.0 from /usr/lib64/maxscale/libcli.so
2017-02-08 15:11:46 notice : Initialise readconnroute router module V1.1.0.
2017-02-08 15:11:46 notice : Loaded module readconnroute: V1.1.0 from /usr/lib64/maxscale/libreadconnroute.so
2017-02-08 15:11:46 notice : Initialise the MySQL Cluster Monitor module V2.1.0.
2017-02-08 15:11:46 notice : Loaded module ndbclustermon: V2.1.0 from /usr/lib64/maxscale/libndbclustermon.so
2017-02-08 15:11:46 notice : No query classifier specified, using default 'qc_sqlite'.
2017-02-08 15:11:47 notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib64/maxscale/libqc_sqlite.so
2017-02-08 15:11:47 notice : Configuration was successfully verified.

Error:

  1. maxadmin
    Unable to connect to MaxScale at /tmp/maxadmin.sock: No such file or directory


 Comments   
Comment by markus makela [ 2017-02-08 ]

Can you upload the error logs located at /var/log/maxscale/? That way we should see whether the socket is created.

Which operating system are you using? If the OS uses systemd, does systemctl start maxscale work?

Comment by dic (Inactive) [ 2017-02-08 ]

There's nothing in maxscale log and ystemctl start maxscale doesn't work:
'# maxadmin
Unable to connect to MaxScale at /tmp/maxadmin.sock: No such file or directory
'# cat /var/log/maxscale/maxscale1.log
'# # hostnamectl
Static hostname: ITI-VN-83-VM
Icon name: computer-vm
Chassis: vm
Machine ID: be2c2eacf038495f8918c62646c14a39
Boot ID: a52146c3fc8a46c4b53c087f42704ffb
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.el7.x86_64
Architecture: x86-64
'# systemctl start maxscale
'#

Comment by markus makela [ 2017-02-08 ]

Could you try starting MaxScale with

sudo maxscale -d -U maxscale -lstdout

to see whether there are any errors when it starts?

Comment by dic (Inactive) [ 2017-02-08 ]

maxscale1.log
This is log when I excuted this command. Then I can login Maxadmin:
'# maxadmin
MaxScale> show monitors
Monitor: 0x10d7200
Name: NDB Cluster Monitor
Monitor running
Sampling interval: 8000 milliseconds
Connect Timeout: 3 seconds
Read Timeout: 1 seconds
Write Timeout: 2 seconds
Monitored servers: 127.0.0.1:3306, 192.168.84.86:3306
MaxScale> show servers
Server 0x10d61f0 (server1)
Server: 127.0.0.1
Status: NDB, Running
Protocol: MySQLBackend
Port: 3306
Server Version: 5.6.28-ndb-7.4.10-cluster-gpl
Node Id: 2
Master Id: -1
Slave Ids:
Repl Depth: 0
Number of connections: 0
Current no. of conns: 0
Current no. of operations: 0
Server 0x10d5cb0 (server2)
Server: 192.168.84.86
Status: NDB, Running
Protocol: MySQLBackend
Port: 3306
Server Version: 5.6.28-ndb-7.4.10-cluster-gpl
Node Id: 3
Master Id: -1
Slave Ids:
Repl Depth: 0
Number of connections: 0
Current no. of conns: 0
Current no. of operations: 0
MaxScale>

Comment by markus makela [ 2017-02-14 ]

Based on the log files, MaxScale seems to start OK until it is stopped by a SIGTERM. What does the following command output?

sudo systemctl start maxscale && sudo systemctl status maxscale

Comment by dic (Inactive) [ 2017-02-16 ]

This is my output:
'# systemctl start maxscale && sudo systemctl status maxscale
● maxscale.service - MariaDB MaxScale Database Proxy
Loaded: loaded (/usr/lib/systemd/system/maxscale.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2017-02-16 14:51:07 ICT; 41ms ago
Process: 3166 ExecStart=/usr/bin/maxscale --user=maxscale (code=exited, status=0/SUCCESS)
Process: 3164 ExecStartPre=/usr/bin/install -d /var/run/maxscale -o maxscale -g maxscale (code=exited, status=0/SUCCESS)
Main PID: 3168 (maxscale)
CGroup: /system.slice/maxscale.service
└─3168 /usr/bin/maxscale --user=maxscale

Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Loaded module qc_sqlite: V1.0.0 from /usr/lib64/maxscale/libqc_sqlite.so
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Encrypted password file /var/lib/maxscale/.secrets can't be accessed (No such file or directory). Password encryption is not used.
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Counting users for service Cluster Service returned 0.
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Unable to load users for service Cluster Service listening at 0.0.0.0:4906.
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Failed to start service Cluster Service, retrying in 10 seconds.
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Loaded module maxscaled: V2.0.0 from /usr/lib64/maxscale/libmaxscaled.so
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Listening connections at /tmp/maxadmin.sock with protocol MaxScale Admin
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: MaxScale started with 1 server threads.
Feb 16 14:51:07 ITI-VN-83-VM systemd[1]: Started MariaDB MaxScale Database Proxy.
Feb 16 14:51:07 ITI-VN-83-VM maxscale[3168]: Started MaxScale log flusher.

Comment by markus makela [ 2017-02-16 ]

After that command, does sudo maxadmin help print the help output for maxadmin?

Generated at Thu Feb 08 04:04:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.