Node acceptance dialog timeouts although it's working in background
(distributed 2.11.1 setup on ec2)
I've created 500 random inventories and I'm trying to accept the "nodes" into rudder.
With "Accept new nodes", I select 10 nodes, "Accept into rudder", wait, wait, wait, then:
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /rudder/secure/nodeManager/manageNewNode. Reason: Error reading from remote server <pre> Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /rudder/secure/nodeManager/manageNewNode. Reason: Error reading from remote server </pre> But if I go to the "list node" page, I can see that these 10 nodes are actually being accepted right now (they're appearing one by one). After a minute or so, the 10 nodes have been accepted. So the error above is a bit misleading. ;-) Thanks.
#1 Updated by Matthieu CERDA over 4 years ago
- Category set to Web - Nodes & inventories
- Status changed from New to 8
- Assignee set to François ARMAND
- Priority changed from N/A to 2
- Target version set to 2.11.2
Hmmm, this looks like a webapp issue, maybe a timing one (too short timeout ?).
Giving this to FAR for evaluation :)
Thanks Lionel !
#4 Updated by François ARMAND about 4 years ago
OK, so the problem seems that we have a timeout for async (ajax) requests, and that the underlying process does not terminate before that timeout. So the ajax call actually thinks it failed, and the server acceptation process don't know that and continue its work of accepting nodes.
We could have a longer timeout for ajax requests, but of course, that doesn't solve the problem in any way. The real solution is to make the acceptation process completly asynchrone, and to have a client-side knows it is.
I don't see for now a way to resolve that without the async solution, perhaps something with partial response only for subset of the whole acceptance.
#7 Updated by François ARMAND almost 4 years ago
Some more thought on that let me think that the behaviour as it is can't be corrected without a major refactoring of the page, and so must go in a future version of Rudder as a feature.
I think we should have one async acceptation by node (queued on the server), with a little wheel until the node is accepted (and here, we are seing a green "ok"). Node would be added one by one, so that raise the question about how to manage the start of promise generation. We can't just start one for each node, but we also can't add a grace period before starting it, else it may be delayed for hours. Or perhaps just delay with a max bound (10 minutes ?)