Powershell Set-AzDataLakeStoreItemAclEntry Error occured while sending the request - azure

Trying to execute the following command in Powershell ISE
Set-AzDataLakeStoreItemAclEntry -Account "********" -Path "/raw2" -AceType Group -Id "******************" -Permissions All
I only have the Az module installed, no Rm
But I get the following error, any suggestions?
Set-AzDataLakeStoreItemAclEntry : Error in modifying ACL entries group:************:rwx for path /raw2.
Operation: MODIFYACLENTRIES failed with Unknown Error: An error occurred while sending the request. Source: mscorlib StackTrace: at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.DataLake.Store.WebTransport.<MakeSingleCallAsync>d__20.MoveNext().
.
Last encountered exception thrown after 5 tries. [An error occurred while sending the request.,An error occurred while sending the request.,An error occurred while sending the request.,An
error occurred while sending the request.,An error occurred while sending the request.]
[ServerRequestId:]
At line:1 char:1
+ Set-AzDataLakeStoreItemAclEntry -Account "**********" -Path "/raw2 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzDataLakeStoreItemAclEntry], AdlsException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeStore.SetAzureDataLakeStoreItemAclEntry

Related

Azure Function - Connect-MSolservice error

Today, I've created an Azure Function to connect to Office365.
This is the code, which it works on my PC:
#Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
#Import-Module AzureAD -UseWindowsPowershell
Import-Module MSonline -UseWindowsPowershell -Force
$PWord = ConvertTo-SecureString –String "MyPass" –AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList "MyTenantAdmin", $PWord
#Connect-AzureAD -credential $Credential
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Connect-MSolService -credential $Credential
However, when I try it on the Azure Function, I obtain this error:
2022-12-28T20:45:09Z [Error] ERROR: Authentication Error: Unable
to complete authentication request (potentially a proxy issue)
OriginInfo : localhost Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Exception: Authentication Error: Unable to complete authentication request (potentially a proxy
issue) --->
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: User
realm discovery failed
at Microsoft.Identity.Core.WsTrust.CommonNonInteractiveHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\WsTrust\CommonNonInteractiveHandler.cs:line
74
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenUsernamePasswordHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\NonInteractive\AcquireTokenUsernamePasswordHandler.cs:line
77
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.d__60.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\AcquireTokenHandlerBase.cs:line
241
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.d__39.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\AuthenticationContext.cs:line
542
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.d__0.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Features\WinCommon\AuthenticationContextIntegratedAuthExtensions.cs:line
59
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.Online.Administration.Automation.CommonFiles.AuthManager.AuthenticateUser(AuthenticationContext
ac, PSCredential cred) in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs:line
115
--- End of inner exception stack trace ---
at Microsoft.Online.Administration.Automation.CommonFiles.AuthManager.ProcessADALException(AdalException
aeGeneral, AuthenticationContext ac, IDictionary`2 accessTokens) in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs:line
529
at Microsoft.Online.Administration.Automation.CommonFiles.AuthManager.AuthenticateUser(AuthenticationContext
ac, PSCredential cred) in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs:line
136
at Microsoft.Online.Administration.Automation.ConnectMsolService.MsolCmdletProcessRecord()
in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\Cmdlets\Connect-Service.cs:line
247
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Exception: Authentication Error: Unable to complete authentication request
(potentially a proxy issue) --->
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: User
realm discovery failed
at Microsoft.Identity.Core.WsTrust.CommonNonInteractiveHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\WsTrust\CommonNonInteractiveHandler.cs:line
74
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenUsernamePasswordHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\NonInteractive\AcquireTokenUsernamePasswordHandler.cs:line
77
--- End of stack trace from previous location where exception was thrown ---
The user has not MFA enabled.
Enable "System assigned identity" under Identity in Function App to register with AzureAD when running insideAzure functions. It will then grant all permissions/scopes required to operate with AzureAD-related modules.
To run connect-MsolService, MsOnline(Connecting to 365) module needs to be added in requirements.psd1 under App files in Azure functions. comes under Azure Acitve directory Module.
check the version compatibility for Msonline & Powershell
Add 64 bit version installer to handle binaries for the online office 365 modules.
FunctionApp -> Settings -> Configuration:
After checking all the above conditions try executing the same script to connect Msolservice.
Other approach:
As detailed in the article, I created a triggered function and connected to MsolService (office 365) with FTP hostname.
Function Properities in Portal:
Install Msoline module in local folder and deploy it to azure. Add username & password credentials in local path and mention that path in script to get the encrypted values.
FunctionApp -> Configuration -> Application settings:
Script:
param($Request, $TriggerMetadata)
$ModuleName = 'MSOnline'
$ModuleVersion = '1.1.*'
$user = $Env:user
$pword = $Env:pword
$path = "C:xxxx"
Import-module $ModuleName
$pWord = ConvertTo-SecureString –String $pword –AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $user, $pWord
Connect-MsolService -Credential $credential
Got successful response as shown:
Monitor Log check:

spring-integration-smb : jcifs.smb.SmbException: The parameter is incorrect while connect to NAS

I encountered a problem when connecting to a NAS shared directory using spring-integration-smb.
The problem is that I was able to connect to another shared Nas directory but for the pre-prod Nas, I encountered this problem.
Also, the shared server administrator confirmed that both directories have the same configuration.
You will find below the stack encountered
07 mars 2022;14:49:50.702 [scheduling-1] WARN jcifs.smb.SmbTransportImpl - Disconnecting transport while still in use Transport12[NAS03/XXXXXXXX:445,state=5,signingEnforced=false,usage=1]: [SmbSession[credentials=XXXXXXXXXX,targetHost=nas03,targetDomain=null,uid=0,connectionState=2,usage=1]]
07 mars 2022;14:49:50.702 [scheduling-1] WARN jcifs.smb.SmbSessionImpl - Logging off session while still in use SmbSession[credentials=XXXXXXXXX,targetHost=nas03,targetDomain=null,uid=0,connectionState=3,usage=1]:[SmbTree[share=PPD,service=null,tid=4,inDfs=false,inDomainDfs=false,connectionState=0,usage=2]]
07 mars 2022;14:49:50.737 [scheduling-1] ERROR o.s.i.handler.LoggingHandler - org.springframework.messaging.MessagingException: Problem occurred while synchronizing '' to local directory; nested exception is org.springframework.messaging.MessagingException: Failure occurred while copying '/test.csv' from the remote to the local directory; nested exception is org.springframework.core.NestedIOException: Failed to read resource [/test.csv].; nested exception is jcifs.smb.SmbException: The parameter is incorrect.
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:348)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:267)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:69)
at org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource.doReceive(AbstractFetchLimitingMessageSource.java:47)
at org.springframework.integration.endpoint.AbstractMessageSource.receive(AbstractMessageSource.java:142)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:212)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:444)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:413)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$4(AbstractPollingEndpoint.java:348)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:55)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$5(AbstractPollingEndpoint.java:341)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.messaging.MessagingException: Failure occurred while copying '/BE1_2_MOUVEMENTS_Valorisation_20211231_20220218_164451.csv' from the remote to the local directory; nested exception is org.springframework.core.NestedIOException: Failed to read resource [/BE1_2_MOUVEMENTS_Valorisation_20211231_20220218_164451.csv].; nested exception is jcifs.smb.SmbException: The parameter is incorrect.
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyRemoteContentToLocalFile(AbstractInboundFileSynchronizer.java:551)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyFileToLocalDirectory(AbstractInboundFileSynchronizer.java:488)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyIfNotNull(AbstractInboundFileSynchronizer.java:403)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.transferFilesFromRemoteToLocal(AbstractInboundFileSynchronizer.java:386)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.lambda$synchronizeToLocalDirectory$0(AbstractInboundFileSynchronizer.java:342)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:452)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:341)
... 21 more
Caused by: org.springframework.core.NestedIOException: Failed to read resource [/BE1_2_MOUVEMENTS_Valorisation_20211231_20220218_164451.csv].; nested exception is jcifs.smb.SmbException: The parameter is incorrect.
at org.springframework.integration.smb.session.SmbSession.read(SmbSession.java:188)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyRemoteContentToLocalFile(AbstractInboundFileSynchronizer.java:545)
... 27 more
Caused by: jcifs.smb.SmbException: The parameter is incorrect.
at jcifs.smb.SmbTransportImpl.checkStatus2(SmbTransportImpl.java:1467)
at jcifs.smb.SmbTransportImpl.checkStatus(SmbTransportImpl.java:1578)
at jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1027)
at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1549)
at jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:409)
at jcifs.smb.SmbTreeImpl.send(SmbTreeImpl.java:472)
at jcifs.smb.SmbTreeConnection.send0(SmbTreeConnection.java:404)
at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:318)
at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:298)
at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:130)
at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:117)
at jcifs.smb.SmbFile.withOpen(SmbFile.java:1775)
at jcifs.smb.SmbFile.withOpen(SmbFile.java:1744)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:793)
at jcifs.smb.SmbFile.exists(SmbFile.java:879)
at jcifs.smb.SmbFile.isFile(SmbFile.java:1102)
at org.springframework.integration.smb.session.SmbSession.read(SmbSession.java:182)
... 28 more
here is my code :
#Bean
public SmbSessionFactory smbSessionFactory() {
VaultResponse vaultResponse = vaultTemplate
.opsForKeyValue(vaultPath, VaultKeyValueOperationsSupport.KeyValueBackend.KV_2).get(vaultSecretsPath.toLowerCase());
SmbSessionFactory smbSession = new SmbSessionFactory();
smbSession.setHost(properties.getNasHost());
smbSession.setPort(properties.getNasPort());
smbSession.setDomain(properties.getNasDomain());
if (vaultResponse != null) {
Map<String, Object> data = vaultResponse.getData();
smbSession.setUsername(data != null && data.get("nasUsername") != null ? (String) data.get("nasUsername") : "");
smbSession.setPassword(data != null && data.get("nasPassword") != null ? (String) data.get("nasPassword") : "");
}
smbSession.setShareAndDir(properties.getNasShareAndDir());
smbSession.setReplaceFile(true);
smbSession.setSmbMinVersion(DialectVersion.SMB1);
smbSession.setSmbMaxVersion(DialectVersion.SMB311);
return smbSession;
}
thank you in advance,

Azure - use visual studio AzureRM module script to deploy web app failed

According to the documentation https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/create-visual-studio-deployment-project, everything seems ok. The Azure resources are deployed. But at the last step, when the package.zip is uploaded to the web app, it failed. However, the package.zip is uploaded to the blob successfully. Looks like package.zip cannot be downloaded.
Struggled and tried many times but failed. Anyone can help?
The entire error is as below:
16:26:10 - New-AzureRmResourceGroupDeployment : 4:26:10 PM - Resource Microsoft.Web/sites/extensions
16:26:10 - 'webSiteqx6gdnwigzamg/MSDeploy' failed with message '{
16:26:10 - "status": "failed",
16:26:10 - "error": {
16:26:10 - "code": "ResourceDeploymentFailure",
16:26:10 - "message": "The resource operation completed with terminal provisioning state 'failed'.",
16:26:10 - "details": [
16:26:10 - {
16:26:10 - "code": "Failed",
16:26:10 - "message": "Failed to download package.\r\nARM-MSDeploy Deploy Failed: 'System.AggregateException: One or more
16:26:10 - errors occurred. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at
16:26:10 - System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at
16:26:10 - System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n at
16:26:10 - System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)\r\n --- End of inner exception stack trace
16:26:10 - ---\r\n at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at
16:26:10 - System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n at
16:26:10 - System.Threading.Tasks.Task.Wait(TimeSpan timeout)\r\n at
16:26:10 - Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__13.MoveNext()\r\n--- End of stack trace from
16:26:10 - previous location where exception was thrown ---\r\n at
16:26:10 - System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at
16:26:10 - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at
16:26:10 - Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__11.MoveNext()\r\n--- End of stack trace from
16:26:10 - previous location where exception was thrown ---\r\n at
16:26:10 - System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at
16:26:10 - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at
16:26:10 - Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__26.MoveNext()\r\n--- End of
16:26:10 - stack trace from previous location where exception was thrown ---\r\n at
16:26:10 - System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at
16:26:10 - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at
16:26:10 - Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext()\r\n--->
16:26:10 - (Inner Exception #0) System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at
16:26:10 - System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at
16:26:10 - System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n at
16:26:10 - System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---\r\n'"
16:26:10 - }
16:26:10 - ]
16:26:10 - }
16:26:10 - }'
16:26:10 - At D:\source\project\luxu_source\energysolution\DeepMCDeploy\bin\Debug\staging\DeepMCDeploy\Deploy-AzureResourceGroup.p
16:26:10 - s1:110 char:5
16:26:10 - + New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ...
16:26:10 - + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16:26:10 - + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
16:26:10 - + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
16:26:10 - loymentCmdlet
16:26:10 -
16:26:10 - New-AzureRmResourceGroupDeployment : 4:26:10 PM - Failed to download package.
16:26:10 - ARM-MSDeploy Deploy Failed: 'System.AggregateException: One or more errors occurred. ---> System.Net.WebException:
16:26:10 - The remote server returned an error: (404) Not Found.
16:26:10 - at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
16:26:10 - at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
16:26:10 - at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
16:26:10 - --- End of inner exception stack trace ---
16:26:10 - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
16:26:10 - at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
16:26:10 - at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
16:26:10 - at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__13.MoveNext()
16:26:10 - --- End of stack trace from previous location where exception was thrown ---
16:26:10 - at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:26:10 - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:26:10 - at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__11.MoveNext()
16:26:10 - --- End of stack trace from previous location where exception was thrown ---
16:26:10 - at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:26:10 - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:26:10 - at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__26.MoveNext()
16:26:10 - --- End of stack trace from previous location where exception was thrown ---
16:26:10 - at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:26:10 - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:26:10 - at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext()
16:26:10 - ---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (404) Not Found.
16:26:10 - at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
16:26:10 - at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
16:26:10 - at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---
16:26:10 - '
16:26:10 - At D:\source\project\luxu_source\energysolution\DeepMCDeploy\bin\Debug\staging\DeepMCDeploy\Deploy-AzureResourceGroup.p
16:26:10 - s1:110 char:5
16:26:10 - + New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ...
16:26:10 - + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16:26:10 - + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
16:26:10 - + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
16:26:10 - loymentCmdlet
16:26:10 -
16:26:10 - New-AzureRmResourceGroupDeployment : 4:26:10 PM - Template output evaluation skipped: at least one resource deployment
16:26:10 - operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage
16:26:10 - details.
16:26:10 - At D:\source\project\luxu_source\energysolution\DeepMCDeploy\bin\Debug\staging\DeepMCDeploy\Deploy-AzureResourceGroup.p
16:26:10 - s1:110 char:5
16:26:10 - + New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ...
16:26:10 - + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16:26:10 - + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
16:26:10 - + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
16:26:10 - loymentCmdlet
16:26:10 -
16:26:10 - New-AzureRmResourceGroupDeployment : 4:26:10 PM - Template output evaluation skipped: at least one resource deployment
16:26:10 - operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage
16:26:10 - details.
16:26:10 - At D:\source\project\luxu_source\energysolution\DeepMCDeploy\bin\Debug\staging\DeepMCDeploy\Deploy-AzureResourceGroup.p
16:26:10 - s1:110 char:5
16:26:10 - + New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ...
16:26:10 - + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16:26:10 - + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
16:26:10 - + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
16:26:10 - loymentCmdlet
16:26:10 -
16:26:11 -
16:26:11 - DeploymentName : website-0421-0824
16:26:11 - CorrelationId : 31181e33-d16c-48e6-8c14-3880ce240036
16:26:11 - ResourceGroupName : energysolutionRG
16:26:11 - ProvisioningState : Failed
16:26:11 - Timestamp : 4/21/2021 8:26:09 AM
16:26:11 - Mode : Incremental
16:26:11 - TemplateLink :
16:26:11 - TemplateLinkString :
16:26:11 - DeploymentDebugLogLevel :
16:26:11 - Parameters : {[hostingPlanName,
16:26:11 - Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.DeploymentVariable], [skuName,
16:26:11 - Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.DeploymentVariable],
16:26:11 - [skuCapacity,
16:26:11 - Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.DeploymentVariable], [energyType,
16:26:11 - Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.DeploymentVariable]...}
16:26:11 - ParametersString :
16:26:11 - Name Type Value
16:26:11 - =============== ========================= ==========
16:26:11 - hostingPlanName String DeepMCPlan
16:26:11 - skuName String S1
16:26:11 - skuCapacity Int 1
16:26:11 - energyType String Standard_LRS
16:26:11 - _artifactsLocation String
16:26:11 - https://energyqx6gdnwigzamg.blob.core.windows.net/energysolutionrg-stageartifacts/
16:26:11 - _artifactsLocationSasToken SecureString
16:26:11 - webApplication1PackageFolder String WebApplication1
16:26:11 - webApplication1PackageFileName String package.zip
16:26:11 -
16:26:11 - Outputs :
16:26:11 - OutputsString :
16:26:11 -
16:26:12 -
16:26:12 - Template deployment returned the following errors:
16:26:12 - 4:26:10 PM - Resource Microsoft.Web/sites/extensions 'webSiteqx6gdnwigzamg/MSDeploy' failed with message '{
16:26:12 - "status": "failed",
16:26:12 - "error": {
16:26:12 - "code": "ResourceDeploymentFailure",
16:26:12 - "message": "The resource operation completed with terminal provisioning state 'failed'.",
16:26:12 - "details": [
16:26:12 - {
16:26:12 - "code": "Failed",
16:26:12 - "message": "Failed to download package.\r\nARM-MSDeploy Deploy Failed: 'System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)\r\n --- End of inner exception stack trace ---\r\n at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n at System.Threading.Tasks.Task.Wait(TimeSpan timeout)\r\n at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__11.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__26.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext()\r\n---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (404) Not Found.\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---\r\n'"
16:26:12 - }
16:26:12 - ]
16:26:12 - }
16:26:12 - }'
16:26:12 - 4:26:10 PM - Failed to download package.
16:26:12 - ARM-MSDeploy Deploy Failed: 'System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
16:26:12 - at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
16:26:12 - at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
16:26:12 - at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
16:26:12 - --- End of inner exception stack trace ---
16:26:12 - at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
16:26:12 - at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
16:26:12 - at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
16:26:12 - at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__13.MoveNext()
16:26:12 - --- End of stack trace from previous location where exception was thrown ---
16:26:12 - at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:26:12 - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:26:12 - at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__11.MoveNext()
16:26:12 - --- End of stack trace from previous location where exception was thrown ---
16:26:12 - at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:26:12 - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:26:12 - at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__26.MoveNext()
16:26:12 - --- End of stack trace from previous location where exception was thrown ---
16:26:12 - at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:26:12 - at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:26:12 - at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext()
16:26:12 - ---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (404) Not Found.
16:26:12 - at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
16:26:12 - at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
16:26:12 - at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---
16:26:12 - '
16:26:12 - 4:26:10 PM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
16:26:12 - 4:26:10 PM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
16:26:12 -
16:26:12 -
16:26:12 - Deploying template using PowerShell script failed.
16:26:12 - Tell us about your experience at https://go.microsoft.com/fwlink/?LinkId=691202

Error creating vCore-based Elastic Pool using Powershell on Azure

I have already created the server and I am using the following code:
New-AzureRmSqlElasticPool -ResourceGroupName $resourcegroupname -ServerName $servername -ElasticPoolName "ElasticPool071" -VCore 1 -Edition "GeneralPurpose" -ComputeGeneration "Gen5" -InformationVariable ee -debug -ErrorVariable ErrorMessages
the ouput I am recieving is>>
Set-AzureRmSqlElasticPool : An unexpected error occured while processing the request. Tracking ID: 'a2936090-e7af-4203-be1c-9425932055f3'
At line:1 char:2
+ Set-AzureRmSqlElasticPool -ResourceGroupName $resourcegroupname -Se ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmSqlElasticPool], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool
DEBUG: AzureQoSEvent: CommandName - Set-AzureRmSqlElasticPool; IsSuccess - False; Duration - 00:00:26.8490006; Exception - Microsoft.Rest.Azure.CloudException: An unexpected error occured while processing the request. Tracking ID: 'a2936090-e7af-
4203-be1c-9425932055f3'
at Microsoft.Azure.Management.Sql.ElasticPoolsOperations.<BeginUpdateWithHttpMessagesAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperations.<UpdateWithHttpMessagesAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperationsExtensions.<UpdateAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperationsExtensions.Update(IElasticPoolsOperations operations, String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters)
at Microsoft.Azure.Commands.Sql.ElasticPool.Services.AzureSqlElasticPoolAdapter.UpsertElasticPool(AzureSqlElasticPoolModel model)
at Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool.PersistChanges(IEnumerable`1 entity)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.<>c__DisplayClass16_0.<ExecuteCmdlet>b__0()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(String processMessage, String target, Action action)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
Could you please help!?
For Gen 5 Compute Generation, you must allocate a minimum of 2 vCores. For Gen 4 you can allocate 1 vCore.
Azure SQL Database vCore-based purchasing model limits for elastic pools
SQL Database pricing options

Error while executing Start-AzureSqlDatabaseImport

We get the following error while executing Start-AzureSqlDatabaseImport.SQL server firewall rule is configured properly.Container is with Public access.
Error is thrown at this line: Start-AzureSqlDatabaseImport -SqlConnectionContext $SqlCtx -StorageContainer $Container -DatabaseName $DbName -BlobName $BlobName -ErrorAction Stop
Start-AzureSqlDatabaseImport : An error occurred while making the HTTP request to https://management.core.windows.net/subscriptionid/services/sqlservers/servers/sqlservername/DacOperations/Import. This could be due to the fact that the server
certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security
binding between the client and the server.
At C:\Azure\PowerShellScripts\ImportDB.ps1:13 char:1
+ Start-AzureSqlDatabaseImport -SqlConnectionContext $SqlCtx -StorageContainer $Co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureSqlDatabaseImport], CommunicationException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseImport

Resources