[MXS-4652] strange connection issues with nodejs connector and maxscale Created: 2023-06-19 Updated: 2023-06-22 Resolved: 2023-06-22 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | 2.5.26 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Felix | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Connector, maxscale | ||
| Environment: |
nodejs 16, mariadb connector 3.1.2 and maxscale 2.5.26 |
||
| Attachments: |
|
| Description |
|
Part of our setup is a nodejs socket component running on nodejs 16 and using mariadb connector 3.1.2. It should connect to mascale, running version 2.5.26, routing to 3 mariadb servers. We see strange errors as this: sqlMessage: 'The MariaDB server is running with the --read-only option so it cannot execute this statement', SqlError: (conn=2345476, no: 1927, SQLState: HY000) Authentication to 'db02' failed: 1047, #08S01: Unknown command (db02) If the connection is established without maxscale, directly to a db, there are no errors. |
| Comments |
| Comment by Diego Dupin [ 2023-06-21 ] |
|
There is no obvious reason to here, but if direct connection to DB works ok, this clearly indicate that this is a maxscale issue. |
| Comment by Felix [ 2023-06-21 ] |
|
deploying the same in a nodejs 12 enviroment works fine |
| Comment by Diego Dupin [ 2023-06-21 ] |
|
I think that using node.js 12 successful use has nothing to do there:
|
| Comment by markus makela [ 2023-06-22 ] |
|
Ferchland please include your MaxScale configuration. It's possible that this is expected behavior if you are using master_failure_mode=error_on_write. |
| Comment by Felix [ 2023-06-22 ] |
|
maxscale.cnf |
| Comment by markus makela [ 2023-06-22 ] |
|
You indeed do seem to have master_failure_mode=error_on_write in your configuration. I think this is an expected outcome since you also have master_accept_reads=true. You also have disable_sescmd_history=true as well as prune_sescmd_history=true defined at the same time. The former makes the latter not work at all: I'd recommend removing disable_sescmd_history=true. You might also benefit from enabling master_reconnection in your current setup. This way if the server comes back up, a new connection to it can be created. Right now if the connection is lost and read-only errors end up being generated, they'll never go away since you don't have master_reconnection enabled. If enabled, the read-only errors would go away when the server comes back. |