Stuck in maintenance mode

Hi,

I just upgraded 3.4.x to 3.5.1 and I followed the instructions (put server in maintenance mode, run the upgrade, etc).
Except that when I accessed the server post upgrade, I forgot to turn off the maintenance mode before logging out of my session.
When I try to log back in, I get this error displayed in the login form :
{“ErrorMessage”:“Sorry, but your changes could not be persisted because this server is currently undergoing maintenance. Please wait, or contact your Octopus administrator.”,“StatusCode”:403}

The user I am using is an admin (which should allow me in). I tried creating a new admin user from the command line but I still can’t get in.

I also tried to use the API to turn off the maintenance mode using PUT of {“IsInMaintenanceMode”:false} to /api/maintenanceconfigurations but I get :

{
“ErrorMessage”: “Sorry, but your changes could not be persisted because this server is currently undergoing maintenance. Please wait, or contact your Octopus administrator.”
}

Is there a way to turn off this maintenance mode? I am willing to tinker with the Database or the registry, where ever this maintenance mode flag is stored.

Thank you

Hi,

Thanks for getting in touch. I’m very sorry to hear you are running into this annoying situation.

Please try running this DB script to turn maintenance mode off from SQL: https://gist.github.com/Dalmirog/5cd03644eb63fa9e21599852045e4e76

Let me know if that works.

Dalmiro

Received this same error when upgrading from 3.4.10 to 3.5.1
SQL fix resolved the error.

Thanks

Hi Timothy,

Is there any chance you can send us your Octopus Server logs (in c:\Octopus\logs by default)? we are looking for logs around the time of the upgrade/when you got that error message trying to log in.

Feel free to send them to support@Octopus.com if you don’t want to share them in this public thread.

@Dale - It’ll be great if you could send them too.

Thanks,
Dalmiro

I can confirm that the proposed fix worked as expected. I don’t have an easy access to logs right now. I will try to get them to help the debug effort.

Hi Dali,

We’ve investigated the issue and found that it is a bug in 3.5 that is causing this issue. I’ve raised https://github.com/OctopusDeploy/Issues/issues/2935 to have this fixed as a priority.

​My sincere apologies for the inconvenience caused!

​Thank you and best regards,
​Henrik