[MXS-2379] JSON Interface not work with Maxscale 2.3 Created: 2019-03-13  Updated: 2020-08-25  Resolved: 2019-03-28

Status: Closed
Project: MariaDB MaxScale
Component/s: maxinfo
Affects Version/s: 2.3.4
Fix Version/s: 2.3.5

Type: Bug Priority: Critical
Reporter: Richard Stracke Assignee: markus makela
Resolution: Fixed Votes: 1
Labels: None

Attachments: Zip Archive maxtest.zip    

 Description   

JSON Interface not work with Maxscale 2.3 under some unknown circumsiances.

To reproduce:

Needed:
installed docker and docker-compose

unzip attachen zip file.

cd maxtest

docker-compose up -d

Execute on host:

curl http://127.0.0.1:8003/servers

--> no result

With changing the maxscale version in docker-compose.yml from 2.3 to 2.2
it works with the expected result.

echnaton@f353:~/maxtest$ curl  http://127.0.0.1:8003/servers
[ { "Server" : "server1", "Address" : "master", "Port" : 3306, "Connections" : 0, "Status" : "Down"},
{ "Server" : "server2", "Address" : "slave1", "Port" : 3306, "Connections" : 0, "Status" : "Down"},
{ "Server" : "server3", "Address" : "slave2", "Port" : 3306, "Connections" : 0, "Status" : "Down"}]



 Comments   
Comment by markus makela [ 2019-03-18 ]

What does the output say with curl -v? It could be possible that it's an authentication related problem.

Comment by markus makela [ 2019-03-22 ]

Please try this:

curl  http://127.0.0.1:8003/v1/servers

All the resources in the MaxScale REST API are in the v1 "namespace" as is documented here: https://mariadb.com/kb/en/8088/#api-versioning

Comment by markus makela [ 2019-03-22 ]

My mistake, this is about maxinfo.

Comment by markus makela [ 2019-03-22 ]

I would suggest switching over to the REST API which is far more secure and more versatile. In addition to this, the MaxInfo module has been deprecated and will be removed in a future release as it duplicates functionality of the REST API.

Looks like the JSON output of maxinfo indeed does not work in 2.3.

Comment by markus makela [ 2019-03-28 ]

Fixed the HTTP interface. As a result of this fix, the output is now pretty-printed in a more consistent way. The structures remain the same.

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