Unable to publish the Azure Function - deployment

I have developed the Azure Function App One year back and published successfully and it's running. Now I have made a changes on functionality which is build succeed.
When I am publishing it's throwing error unable to publish.
I went through the path which showing screen shot showing below error.
14-09-2020 10.49.31 PM
System.AggregateException: One or more errors occurred. --->
System.Exception: Publish has encountered an error. We were unable to
determine the cause of the error. Check the output log for more
details. --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: Publish has encountered an error. We were unable to determine the cause of the error. Check the
output log for more details. <---
System.Exception: Publish has encountered an error. We were unable to
determine the cause of the error. Check the output log for more
details.
===================
I am unable to figure out the error here. Any one help on this?

I think you shouldn't stop because of this. And for the error you give us we can not get anything useful from it.
You just need to use another way to deploy. And it will give you the details error if it has any error.(Although I say it is another way, in fact they are essentially the same. VS Studio is actually performing packaging and running commands when you try to publish the azure function.)
Just do the following steps:
1, create the function app on azure.
2, build your function app on local.
3, Go to the compiled folder on local, and zip the content:
4, install the Azure CLI, then run az login.
5, cd to the compiled folder, then run below command:
az webapp deployment source config-zip --resource-group yourresourcegroupnameonazure --name yourfunctionappnameonazure --src xxx.zip
After above steps, everything will be ok. This is the offcial doc:
https://learn.microsoft.com/en-us/azure/app-service/deploy-zip

I've seen similar errors in two cases: locked files and previously deployment executed by DevOps pipelines. I don't know if it applies in your case. In both cases, you have to modify your Azure Functions settings on portal:
case 1 : add MSDEPLOY_RENAME_LOCKED_FILES = 1
case 2 : remove WEBSITE_RUN_FROM_PACKAGE = 1

Related

Not able to install library on Azure databricks cluster

So, while validating the pipeline created in azure data factory.
I am facing this issue while running azure databricks linked service.
Error details:
Run result unavailable: job failed with error message Library installation failed for library due to user error for jar: "dbfs:/mnt/mopireport/TeamsAnalyticsCore-v9.jar" . Error messages: Library installation attempted on the driver node of cluster 0805-090147-ulpmkivi and failed. Please refer to the following error message to fix the library or contact Databricks support. Error Code: DRIVER_LIBRARY_INSTALLATION_FAILURE. Error Message: java.lang.Throwable: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: com.microsoft.azure.storage.StorageException: This request is not authorized to perform this operation using this resource type.
Background:
This library is mounted to dbfs url (verified the mount is success)
Databricks is pointing to right cluster (verified)
I have permissions to edit and publish data pipeline in ADF.
Alternate tried:
I tried using adfss instead of wasbs for mounting, but wasbs is the right one. As it does and adfss gives error.
Directly goto cluster -> libraries -> install new -> select "DBFS/ADLS" as library source and type as JAR and try upload. this upload also fails with same message as above.

Scala- Conscript - "An unexpected error occurred: Please check your internet connection"

Context: I'd like to install conscript and giter8 so that I can more efficiently create and work with Scalatra project files. I've followed the instructions here and here to download and run the jar. When I do so I get the following error. I get the same error when running the Powershell script. While I am on a private network, my internet connection is fine. And when I follow the location in the exception message I hit a strange page which looks like a list of Github directories - not sure what to do with that.
"An unexpected error occurred: Please check your internet connection.
Exception message: https://api.github.com/repos/foundweekends/conscript/git/refs/"
Question: Can someone please let me know what I'm doing wrong? And explain how I can get conscript up and running properly?
UPDATE: running the jar still is not working but I re-tried running the powershell script and that does look like it was able to successfully install conscript. When I cd into the .conscript\bin directory and run cs foundweekends/giter8 I'm still getting this strange error which indicates to me either conscript or giter8 is still not up and running correctly.
c:\Users\e.b\.conscript\bin>cs foundweekends/giter8
An unexpected error occurred: Please check your internet connection.
Exception message:
https://api.github.com/repos/foundweekends/giter8/git/refs/heads/master
c:\Users\e.b\.conscript\bin>
When I navigate to the URL provided I then get a message that reads.
{ "message": "Not Found", "documentation_url":
"https://docs.github.com/rest" }
I found some additional documentation that seems to resolve the issue: http://www.foundweekends.org/giter8/
When I run cmd and execute sbt new scala/scala-seed.g8 I'm able to successfully setup Scalatra templates.

Invalid permissions after setting gcloud caching use_kaniko?

