Internal Server Error while creating DBforPostgreSQL flexibleServers
I keep getting a an unexpected error occured while processing the request to create a new flexible server. Code: InternalServerError
Azure Database for PostgreSQL
-
NIKHILA NETHIKUNTA 3,505 Reputation points • Microsoft Vendor
2024-11-13T02:32:35.9833333+00:00 @Sam Nehmat (Cloud Admin)
Thank you for the question and for using Microsoft Q&A platform.As per my understanding you are facing some issue while creating a PostgreSQL flexible server.
The error message "An unexpected error occurred" with the error code "InternalServerError" indicates that there was an issue with the server while processing your request. This could be due to a variety of reasons, such as a temporary outage or a problem with the server configuration.To troubleshoot this issue, you can try the following steps:
- Check the Azure status page to see if there are any known issues with the service you are using.
- Try again later to see if the issue has been resolved.
For more help, please refer to the below links:
https://azure.status.microsoft/en-us/status
https://learn.microsoft.com/en-us/answers/questions/707469/internal-server-error-while-creating-postgres-flex
https://learn.microsoft.com/en-us/answers/questions/1073185/an-unexpected-error-occured-while-processing-the-rHope this helps. Please let us know if the issue still persists.
-
Sam Nehmat (Cloud Admin) 0 Reputation points
2024-11-13T12:08:35.43+00:00 @NIKHILA NETHIKUNTA Thank you for your response. I have been retrying multiple times over the last two weeks with the same issue. When I change the bicep file the error temporarily changed to a different issue, and as I addressed the issue it went back to this internal server error. I assume that it could be related to my bicep file due to that reason.
-
Sam Nehmat (Cloud Admin) 0 Reputation points
2024-11-13T13:15:29.11+00:00 Here is the call from the azure-resources.bicep file:
module psqlModule 'IaC/postgresSqlServer.bicep' = { scope: resourceGroup('rg-loans-perm-${environment}-${region}-${instance}') name: 'psql-loans-${environment}-${instance}' params: { tagList: tagList location: location environment: environment instance: instance administratorLogin: adminUsername administratorLoginPassword: adminPassword dbName: 'loans-${environment}' skuName: sku.name } dependsOn: [ vnetModule ] } module privateEndpointSql 'IaC/privateEndpoint.bicep' = { scope: resourceGroup('rg-loans-perm-${environment}-${region}-${instance}') name: 'privateEndpoint-for-psql' params: { privateEndpointname: 'pl-psql-loans-${environment}-${region}-${instance}' virtualNetworkResourceGroupName: 'rg-network-loans-${environment}-${region}-${instance}' location: location virtualNetworkName: vnetModule.outputs.virtualNetworkName virtualNetworkSubnetName: 'snet-privateendpoints-${region}-${instance}' environment: environment privateLinkServiceId: psqlModule.outputs.postgresServerId GroupId: 'postgresqlServer' } dependsOn: [ psqlModule ] }
and the post bicep file:
@secure() param administratorLogin string // Name of the db server admin login @secure() param administratorLoginPassword string // Password of the db server admin login param dbName string // Name of the database param skuName string = 'Standard_B1ms' // Flexible Server SKU for PostgreSQL param skuTier string = 'Burstable' // Tier for PostgreSQL param version string = '16' // PostgreSQL version param location string = resourceGroup().location // Location of the resources param tagList object // Tags set for all created resources, coming from pipeline parameters param region string = 'uks' // Short form of region ('uks') param instance string // Instance number (001) param environment string // Environment, such as 'shared' param virtualNetworkName string = 'vnet-dev-loans-uks-001' // Name of the virtual network param virtualNetworkResourceGroup string = 'rg-network-loans-dev-uks-001' // Resource group for the virtual network param subnetName string = 'snet-privateendpoints-uks-001' // Name of the delegated subnet param privateDnsZoneResourceGroup string = 'rg-network-loans-dev-uks-001' // Resource group for private DNS zone resource postgresServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' = { name: 'psql-loans-${environment}-${region}-${instance}' location: location tags: tagList sku: { name: skuName tier: skuTier } properties: { version: version administratorLogin: administratorLogin administratorLoginPassword: administratorLoginPassword highAvailability: { mode: 'Disabled' } network: { delegatedSubnetResourceId: resourceId(virtualNetworkResourceGroup, 'Microsoft.Network/virtualNetworks/subnets', virtualNetworkName, subnetName) privateDnsZoneArmResourceId: resourceId(privateDnsZoneResourceGroup, 'Microsoft.Network/privateDnsZones', 'psql-loans-dev-uks-001.private.postgres.database.azure.com') } } } resource postgresDatabase 'Microsoft.DBforPostgreSQL/flexibleServers/databases@2022-12-01' = { parent: postgresServer name: dbName properties: { charset: 'UTF8' } } resource privateDnsZone 'Microsoft.Network/privateDnsZones@2018-09-01' = { name: 'psql-loans-dev-uks-001.private.postgres.database.azure.com' location: 'global' } resource privateEndpoint 'Microsoft.Network/privateEndpoints@2021-02-01' = { name: 'pe-psql-loans-${environment}-${region}-${instance}' location: location properties: { subnet: { id: resourceId(virtualNetworkResourceGroup, 'Microsoft.Network/virtualNetworks/subnets', virtualNetworkName, subnetName) } privateLinkServiceConnections: [ { name: 'psqlConnection' properties: { privateLinkServiceId: postgresServer.id groupIds: [ 'postgresqlServer' ] } } ] } } resource privateDnsZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2022-07-01' = { name: 'psqlEndpointDnsZoneGroup' parent: privateEndpoint properties: { privateDnsZoneConfigs: [ { name: 'default' properties: { privateDnsZoneId: privateDnsZone.id } } ] } } resource dnsZoneVnetLink 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2018-09-01' = { name: 'vnetLink-psqldnszone-${environment}-${region}-${instance}' location: 'global' parent: privateDnsZone properties: { virtualNetwork: { id: resourceId(virtualNetworkResourceGroup, 'Microsoft.Network/virtualNetworks', virtualNetworkName) } registrationEnabled: true } } output postgresServerId string = postgresServer.id output postgresServerHostName string = postgresServer.properties.fullyQualifiedDomainName output postgresDatabaseName string = postgresDatabase.name output postgresDatabaseId string = postgresDatabase.id output privateDnsZoneId string = privateDnsZone.id output dnsZoneVnetLinkId string = dnsZoneVnetLink.id
-
NIKHILA NETHIKUNTA 3,505 Reputation points • Microsoft Vendor
2024-11-15T08:46:36.83+00:00 @Sam Nehmat (Cloud Admin)
I agree that this issue looks strange and I wasn't able to reproduce this issue. If you have a support plan could you please file a support ticket for deeper investigation and do share the SR# with us? In case if you don't have a support plan please let us know here. -
NIKHILA NETHIKUNTA 3,505 Reputation points • Microsoft Vendor
2024-11-18T16:50:15.0033333+00:00 @Sam Nehmat (Cloud Admin)
We haven’t heard from you on the last response and was just checking back to see if you got a chance to create a support ticket. Please let us know if you have any questions.
Sign in to comment