Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install rdbms-connect from deployment script in azure arm template #6425

Closed
smartouss opened this issue Jun 20, 2023 · 9 comments
Closed
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. MySQL needs-author-feedback More information is needed from author to address the issue. PostgreSQL question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@smartouss
Copy link

Describe the bug

Hello,

I'm trying to execute a script file on a PostgreSql flexible server on azure from an arm template, to do so im using a deployment script that use azure cli, following is the commands im running
az config set extension.use_dynamic_install=yes_without_prompt az extension add -n rdbms-connect az postgres flexible-server execute --name $psqlServerName --admin-user $psqlAdminLogin --admin-password $psqlAdminPassword --database-name $psqlDatabaseName --file-path $scriptPath --debug"

The command fail after an hour, I opened a ticket with azure and they provided me with the logs and they informed me that .py files being used from the rdbms-connect command are not configured to run pip v3 which is what the CLI is attempting to use

Related command

az extension add -n rdbms-connect

Errors

ERROR: Could not find a version that satisfies the requirement psycopg2==2.9.3 (from rdbms-connect) (from versions: 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.5, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.6, 2.6.1, 2.6.2, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.7.3.1, 2.7.3.2, 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5, 2.9.6) ERROR: No matching distribution found for psycopg2==2.9.3 Exception information: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve result = self._result = resolver.resolve

Issue script & Debug output

i wasn't able to add the --debug result as its too long and github doesn't allow it

Expected behavior

rdbms-connect to get installed and the pg script run

Environment Summary

2.34.1

Additional context

No response

@smartouss smartouss added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 20, 2023
@ghost ghost added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Jun 20, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 20, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added MySQL CXP Attention This issue is handled by CXP team. labels Jun 20, 2023
@ghost
Copy link

ghost commented Jun 20, 2023

Thank you for your feedback. This has been routed to the support team for assistance.

@yonzhan yonzhan added PostgreSQL and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 20, 2023
@navba-MSFT navba-MSFT self-assigned this Jun 22, 2023
@navba-MSFT
Copy link
Contributor

@smartouss Thanks for reaching out to us and reporting this issue. Could you please update your Azure CLI to the most recent version and then please run the pip install psycopg2-binary command and check if that helps. Awaiting your reply.

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Jun 22, 2023
@smartouss
Copy link
Author

smartouss commented Jun 22, 2023

@navba-MSFT thank you for your reply, the latest version allowed in arm is "2.48.1", after using this version and making the script as following
az config set extension.use_dynamic_install=yes_without_prompt pip install psycopg2-binary az extension add -n rdbms-connect az postgres flexible-server execute --name $psqlServerName --admin-user $psqlAdminLogin --admin-password $psqlAdminPassword --database-name $psqlDatabaseName --file-path $scriptPath --debug"