I encountered a strange permissions error while building Docker images on the cloud. I switched to another machine, installed Gcloud, did gcloud init and everything worked again.
However, I noticed while building images, it took much longer because I didn't enable kaniko cache (which I figured out from this post: gcloud rebuilds complete container but Dockerfile is the same, only the script has changed)
After enabling this feature, I tried to rebuild my last image and bam, the same error message:
Status: Downloaded newer image for gcr.io/kaniko-project/executor:latest
gcr.io/kaniko-project/executor:latest
error checking push permissions --
make sure you entered the correct tag name, and that you are authenticated correctly, and try again:
checking push permission for "eu.gcr.io/pipeline/tree-par": creating push check transport for eu.gcr.io failed:
GET https://eu.gcr.io/v2/token?scope=repository%3pipeline%2Ftree-par%3Apush%2Cpull&service=eu.gcr.io:
UNAUTHORIZED: You don't have the needed permissions to perform this operation, and you may have invalid credentials.
To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
ERROR
ERROR: build step 0 "gcr.io/kaniko-project/executor:latest" failed: step exited with non-zero status: 1
-------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.builds.submit) build bad4a9a4-054d-4ad7-991d-e5aeae039b7c completed with status "FAILURE"
Anyone any idea why this failed upon enabling the Kaniko cache? I hate to not use it because when it still worked, it really decreased the time it took to create docker images.
It seems that the issue comes from Kaniko's end.
Three days ago, on version v0.21.0, they added this fix:
Fix: GCR credential helper check does not respect DOCKER_CONFIG environment variable
Even after this release, 1 day later, this issue was reported where users saw a very similar Error message:
"[...] You don't have the needed permissions to perform this operation, and you may have invalid credentials[...] "
This was already fixed yesterday with the release of the v0.22.0 version. The suggested workaround is to execute the following command:
gcr.io/kaniko-project/executor:v0.22.0
I would suggest use that command instead of executor:latest to "force" the use of the v0.22.0 version.
I hope this is helpful! :)

How can we implement CI/CD on Azure VMSS created using custom image

I have created VMSS using custom image. I have hosted web application build in .Net MVC on VMSS. I have configured CI/CD from Azure DevOps by referring following https://learn.microsoft.com/en-us/azure/devops/pipelines/apps/cd/azure/deploy-azure-scaleset?view=azure-devops .
It is showing error D:\a\_temp\1575277721063\packer\packer.exe failed with return code: 1 . Any suggestion/recommendation is appreciated.
Below is some failed commands in Log:
1. azure-arm: resources.DeploymentsClient#CreateOrUpdate: Failure sending request: StatusCode=200 -- Original Error: Long running operation terminated with status 'Failed': Code="DeploymentFailed" Message="At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details."
2. Some builds didn't complete successfully and had errors:
2019-12-02T09:57:31.5222618Z --> azure-arm: resources.DeploymentsClient#CreateOrUpdate: Failure sending request: StatusCode=200 -- Original Error: Long running operation terminated with status 'Failed': Code="DeploymentFailed" Message="At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details."
3. 2019-12-02T09:57:31.5222868Z ==> Builds finished but no artifacts were created.
Since the error message (DeploymentFailed) from the pipeline is a generic one, it would be tough to investigate the issue without looking at the underlying logs or your pipeline details.
For troubleshooting it further, please try the following:
View deployment history with Azure Resource Manager as mentioned in the error message itself.
Gather logs to diagnose problems, such as debug/verbose pipeline logs, worker/agent diagnostics logs etc..
Look at some common issues and resolutions if it helps.
Send feedback and report problems through the Developer Community for Azure DevOps.

error during deployment plan generation

I'm trying to use a deployment contributor to dynamically prevent the deployment of some schema's. I've resolved several errors regarding loading the component: 'AdditionalDeploymentContributors' is not a valid argument for the 'Publish' action
And it seems to load now, but during execution it still encounters an error:
*** An error occurred during deployment plan generation. Deployment cannot continue.
Error SQL0: Required contributor with id 'AgileSqlClub.DeploymentFilterContributor' could not be loaded.
So the deployment contributor fails and therefore the whole thing can't be loaded.
I've tried to find this error in the source code and just the internet, but only this one and it's about Azure:
An error occurred during deployment plan generation. Deployment cannot continue
Filter:
SqlPackageFilter0=IgnoreSchema(nl)
Any idea's on what's going wrong?
I had the same error
*** An error occurred during deployment plan generation. Deployment cannot continue.
Error SQL0: Required contributor with id
'AgileSqlClub.DeploymentFilterContributor' could not be loaded.
while using DAC 120 with 1.4.4.0 version of AgileSqlClub.SqlPackageFilter (directly clone from github).
After several attempts, the solution for my case is to install DacFx 17.1 which (DAC 140) finally seems to match the version of SqlPackageFilter I'm using.