Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

HTTP 500 Login failed for user


Hello everyone,

I’ve run into the following error while using TestRail API v2:

Unformatted exception: TestRail API returned HTTP 500 ("[Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user ‘’.

[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database “” requested by the login. The login failed.")

I did not observe an interruption of connectivity between the machine contacting TestRail and the TestRail machine. However, I WAS running two scripts using the TestRail API, same user, and same calls on the same machine. Could this be the result of two concurrent calls? If so, is there a way to avoid such a conflict in the future?

I should also note that this occurred towards the end of the scripts, after I had already done a couple thousand successful ‘send_post’ or ‘send_get’ operations.

Best regards,

Mikhail M. Paremski


Hello Mikhail,

Thanks for your posting. It looks like TestRail can no longer connect to the SQL Server database, could you please check this? According to the error message (‘Login failed for user ‘’’), it appears to be an authentication/permission problem with the SQL Server user you use for the database connection. You can configure the connection in the config.php configuration file which can be found directly in TestRail’s installation directory.

This is unrelated to using the API and it would be great if you could check the database connection as the first step.