the script failed, following the the logs:
{ "status": "failed", "error": { "code": "DeploymentScriptError", "message": "The provided script failed with multiple errors. First error:\r\nWARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus. Please refer to https://aka.ms/DeploymentScriptsTroubleshoot for more deployment script information.", "details": [ { "code": "DeploymentScriptError", "message": "WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus" }, { "code": "DeploymentScriptError", "message": "WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv" }, { "code": "DeploymentScriptError", "message": "[notice] A new release of pip is available: 23.0.1 -> 23.1.2" }, { "code": "DeploymentScriptError", "message": "[notice] To update, run: pip install --upgrade pip" }, { "code": "DeploymentScriptError", "message": "WARNING: This extension depends on libpq-dev and will be installed first." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Command arguments: ['postgres', 'flexible-server', 'execute', '--name', 'oussapp-eastus.postgres.database.azure.com', '--admin-user', 'UFA', '--admin-password', 'UF@123', '--database-name', 'Qeedo', '--file-path', 'https://stage5dd8c04894d84674b53.blob.core.windows.net/armtest-stageartifacts/DBScripts/qeedoschema.sql?sv=2017-07-29&sr=c&sig=HemflD3OqCaFYV7%2Bf6D1sUH%2FvOP9J%2B7OjpGj0zR4FS4%3D&se=2023-06-22T21%3A04%3A13Z&sp=r', '--debug']" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: __init__ debug log:" }, { "code": "DeploymentScriptError", "message": "Cannot enable color." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: Cli.PreExecute []" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f577d6693f0>, <function OutputProducer.on_global_arguments at 0x7f577d53c0d0>, <function CLIQuery.on_global_arguments at 0x7f577d569360>]" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Command index has been invalidated." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: No module found from index for '['postgres', 'flexible-server', 'execute', '--name', 'oussapp-eastus.postgres.database.azure.com', '--admin-user', 'UFA', '--admin-password', 'UF@123', '--database-name', 'Qeedo', '--file-path', 'https://stage5dd8c04894d84674b53.blob.core.windows.net/armtest-stageartifacts/DBScripts/qeedoschema.sql?sv=2017-07-29&sr=c&sig=HemflD3OqCaFYV7%2Bf6D1sUH%2FvOP9J%2B7OjpGj0zR4FS4%3D&se=2023-06-22T21%3A04%3A13Z&sp=r', '--debug']'" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Loading all modules and extensions" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Loading command modules:" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Name Load Time Groups Commands" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: acr 0.061 34 144" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: acs 0.030 6 48" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: advisor 0.001 3 6" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: ams 0.005 22 100" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: apim 0.004 11 60" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: appconfig 0.003 8 42" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: appservice 0.112 73 260" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: aro 0.010 1 8" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: backup 0.004 16 58" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: batch 0.027 36 104" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: batchai 0.020 10 30" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: billing 0.007 19 52" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: botservice 0.003 12 42" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: cdn 0.009 39 133" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: cloud 0.001 1 7" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: cognitiveservices 0.002 8 31" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: config 0.001 2 7" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: configure 0.001 2 5" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: consumption 0.002 8 9" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: container 0.008 1 11" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: cosmosdb 0.020 57 191" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: databoxedge 0.009 5 27" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: dla 0.005 23 62" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: dls 0.003 7 41" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: dms 0.002 3 22" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: eventgrid 0.005 25 96" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: eventhubs 0.023 14 40" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: extension 0.001 1 7" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: feedback 0.000 1 2" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: find 0.001 1 1" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: hdinsight 0.005 8 39" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: identity 0.001 2 11" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: interactive 0.000 1 1" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: iot 0.097 19 82" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: keyvault 0.010 21 128" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: kusto 0.002 3 14" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: lab 0.004 11 34" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: managedservices 0.001 3 8" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: maps 0.002 5 13" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: marketplaceordering 0.002 1 2" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: monitor 0.039 25 80" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: netappfiles 0.058 18 94" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: network 0.545 101 331" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: policyinsights 0.025 9 17" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: privatedns 0.003 14 66" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: profile 0.001 2 9" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: rdbms 0.139 55 230" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: redis 0.002 5 27" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: relay 0.004 10 37" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: resource 0.011 47 209" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: role 0.004 17 61" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: search 0.001 7 22" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: security 0.006 48 104" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: servicebus 0.008 13 28" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: serviceconnector 0.040 8 129" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: servicefabric 0.012 26 75" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: signalr 0.002 8 30" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: sql 0.017 55 207" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: sqlvm 0.059 4 20" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: storage 0.139 57 269" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: synapse 0.012 54 246" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: util 0.001 3 7" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: vm 0.058 55 261" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Total (63) 1.692 1164 4537" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Loading extensions:" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: rdbms-connect 0.002 4 4 /root/.azure/cliextensions/rdbms-connect" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Total (1) 0.002 4 4" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Loaded 1154 groups, 4541 commands." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core: Updated command index in 0.005 seconds." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f577bcaa050>]" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/root/.azure/commands/2023-06-22.17-11-06.postgres_flexible-server_execute.309.log'." }, { "code": "DeploymentScriptError", "message": "INFO: az_command_data_logger: command args: postgres flexible-server execute --name {} --admin-user {} --admin-password {} --database-name {} --file-path {} --debug" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f577bcbeb90>]" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f577ba74af0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f577ba74c10>]" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f577a81e290>]" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f577d53c160>, <function CLIQuery.handle_query_parameter at 0x7f577d5693f0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f577ba74b80>, <function handler at 0x7f577a580ee0>]" }, { "code": "DeploymentScriptError", "message": "INFO: az_command_data_logger: extension name: rdbms-connect" }, { "code": "DeploymentScriptError", "message": "INFO: az_command_data_logger: extension version: 1.0.4" }, { "code": "DeploymentScriptError", "message": "WARNING: cli.azext_rdbms_connect.custom: Failed connection to oussapp-eastus.postgres.database.azure.com. Check error and validate firewall and public access or virtual network settings." }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):" }, { "code": "DeploymentScriptError", "message": "File \"/root/.azure/cliextensions/rdbms-connect/azext_rdbms_connect/custom.py\", line 235, in _connect_execute_file" }, { "code": "DeploymentScriptError", "message": "connection = psycopg2.connect(**connection_kwargs)" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py\", line 122, in connect" }, { "code": "DeploymentScriptError", "message": "conn = _connect(dsn, connection_factory=connection_factory, **kwasync)" }, { "code": "DeploymentScriptError", "message": "psycopg2.OperationalError: could not translate host name \"oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com\" to address: Name does not resolve" }, { "code": "DeploymentScriptError", "message": "During handling of the above exception, another exception occurred:" }, { "code": "DeploymentScriptError", "message": "Traceback (most recent call last):" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/knack/cli.py\", line 233, in invoke" }, { "code": "DeploymentScriptError", "message": "cmd_result = self.invocation.execute(args)" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py\", line 663, in execute" }, { "code": "DeploymentScriptError", "message": "raise ex" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py\", line 726, in _run_jobs_serially" }, { "code": "DeploymentScriptError", "message": "results.append(self._run_job(expanded_arg, cmd_copy))" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py\", line 697, in _run_job" }, { "code": "DeploymentScriptError", "message": "result = cmd_copy(params)" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py\", line 333, in __call__" }, { "code": "DeploymentScriptError", "message": "return self.handler(*args, **kwargs)" }, { "code": "DeploymentScriptError", "message": "File \"/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py\", line 121, in handler" }, { "code": "DeploymentScriptError", "message": "return op(**command_args)" }, { "code": "DeploymentScriptError", "message": "File \"/root/.azure/cliextensions/rdbms-connect/azext_rdbms_connect/custom.py\", line 70, in execute_flexible_server_postgres" }, { "code": "DeploymentScriptError", "message": "return connect_to_server_helper(server_type=\"postgres\"," }, { "code": "DeploymentScriptError", "message": "File \"/root/.azure/cliextensions/rdbms-connect/azext_rdbms_connect/custom.py\", line 121, in connect_to_server_helper" }, { "code": "DeploymentScriptError", "message": "_connect_execute_file(server_type=server_type," }, { "code": "DeploymentScriptError", "message": "File \"/root/.azure/cliextensions/rdbms-connect/azext_rdbms_connect/custom.py\", line 247, in _connect_execute_file" }, { "code": "DeploymentScriptError", "message": "raise AzureConnectionError(\"Unable to connect to flexible server: {}\".format(e))" }, { "code": "DeploymentScriptError", "message": "azure.cli.core.azclierror.AzureConnectionError: Unable to connect to flexible server: could not translate host name \"oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com\" to address: Name does not resolve" }, { "code": "DeploymentScriptError", "message": "ERROR: cli.azure.cli.core.azclierror: Unable to connect to flexible server: could not translate host name \"oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com\" to address: Name does not resolve" }, { "code": "DeploymentScriptError", "message": "ERROR: az_command_data_logger: Unable to connect to flexible server: could not translate host name \"oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com\" to address: Name does not resolve" }, { "code": "DeploymentScriptError", "message": "DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f577bcaa290>]" }, { "code": "DeploymentScriptError", "message": "INFO: az_command_data_logger: exit code: 1" }, { "code": "DeploymentScriptError", "message": "INFO: cli.__main__: Command ran in 2.261 seconds (init: 0.383, invoke: 1.879)" }, { "code": "DeploymentScriptError", "message": "INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1" }, { "code": "DeploymentScriptError", "message": "INFO: telemetry.client: Accumulated 0 events. Flush the clients." }, { "code": "DeploymentScriptError", "message": "INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1" }, { "code": "DeploymentScriptError", "message": "INFO: telemetry.save: Save telemetry record of length 3745 in cache" }, { "code": "DeploymentScriptError", "message": "WARNING: telemetry.check: Negative: The /root/.azure/telemetry.txt was modified at 2023-06-22 17:10:19.279939, which in less than 600.000000 s" } ] } }

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Jun 22, 2023
@navba-MSFT
Copy link
Contributor

