I am not sure what steps you exactly followed but the error you mentioned is something strange.
These are two approaches to work with rest apis:
1- Get the basic auth base64 encoded string for the user credentials and use it for susequent requests by passing it as auth header. (not recommended)
2- Use the auth rest api to get the alf_ticket and use it for susequent request as auth header by converting to base64 encoded string. see the example here:
$ curl -X GET -H 'Accept: application/json' -H 'Authorization: Basic VElDS0VUXzA4ZWI3ZTJlMmMxNzk2NGNhNTFmMGYzMzE4NmNjMmZjOWQ1NmQ1OTM=' 'http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/queries/nodes?term=dog
Can you try the same request via curl and see what result you get? if you are using endpoint which is behind LB, then try hitting the nodes one by one and see what response you get.
(ACSCE, AWS SAA, Azure Admin)