I am writing to report a critical issue with our API (https://api.agentum.se)

Agentum kontakt 0 Reputation points
2025-03-05T13:30:25.5366667+00:00

"I am writing to report a critical issue with our API (https://api.agentum.se), which is currently not responding following the automatic migration of our database (db-agentum-prod) from Azure Database for PostgreSQL Single Server to Azure Database for PostgreSQL Flexible Server. Issue Details API Endpoint: https://api.agentum.se Database Server: db-agentum-prodRF.postgres.database.azure.com Migration Status: Succeeded (as per Azure Portal) Error Observed: HTTP 401 Unauthorized when attempting to access the API. The API is unable to connect to the database, potentially due to server-side or database connectivity issues. The preliminary observations could be related to: Database Connectivity: Credentials or authentication methods may need adjustments for the new flexible server. Firewall Rules: The API server's IP address may not be allowed in the new database's firewall configuration."

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Vijayalaxmi Kattimani 1,640 Reputation points Microsoft External Staff
    2025-03-05T14:10:05.1366667+00:00

    Hi Agentum kontakt,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    As we understand that, you are facing a significant issue with your API following the migration of your database from Azure Database for PostgreSQL Single Server to Azure Database for PostgreSQL Flexible Server.

    Based on the information provided, the following preliminary observations and potential solutions could be considered:

    • Database Connectivity: It is possible that credentials or authentication methods need adjustments for the new flexible server. Ensure that the API is using the correct credentials and authentication mechanisms to connect to the database on the new server.
    • Firewall Rules: Verify that the API server's IP address is allowed in the firewall configuration of the new database server. Adjust the firewall rules to permit the API server's IP address for database connectivity.

    By addressing these potential issues related to database connectivity and firewall rules, you may be able to resolve the HTTP 401 Unauthorized error and restore connectivity between the API and the database on the Azure Database for PostgreSQL Flexible Server.

    Please refer to the below mentioned links for more information.

    https://learn.microsoft.com/en-us/azure/dms/known-issues-troubleshooting-dms

    https://learn.microsoft.com/en-us/troubleshoot/azure/api-mgmt/availability/unauthorized-errors-invoke-apis

    I hope this information helps. If the issue still persists, please let us know here. We will respond with more details and try to help you.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.