@smartouss Thanks for getting back. Looking at the below error its pretty clear that the issue is with the Network name resolution.

"psycopg2.OperationalError: could not translate host name \"oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com\" to address: Name does not resolve"

ERROR: az_command_data_logger: Unable to connect to flexible server: could not translate host name \"oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com\" to address: Name does not resolve"

Your Postgres server name doesn't seem to be correct. Hence it is failing to resolve the hostname.

oussapp-eastus.postgres.database.azure.com.postgres.database.azure.com

Please check your AzCLI script again for the below 2 parameters again and ensure that it is using the right variable values.

--name $psqlServerName --database-name $psqlDatabaseName

@navba-MSFT navba-MSFT added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-author-feedback More information is needed from author to address the issue. and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-team-attention This issue needs attention from Azure service team or SDK team labels Jun 23, 2023
@smartouss
Copy link
Author

@navba-MSFT thanks for the heads up, i fixed the name and the same old behavior happened again, the script stuck for an hour and fail with the following error:
{ "status": "failed", "error": { "code": "DeploymentScriptBootstrapScriptExecutionFailed", "message": "A service error occurred, the container group resource failed to start script execution. Correlation Id: 57a4581c-ec3a-4e32-ba50-75000028847a. Please try again later, if the issue persists contact technical support for further investigation." } }

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Jun 23, 2023
@navba-MSFT
Copy link
Contributor

@smartouss Apologies for the late reply. Regarding the error message:

DeploymentScriptBootstrapScriptExecutionFailed The bootstrap script threw an error. Bootstrap script is the system script that orchestrates the deployment script execution.

If this issue still persist, this would require a detailed troubleshooting. Could you please open a support ticket with Microsoft support so that our support professionals can get in touch with you and troubleshoot the above error?

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Jun 28, 2023
@navba-MSFT
Copy link
Contributor

@smartouss I hope you had a chance to look at my above comment. Please open a support ticket with Microsoft so that we can assist you better in resolving this issue.

@smartouss
Copy link
Author

@navba-MSFT thank you for your support, it was Microsoft support who asked me to open an issue here, however they will continue with me in the ticket.

Thanks again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. MySQL needs-author-feedback More information is needed from author to address the issue. PostgreSQL question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants