Showing results for 
Search instead for 
Did you mean: 

ERROR: Invalid Login State : The machine must be logged out to accept a login request

Level 3


We have encountered a problem. We have two bots that we are running from the same resource with a specific time. The 2nd bot sometimes shows the following error "ERROR: Invalid Login State : The machine must be logged out to accept a login request" in the login workflow, even though the first bot has logged out properly (we have seen it in the Blue Prism session log). Does anyone know what the problem is in this regard?



This would definitely be an expected behaviour since you are running two bots at the same time and are also using Login action from the login agent business object. So technically if one of your sessions has already logged into the machine, you cannot use the login action from another session since the resource is not in a logged off state.

My question here is are you checking the login status of the machine prior to using the login action. Also, this use case should incorporate environment locks around the login logic as you are parallelly running two separate processes on the same machine so one session of a process should only access the login logic while the other should either skip it or wait and retry based on the environment lock acquired by the other process. 

Second thing is even if you logout, it can take sometime for the machine to be in a logged off state. My advise would be to retry this exception after 2-3 minutes for 3 times as part of a safety check.

Note: Same Environment Lock can be used across sessions so it should be possible for this use case

Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi @devneetmohanty07 ,

Thank you for your reply. Actually, the two bots are running at different times (For example, Bot 1 - 12:00 PM and Bot 2 - 02:00 AM Next day). We don't see any login problem for bot 1 and we can see from the Session log that the bot 1 has logged out successfully. But for Bot 2 we see the login problem. It showed that the Server is still logged in. This does not happen every day. But sometimes it happens.


Bot 1:



Bot 2: