liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

error]The IP firewall settings is invalid because the IP address <ip>xx.xx.xx.xx</ip> can't be parsed. #113

Closed SQL-RedUnited closed 1 year ago

SQL-RedUnited commented 1 year ago

Hi

Just started get this error in the past couple of days. Working fine before that.


2022-10-18T13:39:08.5363475Z ##[section]Starting: Deploy Tabular AS model to AAS
2022-10-18T13:39:08.5484858Z ==============================================================================
2022-10-18T13:39:08.5485223Z Task         : Tabular Database Deployment
2022-10-18T13:39:08.5486318Z Description  : Deploy tabular databases to Azure Analysis Services or Power BI Premium
2022-10-18T13:39:08.5486615Z Version      : 1.5.8
2022-10-18T13:39:08.5486812Z Author       : Jan Pieter Posthuma
2022-10-18T13:39:08.5487127Z Help         : [More Information](https://github.com/liprec/vsts-release-aas)
2022-10-18T13:39:08.5487471Z ==============================================================================
2022-10-18T13:39:10.4340947Z ##[warning]The 'overwrite' option will be deprecated in a future version.
2022-10-18T13:39:20.7666118Z ##[error]The IP firewall settings is invalid because the IP address <ip>xx.xx.165.121</ip> can't be parsed. Please make sure the IP address is in the standard IP v4 notation.
2022-10-18T13:39:20.8069947Z ##[section]Finishing: Deploy Tabular AS model to AAS
liprec commented 1 year ago

Thanks for reporting this issue and I will take a look.

In the mean time: is it possible to run the pipeline with an extra parameters system.debug set to true and share the output of the task?

fnm02 commented 1 year ago

Thanks for reporting this issue and I will take a look.

In the mean time: is it possible to run the pipeline with an extra parameters system.debug set to true and share the output of the task?

Hi Liprec!

Im having the same issue, noticed it yesterday. It appears it may be tripping out on the IP flags.

##[debug] startIPAddress: '<ip>XX.XXX.XXX.XXX</ip> ##[debug] endIPAddress: '<ip>XX.XXX.XXX.XXX</ip>

Cheers, Mark

liprec commented 1 year ago

@fnm02 Thanks for the insight, but if I run the task, the firewall rules are parsed as expected:

##[debug] startIPAddress: '51.11.216.xxx'
##[debug] endIPAddress: '51.11.216.xxx'

Could be two things: there is a change rolled back that caused the issue. Or your configuration is different than the one I am using to test: D1 in WE

To validate the first: can you try again and see if the problem still exists?

SQL-RedUnited commented 1 year ago

Hi @liprec

I've retried and the problem still exists.

Here's a snippet of the offending part from the debug


2022-10-18T14:38:01.5508409Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/xxx
2022-10-18T14:38:01.5526493Z ##[debug]GET https://management.azure.com//subscriptions/xxx with 0-byte payload
2022-10-18T14:38:02.4063694Z ##[debug]received 374383-byte response of content type application/json; charset=utf-8
2022-10-18T14:38:02.4686601Z ##[debug]PATCH https://management.azure.com//subscriptions/xxx with -1-byte payload
2022-10-18T14:38:03.0851498Z ##[debug]Exception message - System.Net.WebException: The remote server returned an error: (400) Bad Request.
2022-10-18T14:38:03.0864023Z ##[debug]   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
2022-10-18T14:38:03.0876804Z ##[debug]   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
2022-10-18T14:38:03.1020139Z ##[debug]Exception message extracted from response {"error":{"code":"BadRequest","subCode":0,"message":"The IP firewall settings is invalid because the IP address <ip>20.58.xx.xx</ip> can't be parsed. Please make sure the IP address is in the standard IP v4 notation.","timeStamp":"2022-10-18T14:38:02.8935825Z","httpStatusCode":400,"details":[{"code":"RootActivityId","message":"21703910-cecb-4f97-bc7c-6b50d76d0120"},{"code":"Param1","message":"<ip>20.58.xx.xx</ip>"}]}}
2022-10-18T14:38:03.1106804Z ##[debug]Processed: ##vso[task.logissue code=BadRequest;type=error]
2022-10-18T14:38:03.1201140Z ##[debug]Remove firewall rule
2022-10-18T14:38:03.1220927Z ##[debug]Entering Remove-AzureAnalysisServicesFirewallRule.
2022-10-18T14:38:03.1238634Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}'
2022-10-18T14:38:03.1255825Z ##[debug] serverName: xxx
2022-10-18T14:38:03.1272814Z ##[debug] firewallRuleName: 'vsts-release-aas-rule'
2022-10-18T14:38:03.1317549Z ##[debug]Removing firewall rule 'vsts-release-aas-rule' on azure analysis services server: xxx 
2022-10-18T14:38:03.1318985Z ##[debug]Connection type used is ServicePrincipal
2022-10-18T14:38:03.1335912Z ##[debug]Connection type used is ServicePrincipal
liprec commented 1 year ago

@SQL-RedUnited thanks for the update, but the problem is that I cannot reproduce this error.

So can you share the output of a more recent run of the 19th of October UTC? And how do you have the firewall settings configured in your pipeline: Auto or Manual? And where in what region is your AAS?

SQL-RedUnited commented 1 year ago

@liprec

This is the firewall setting we're using in the pipeline that I think you're referring to:

ipDetectionMethod: autoDetect
deleteFirewallRule: true

Our AAS is in UKSouth region.

This is an updated snippet from the log

2022-10-19T11:09:57.1386022Z ##[debug]GET https://management.azure.com//subscriptions/xxx with 0-byte payload
2022-10-19T11:09:57.9245607Z ##[debug]received 374383-byte response of content type application/json; charset=utf-8
2022-10-19T11:09:58.0376008Z ##[debug]PATCH https://management.azure.com//subscriptions/xxx with -1-byte payload
2022-10-19T11:09:58.6142875Z ##[debug]Exception message - System.Net.WebException: The remote server returned an error: (400) Bad Request.
2022-10-19T11:09:58.6155823Z ##[debug]   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
2022-10-19T11:09:58.6169576Z ##[debug]   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
2022-10-19T11:09:58.6331482Z ##[debug]Exception message extracted from response {"error":{"code":"BadRequest","subCode":0,"message":"The IP firewall settings is invalid because the IP address <ip>20.0.21.0</ip> can't be parsed. Please make sure the IP address is in the standard IP v4 notation.","timeStamp":"2022-10-19T11:09:58.3849641Z","httpStatusCode":400,"details":[{"code":"RootActivityId","message":"97cc31ef-0f51-4cae-b7b2-aeabf904a5fe"},{"code":"Param1","message":"<ip>20.0.21.0</ip>"}]}}
2022-10-19T11:09:58.6432845Z ##[debug]Processed: ##vso[task.logissue code=BadRequest;type=error]
2022-10-19T11:09:58.6532507Z ##[debug]Remove firewall rule
2022-10-19T11:09:58.6556001Z ##[debug]Entering Remove-AzureAnalysisServicesFirewallRule.
2022-10-19T11:09:58.6576294Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}'
fnm02 commented 1 year ago

@liprec Apologies for jumping in again.

The issues we are experiencing are exactly like that of @SQL-RedUnited. Our debug reads the same which we ran approx 7hrs ago.

Our AAS region is Australia East and pipeline firewall settings are autoDetect.

Appreciate you looking into this! Cheers

liprec commented 1 year ago

Thanks for the update and indeed if I create a new AAS in UKSouth, the firewall error message is different than my WestEurope message. Why? I have no clue, but an updated version will be available soon.

liprec commented 1 year ago

@All, thanks for your patience and an updated version of the extension is available: v1.5.10. Azure DevOps will automatically update the tasks, so with the next run (or the run after) the pipeline will use this version.

I will close this issue, but if it is not solved with 1.5.10, feel free to open the issue.

SQL-RedUnited commented 1 year ago

@liprec The update has fixed it for us. Thank you.

rajesh-g84 commented 1 year ago

Thanks @liprec for the quick turnaround. The deployment is working now.