[MXS-2844] maxctrl fails to destroy binlogrouter service Created: 2020-01-21  Updated: 2020-03-13  Resolved: 2020-02-14

Status: Closed
Project: MariaDB MaxScale
Component/s: binlogrouter, maxctrl
Affects Version/s: 2.4.4
Fix Version/s: 2.4.8, 2.5.0

Type: Bug Priority: Major
Reporter: Maikel Punie Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

centos7


Sprint: MXS-SPRINT-99

 Description   

 maxctrl destroy service BinLogSVC
Error: Server at localhost:8989 responded with status code 403 to `DELETE services/BinLogSVC`:{
    "errors": [
        {
            "detail": "Service 'BinLogSVC' cannot be destroyed: Remove all servers and destroy all listeners first"
        }
    ]
}
 maxctrl show service BinLogSVC
┌─────────────────────┬─────────────────────────────────────────────────────┐
│ Service             │ BinLogSVC                                           │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Router              │ binlogrouter                                        │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ State               │ Stopped                                             │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Started At          │ Tue Jan 21 16:43:25 2020                            │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Current Connections │ 0                                                   │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Total Connections   │ 0                                                   │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Servers             │ binlog_router_master_host                           │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Parameters          │ {                                                   │
│                     │     "router_options": null,                         │
│                     │     "user": "repl",                                 │
│                     │     "password": "xxxx",                     │
│                     │     "enable_root_user": false,                      │
│                     │     "max_retry_interval": 3600,                     │
│                     │     "max_connections": 0,                           │
│                     │     "connection_timeout": 0,                        │
│                     │     "net_write_timeout": 0,                         │
│                     │     "auth_all_servers": false,                      │
│                     │     "strip_db_esc": true,                           │
│                     │     "localhost_match_wildcard_host": true,          │
│                     │     "version_string": null,                         │
│                     │     "weightby": null,                               │
│                     │     "log_auth_warnings": true,                      │
│                     │     "retry_on_failure": true,                       │
│                     │     "session_track_trx_state": false,               │
│                     │     "retain_last_statements": -1,                   │
│                     │     "session_trace": false,                         │
│                     │     "cluster": null,                                │
│                     │     "uuid": null,                                   │
│                     │     "server_id": 9,                                 │
│                     │     "master_id": 10,                                │
│                     │     "master_uuid": null,                            │
│                     │     "master_version": null,                         │
│                     │     "master_hostname": "harvey",                    │
│                     │     "slave_hostname": "harvey",                     │
│                     │     "mariadb10-compatibility": true,                │
│                     │     "maxwell-compatibility": false,                 │
│                     │     "filestem": "mysql-bin",                        │
│                     │     "file": 1,                                      │
│                     │     "transaction_safety": false,                    │
│                     │     "semisync": false,                              │
│                     │     "encrypt_binlog": false,                        │
│                     │     "encryption_algorithm": "aes_cbc",              │
│                     │     "encryption_key_file": null,                    │
│                     │     "mariadb10_master_gtid": true,                  │
│                     │     "binlog_structure": "flat",                     │
│                     │     "shortburst": 15,                               │
│                     │     "longburst": 500,                               │
│                     │     "burstsize": "1024000",                         │
│                     │     "heartbeat": 300,                               │
│                     │     "connect_retry": 60,                            │
│                     │     "master_retry_count": 1000,                     │
│                     │     "send_slave_heartbeat": true,                   │
│                     │     "binlogdir": "/binlogs",                        │
│                     │     "ssl_cert_verification_depth": 9                │
│                     │ }                                                   │
├─────────────────────┼─────────────────────────────────────────────────────┤
│ Router Diagnostics  │ {                                                   │
│                     │     "master_state": "Slave stopped",                │
│                     │     "binlogdir": "/binlogs",                        │
│                     │     "heartbeat": 300,                               │
│                     │     "master_retry_interval": 60,                    │
│                     │     "master_retry_limit": 1000,                     │
│                     │     "master_retries": 0,                            │
│                     │     "master_starts": 0,                             │
│                     │     "master_reconnects": 0,                         │
│                     │     "binlog_name": "mysql-bin.004149",              │
│                     │     "binlog_position": 267647683,                   │
│                     │     "slaves": 0,                                    │
│                     │     "session_events": 0,                            │
│                     │     "total_events": 0,                              │
│                     │     "bad_crc_count": 0,                             │
│                     │     "events_0": 0,                                  │
│                     │     "events_5": 0,                                  │
│                     │     "events_10": 0,                                 │
│                     │     "events_15": 0,                                 │
│                     │     "events_30": 0,                                 │
│                     │     "fake_events": 0,                               │
│                     │     "artificial_events": 0,                         │
│                     │     "binlog_errors": 0,                             │
│                     │     "binlog_rotates": 0,                            │
│                     │     "heartbeat_events": 0,                          │
│                     │     "events_read": 0,                               │
│                     │     "residual_packets": 0,                          │
│                     │     "average_events_per_packets": 0,                │
│                     │     "active_logs": false,                           │
│                     │     "reconnect_pending": false,                     │
│                     │     "event_types": {                                │
│                     │         "Invalid": 0,                               │
│                     │         "Start Event V3": 0,                        │
│                     │         "Query Event": 0,                           │
│                     │         "Stop Event": 0,                            │
│                     │         "Rotate Event": 0,                          │
│                     │         "Integer Session Variable": 0,              │
│                     │         "Load Event": 0,                            │
│                     │         "Slave Event": 0,                           │
│                     │         "Create File Event": 0,                     │
│                     │         "Append Block Event": 0,                    │
│                     │         "Exec Load Event": 0,                       │
│                     │         "Delete File Event": 0,                     │
│                     │         "New Load Event": 0,                        │
│                     │         "Rand Event": 0,                            │
│                     │         "User Variable Event": 0,                   │
│                     │         "Format Description Event": 0,              │
│                     │         "Transaction ID Event (2 Phase Commit)": 0, │
│                     │         "Begin Load Query Event": 0,                │
│                     │         "Execute Load Query Event": 0,              │
│                     │         "Table Map Event": 0,                       │
│                     │         "Write Rows Event (v0)": 0,                 │
│                     │         "Update Rows Event (v0)": 0,                │
│                     │         "Delete Rows Event (v0)": 0,                │
│                     │         "Write Rows Event (v1)": 0,                 │
│                     │         "Update Rows Event (v1)": 0,                │
│                     │         "Delete Rows Event (v1)": 0,                │
│                     │         "Incident Event": 0,                        │
│                     │         "Heartbeat Event": 0,                       │
│                     │         "Ignorable Event": 0,                       │
│                     │         "Rows Query Event": 0,                      │
│                     │         "Write Rows Event (v2)": 0,                 │
│                     │         "Update Rows Event (v2)": 0,                │
│                     │         "Delete Rows Event (v2)": 0,                │
│                     │         "GTID Event": 0,                            │
│                     │         "Anonymous GTID Event": 0,                  │
│                     │         "Previous GTIDS Event": 0,                  │
│                     │         "Annotate Rows Event": 0,                   │
│                     │         "Binlog Checkpoint Event": 0,               │
│                     │         "GTID List Event": 0,                       │
│                     │         "Start Encryption Event": 0                 │
│                     │     }                                               │
│                     │ }                                                   │
└─────────────────────┴─────────────────────────────────────────────────────┘



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

The binlogrouter creates a fake internal server which it uses to communicate with the master. Looks like there needs to be special handling for it since the server doesn't actually exist.

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