Are you accessing the project from the GitHub Codespaces?
[ X] No, I am running the project on my local machine (I will fill in the OS section below)
[ ] Yes, I am using GitHub Codespaces.
Note: The project is optimized to run on Codespaces. We welcome contributions to enhance it for cross-platform local development, but it's not something we will prioritize right now. Thank you!
Describe the bugazd provision didn't complete successfully, the postgresql restore failed with pg_restore: connecting to database for restore
pg_restore: error: connection to server at "psql-db-hgraruq6pioo4.postgres.database.azure.com" (40.123.42.110), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
To Reproduce
Steps to reproduce the behavior:
Fresh clone from current commit 4dbd1fba807300650bd8eec5707be5d1d773e8ba to mac m1
open in vscode
reopen in dev container
azd auth login
azd provision
View DB from Azure portal which add firewall rule
Change .env value for restore to false so I can rerun script
Rerun script and it works
Assume the firewall rule is the missing/incorrect step.
Expected behavior
No errors during provision
Screenshots
OS (please complete the following information):
OS: mac m1
OS Version: sonoma 14.1.2
npm version: 9.5.0
Node.js version: 18.15.0
output of azd version: azd version 1.5.1 (commit 3856d1e98281683b8d112e222c0a7c7b3e148e96)
Additional context
The next line after the error says the restore succeeded. So I can't rerun the restore without changing the value in the .env file for the environment.
Using the Azure Portal connect to database, then using psql command \dt, the response was Did not find any relations.
? Enter a new environment name: dfberry-contoso-20231220
Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.
(✓) Done: Downloading Bicep
? Select an Azure Subscription to use: 3. Visual Studio Enterprise Subscription (b57b253a-e19e-4a9c-a0c0-a5062910a749)
? Select an Azure location to use: 43. (US) East US 2 (eastus2)
Subscription: Visual Studio Enterprise Subscription (b57b253a-e19e-4a9c-a0c0-a5062910a749)
Location: East US 2
You can view detailed progress in the Azure Portal:
https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2Fb57b253a-e19e-4a9c-a0c0-a5062910a749%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdfberry-contoso-20231220-1703093656
(✓) Done: Resource group: rg-dfberry-contoso-20231220
(✓) Done: App Service plan: plan-hgraruq6pioo4
(✓) Done: Static Web App: stapp-web-hgraruq6pioo4
(✓) Done: Key Vault: kv-hgraruq6pioo4
(✓) Done: Log Analytics workspace: log-hgraruq6pioo4
(✓) Done: Storage account: sthgraruq6pioo4
(✓) Done: Application Insights: appi-hgraruq6pioo4
(✓) Done: Portal dashboard: dash-hgraruq6pioo4
(✓) Done: Container Registry: crhgraruq6pioo4
(✓) Done: Container Apps Environment: cae-hgraruq6pioo4
(✓) Done: Azure Cosmos DB: cosmos-hgraruq6pioo4
(✓) Done: Azure Database for PostgreSQL flexible server: psql-db-hgraruq6pioo4
(✓) Done: Function App: func-api-hgraruq6pioo4
(✓) Done: Container App: ca-cms-hgraruq6pioo4
(✓) Done: Container App: ca-blog-hgraruq6pioo4
(✓) Done: Container App: ca-stripe-hgraruq6pioo4
Getting values from azd
Restoring PostgreSQL Database from /workspaces/contoso-real-estate/scripts/database/dumps/strapi_20230922.sql
pg_restore: connecting to database for restore
pg_restore: error: connection to server at "psql-db-hgraruq6pioo4.postgres.database.azure.com" (40.123.42.110), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
PostgreSQL Database restored successfully
Setting STRAPI_DATABASE_MIGRATED to true in azd
SUCCESS: Your application was provisioned in Azure in 6 minutes 16 seconds.
You can view the resources created under the resource group rg-dfberry-contoso-20231220 in Azure Portal:
https://portal.azure.com/#@/resource/subscriptions/b57b253a-e19e-4a9c-a0c0-a5062910a749/resourceGroups/rg-dfberry-contoso-20231220/overview
Are you accessing the project from the GitHub Codespaces?
Describe the bug
azd provision
didn't complete successfully, the postgresql restore failed with pg_restore: connecting to database for restore pg_restore: error: connection to server at "psql-db-hgraruq6pioo4.postgres.database.azure.com" (40.123.42.110), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?To Reproduce Steps to reproduce the behavior:
Expected behavior No errors during provision
Screenshots![image](https://github.com/Azure-Samples/contoso-real-estate/assets/1517008/564caaf1-063d-41e7-ae80-0046a9e696c2)
OS (please complete the following information):
azd version
: azd version 1.5.1 (commit 3856d1e98281683b8d112e222c0a7c7b3e148e96)Additional context The next line after the error says the restore succeeded. So I can't rerun the restore without changing the value in the .env file for the environment.
Using the Azure Portal connect to database, then using psql command
\dt
, the response wasDid not find any relations.