Search code examples
lotus-noteslotus-dominohcl-notes

Database context not allowed


We have a cluster with 3 servers with Load Balancer in front (CloudFlare). Things worked well when we had 2 servers (A & B) in the cluster but after we added a 3-rd server (C) we noticed few odd things.

One of them is quite important and I do not understand how it happens at all.

Our web application makes AJAX requests to itself in order to get some JSON data back and if requests hit new server (C) response looks like that:

{
code: 404,
text: "Not Found",
message: "Database context not allowed."
}

Our application does not throw such error and so I searched in google a bit and noticed that it's mentioned on: OpenNTF XPagesExtensionLibrary

However, we do not use XPages at all so I wonder how could it be that our AJAX requests somehow involve that logic.

Any suggestion & tip would be appreciated.

UPDATE

The backend code of my agent is not important (it could be also an empty agent, I checked), because the request does not come to my agent.

The AJAX call is triggered by jQuery

let url = "domain.tld/api/key";
let params = {"a": 1};
$.post(url, params, function (data) {
  // some code
},
"json"
).always(function() {
  // some code
});

The URL, which I suspect is an issue starts with /api/key and I believe it's an issue (because all other ajax calls where endpoint do not start from /api/ work well).

Thanks.


Solution

  • Figured that our with help from comments (which you can see under my original post).

    Apparently there is DAS servlet that handles all requests starting from /api/* and it runs if XPages engine is loaded. In my case the 2 servers out of 3 have XPages shut down so the issue happened only on 1 server.

    The solution would be:

    1. Shut down XPages (or find a way to shut down DAS).
    2. Alternatively change a URL from /api/path to something else (this is what we will do).