[MXS-2823] MaxCtrl doesn't report any connection Created: 2020-01-05  Updated: 2020-02-14  Resolved: 2020-02-14

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

Type: Bug Priority: Major
Reporter: acsfer Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

maxscale.cnf

[maxscale]
threads=auto
 
[Master]
type=server
address=10.0.0.3
port=3306
protocol=MariaDBBackend
priority=1
 
[Slave]
type=server
address=10.0.0.2
port=3306
protocol=MariaDBBackend
priority=2
 
[Monitor]
type=monitor
module=MariaDBMon
servers=Master,Slave
user=replication
enforce_read_only_slaves=on
 
[ReadWriteSplit]
type=service
router=readwritesplit
servers=Master,Slave
user=replication
 
[Listener]
type=listener
service=ReadWriteSplit
protocol=MariaDBClient
address=10.0.0.3
port=3307

maxscale.log

----------------------------------------------------------------------------
2020-01-05 14:26:51   notice : syslog logging is enabled.
2020-01-05 14:26:51   notice : maxlog logging is enabled.
2020-01-05 14:26:51   notice : Using up to 291.42MiB of memory for query classifier cache
2020-01-05 14:26:51   notice : Working directory: /var/log/maxscale
2020-01-05 14:26:51   notice : The collection of SQLite memory allocation statistics turned off.
2020-01-05 14:26:51   notice : Threading mode of SQLite set to Multi-thread.
2020-01-05 14:26:51   notice : MariaDB MaxScale 2.4.5 started (Commit: 61b8bbf7f63c38ca9c408674e66f3627a0b2192e)
2020-01-05 14:26:51   notice : MaxScale is running in process 31259
2020-01-05 14:26:51   notice : Configuration file: /etc/maxscale.cnf
2020-01-05 14:26:51   notice : Log directory: /var/log/maxscale
2020-01-05 14:26:51   notice : Data directory: /var/lib/maxscale
2020-01-05 14:26:51   notice : Module directory: /usr/lib/x86_64-linux-gnu/maxscale
2020-01-05 14:26:51   notice : Service cache: /var/cache/maxscale
2020-01-05 14:26:51   notice : Worker message queue size: 1.00MiB
2020-01-05 14:26:51   notice : No query classifier specified, using default 'qc_sqlite'.
2020-01-05 14:26:51   notice : Loaded module qc_sqlite: V1.0.0 from /usr/lib/x86_64-linux-gnu/maxscale/libqc_sqlite.so
2020-01-05 14:26:51   notice : Query classification results are cached and reused. Memory used per thread: 291.42MiB
2020-01-05 14:26:51   notice : The systemd watchdog is Enabled. Internal timeout = 30s
2020-01-05 14:26:51   notice : Loading /etc/maxscale.cnf.
2020-01-05 14:26:51   notice : /etc/maxscale.cnf.d does not exist, not reading.
2020-01-05 14:26:51   notice : Loaded module MariaDBClient: V1.1.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbclient.so
2020-01-05 14:26:51   notice : [readwritesplit] Initializing statement-based read/write split router module.
2020-01-05 14:26:51   notice : Loaded module readwritesplit: V1.1.0 from /usr/lib/x86_64-linux-gnu/maxscale/libreadwritesplit.so
2020-01-05 14:26:51   notice : [mariadbmon] Initialise the MariaDB Monitor module.
2020-01-05 14:26:51   notice : Loaded module MariaDBMon: V1.5.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbmon.so
2020-01-05 14:26:51   notice : Loaded module MariaDBBackend: V2.0.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbbackend.so
2020-01-05 14:26:51   notice : Loaded module mariadbbackendauth: V1.0.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbbackendauth.so
2020-01-05 14:26:51   notice : Loaded module mariadbauth: V1.1.0 from /usr/lib/x86_64-linux-gnu/maxscale/libmariadbauth.so
2020-01-05 14:26:51   notice : Encrypted password file /var/lib/maxscale/.secrets can't be accessed (No such file or directory). Password encryption is not used.
2020-01-05 14:26:51   notice : Started REST API on [127.0.0.1]:8989
2020-01-05 14:26:51   notice : MaxScale started with 1 worker threads, each with a stack size of 8388608 bytes.
2020-01-05 14:26:51   notice : Starting a total of 1 services...
2020-01-05 14:26:51   notice : Server 'Master' version: 10.4.11-MariaDB-1:10.4.11+maria~bionic-log
2020-01-05 14:26:51   notice : Server 'Slave' version: 10.4.11-MariaDB-1:10.4.11+maria~bionic-log
2020-01-05 14:26:51   notice : [MariaDBAuth] [ReadWriteSplit] Loaded 4 MySQL users for listener 'Listener' from server 'Master' with checksum 0x6ec673a4.
2020-01-05 14:26:51   notice : Listening for connections at [10.0.0.3]:3307
2020-01-05 14:26:51   notice : Service 'ReadWriteSplit' started (1/1)
2020-01-05 14:26:51   notice : Loaded server states from journal file: /var/lib/maxscale/Monitor/monitor.dat

Put the service under load, both reading and writing operations, and issue both commands. No connections reported at all. All webservices connecting to port 3307.

maxctrl list servers
┌────────────┬──────────┬──────┬─────────────┬─────────────────┬───────────┐
│ Server     │ Address  │ Port │ Connections │ State           │ GTID      │
├────────────┼──────────┼──────┼─────────────┼─────────────────┼───────────┤
│ Master      │ 10.0.0.333060           │ Master, Running │ 0-1-46190
├────────────┼──────────┼──────┼─────────────┼─────────────────┼───────────┤
│ Slave         │ 10.0.0.233060           │ Slave, Running  │ 0-1-46190
└────────────┴──────────┴──────┴─────────────┴─────────────────┴───────────┘
 
maxctrl list services
┌────────────────┬────────────────┬─────────────┬───────────────────┬───────────────────┐
│ Service        │ Router         │ Connections │ Total Connections │ Servers           │
├────────────────┼────────────────┼─────────────┼───────────────────┼───────────────────┤
│ ReadWriteSplit │ readwritesplit │ 00                 │ Master, Slave      │
└────────────────┴────────────────┴─────────────┴───────────────────┴───────────────────┘



 Comments   
Comment by markus makela [ 2020-01-07 ]

Can you try to use the mysql command line client to verify your load testing works?

Comment by acsfer [ 2020-01-09 ]

Yes it works. I've switched Maxscale to a new instance and it works, but not when Maxscale was installed on the same instance than Master server.

maxctrl list servers
┌────────┬──────────┬──────┬─────────────┬─────────────────┬────────────────────────────┐
│ Server │ Address  │ Port │ Connections │ State           │ GTID                       │
├────────┼──────────┼──────┼─────────────┼─────────────────┼────────────────────────────┤
│ SQL1   │ 10.0.0.333068           │ Master, Running │ 0-1-2,1-1-1268939,2-2-6526
├────────┼──────────┼──────┼─────────────┼─────────────────┼────────────────────────────┤
│ SQL2   │ 10.0.0.533060           │ Slave, Running  │ 0-1-2,1-1-1268939,2-2-6526
└────────┴──────────┴──────┴─────────────┴─────────────────┴────────────────────────────┘

Comment by markus makela [ 2020-01-09 ]

Can you provide a test case that reproduces the problem?

Comment by markus makela [ 2020-02-14 ]

Closing as Cannot Reproduce due to a lack of a reproducible test case.

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