Azure-functions-core-tools: [cli] deploy internalservererror

Created on 16 Jan 2018  路  16Comments  路  Source: Azure/azure-functions-core-tools

_From @micahasmith on November 1, 2017 17:10_

Investigative information

Please provide the following:

  • Timestamp:
  • Function App version (1.0 or 2.0-beta):
  • Function App name: gooten-slothy
  • Function name(s) (as appropriate):
  • Invocation ID:
  • Region: east us

Repro steps

func azure functionapp publish gooten-slothy

Expected behavior

uploads server funcs

Actual behavior

Provide a description of the actual behavior observed.

Publish /Users/micahsmith/printio/gooten-slothy contents to an Azure Function App. Locally deleted files are not removed from destination.
Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).
Retry: 1 of 2
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).
Retry: 2 of 2
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).

_Copied from original issue: Azure/azure-webjobs-sdk-script#2090_

Most helpful comment

If someone is still experiencing this issue after trying solutions above, I resolved it by deleting my node_modules folder and package-lock.json before publishing function app (I didn't have to stop my app).

All 16 comments

@micahasmith - do you have a sample of your project you can share? Is it Node.js based? If so, can you share your package.json?

_From @micahasmith on November 1, 2017 18:17_

@christopheranderson the function app name is above, you're more than welcome to jump into the codebase.

{
  "name": "gooten-slothy",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "directories": {
    "test": "test"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "request": "^2.83.0",
    "sequelize": "^4.20.3",
    "tedious": "^2.0.1"
  }
}

I'm also getting exactly the same error.

I am experiencing this with a pre-compiled .dll function app. One workaround I found is deleting every function in the app and then stopping the app... which is not ideal.

EDIT: yeah nevermind... deploying worked, but now all my functions return 404

Also seeing lots of InternalServerError (sometimes BadGateway) but occasionally publish does work...

Using nodejs with beta runtime and have set WEBSITE_NODE_DEFAULT_VERSION to 8.9.4, location West Europe
package.json:

{
  "name": "vpcpoc",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "node-fetch": "^2.0.0",
    "tedious": "^2.3.1"
  }
}

Any news on this?

I have same issue with latest version. Code is actually deployed, but the tool seems to still fail.

Azure Functions Core Tools (2.0.1-beta.23)
Function Runtime Version: 2.0.11587.0
...
Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).
Retry: 1 of 2
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).
Retry: 2 of 2
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).

Having the same issue.

same issue here at my end.

Azure Functions Core Tools (2.0.1-beta.24)
Function Runtime Version: 2.0.11587.0

Getting site publishing info...
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).
Retry: 1 of 2
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).
Retry: 2 of 2
Creating archive for current directory...
Uploading archive...
Error uploading archive (InternalServerError).

I have extensions for CosmosDB installed
(func extensions install --package Microsoft.Azure.WebJobs.Extensions.CosmosDB --version 3.0.0-beta6)

code gets deployed despite of the error message but local settings are not pushed to the function app
when using --publish-local-settings -i --overwrite-settings -y

This is a very basic scenario and still it does not work. I get the same error for most of the times, cannot re-deploy existing functions.

Workaround that works for me:

  1. Stop function in Azure Portal
  2. Deploy
  3. Start function in Azure Portal

Been having this issue for multiple days now. In addition to having this issue, also the deploy itself takes much longer than usual (from less than a minute to multiple minutes). Is there any more information available on this?

For those having this issue, I recommend not using the "func azure publish" cli command to deploy your app. I would switch to a deployment option (ie git local or bitbucket) for your deployment. The problem seems to be around func copying the node_modules directory. Using git to deploy will ignore that directory (as long as node_modules is included in your .gitignore).

Also having this problem while deploying from a Mac. Stopping the the function app in the portal usually allows me to deploy. It's a bummer to have to stop the app to deploy.

If someone is still experiencing this issue after trying solutions above, I resolved it by deleting my node_modules folder and package-lock.json before publishing function app (I didn't have to stop my app).

I'm seeing similar issues with a python v2 function. See: https://github.com/Azure/azure-functions-core-tools/issues/903#issuecomment-479046454

Also having this problem while deploying from a Mac. Stopping the the function app in the portal usually allows me to deploy. It's a bummer to have to stop the app to deploy.

I am having similar issue deploying from Mac as well. This is functions using python. I tried stopping the functions and then deploying but that just takes forever. When I start it from portal and run the deploy, get the 'Bad gateway' error

Error uploading archive (BadGateway).

if you have other suggestions, please let me know

Closing as stale, deployment scenarios have been validated
please open a new issue with details if you see any new problems

Was this page helpful?
0 / 5 - 0 ratings