[MXS-1028] SchemaRouter cannot route to services running in the same instance of MaxScale Created: 2016-11-28 Updated: 2017-03-06 Resolved: 2017-02-07 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | schemarouter |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | 2.1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wade Rossmann | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos7 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
My situation is that I've got a number of Master-Slave pairs that I would like to balance with `readconnroute` and then aggregate all of those within a `schemarouter` so as to present a single service entry point to my environment. However, while `readconnroute` and `schemarouter` work individually I get the following error when using them in tandem: error : [main-schemarouter] Failed to connect to server 'rtr-foo' (127.0.0.1:33001) when checking authentication user credentials and permissions: 2013 Lost connection to MySQL server at 'handshake: waiting for inital communication packet', system error: 110 I've done some basic verification that the service is running on :33001 and accepts connections via the mysql CLI. I was advised by markusjm on IRC [#maria@freenode] to file this as a bug. I've attached the relevant config and the full log of the invocation. |
| Comments |
| Comment by Wade Rossmann [ 2016-11-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Per Markus' suggestion I've set up a second Maxadmin process that runs only the `schemarouter` service and connects to the `readconnroute` listeners from the first, and this works as expected. Though I'd prefer to have just the one service this will suffice for now. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2016-11-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I think one reason why this fails is that the database user authentication fails.
Connecting to the same process with the connector seems to cause this failure even if multiple threads are available. However, I'm able to load the users if I add one actual server to the list of servers used by the schemarouter service. With the following configuration, I was able to successfully start MaxScale and connect to it.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2016-11-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On further inspection, the only problem is the fact that the schemarouter tries to verify that the service user credentials are valid at startup which is done in a single thread. This prevents all responses from internal services as the system hasn't start up. In the upcoming 2.1 version of MaxScale, this should be avoidable with the new skip_permission_checks global option. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Johan Wikman [ 2017-02-07 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Closing now as this should be doable using the skip_permission_checks option in 2.1.0. If that proves not to be the case, please reopen this or create a new bug-report. |