Azure Function is failing with Error: connect EACCES 127.0.0.1:80

Category: azure functions

Question

Diego Landa on Thu, 04 Oct 2018 23:10:57


After a deploy from Bitbucket this function started failing. No changes were made to the function that is failing. But to another function of the Funtion App. Below is an output. 

This functions connects to Azure Storage to update file metadata and gets called for every new file detected. This was working normally before

2018-10-04T21:20:37.129 [Information] Host Status: {
  "id": "fm-lh-ms-azure-search-develop",
  "state": "Running",
  "version": "2.0.12115.0",
  "versionDetails": "2.0.12115.0 Commit hash: 0653fccdd40e32327dca87f712848b14565b2e9c"
}
2018-10-04T21:20:39.055 [Information] Executing 'Functions.upsert_strategy' (Reason='This function was programmatically called via the host APIs.', Id=c3ca6fea-e17a-4c4c-8d5c-464cab7de43e)
2018-10-04T21:20:39.118 [Information] Upserting cognitive skills...
2018-10-04T21:20:39.127 [Information] Executing step 1
2018-10-04T21:20:39.855 [Information] Datasource deletion ended with status 204.
2018-10-04T21:20:40.187 [Information] Host lock lease acquired by instance ID 'f660d763aba528e832e0b93a7c29d03c'.
2018-10-04T21:20:40.291 [Information] Datasource created.
2018-10-04T21:20:40.295 [Information] Step 1)  succeded.
2018-10-04T21:20:40.295 [Information] Executing step 2
2018-10-04T21:20:42.195 [Information] Skillset deletion ended with status 204.
2018-10-04T21:20:42.904 [Information] skillset created.
2018-10-04T21:20:42.905 [Information] Step 2)  succeded.
2018-10-04T21:20:42.905 [Information] Executing step 3
2018-10-04T21:20:44.606 [Information] Index deletion ended with status 204.
2018-10-04T21:20:46.034 [Information] Index created.
2018-10-04T21:20:46.040 [Information] Step 3)  succeded.
2018-10-04T21:20:46.040 [Information] Executing step 4
2018-10-04T21:20:46.437 [Information] Indexer deletion ended with status 204.
2018-10-04T21:21:57.550 [Information] Indexer created.
2018-10-04T21:21:57.551 [Information] Step 4)  succeded.
2018-10-04T21:21:57.551 [Information] Upserting cognitive skills finished...
2018-10-04T21:21:57.553 [Information] Executed 'Functions.upsert_strategy' (Succeeded, Id=c3ca6fea-e17a-4c4c-8d5c-464cab7de43e)
2018-10-04T21:24:12.323 [Information] Executing 'Functions.extract_client_cognitive_skill' (Reason='This function was programmatically called via the host APIs.', Id=cb79995e-848b-42f5-b6a6-6626e18e1b0e)
2018-10-04T21:24:13.046 [Information] Executed 'Functions.extract_client_cognitive_skill' (Succeeded, Id=cb79995e-848b-42f5-b6a6-6626e18e1b0e)
2018-10-04T21:24:13.251 [Information] Executing 'Functions.extract_matter_cognitive_skill' (Reason='This function was programmatically called via the host APIs.', Id=e689b3f3-fcc5-46b1-ae73-5b1b1cf99c77)
2018-10-04T21:24:13.892 [Information] (node:4216) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
2018-10-04T21:24:13.892 [Information] at JSON.stringify (<anonymous>)
2018-10-04T21:24:13.892 [Information] at toTypedData (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:23337:29)
2018-10-04T21:24:13.892 [Information] at Object.toRpcHttp [as converter] (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:23284:24)
2018-10-04T21:24:13.892 [Information] at response.outputData.Object.keys.filter.map.key (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:28829:56)
2018-10-04T21:24:13.892 [Information] at Array.map (<anonymous>)
2018-10-04T21:24:13.892 [Information] at resultCallback (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:28827:26)
2018-10-04T21:24:13.892 [Information] at Context.done (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:30514:13)
2018-10-04T21:24:13.892 [Information] at InternalServerError (D:\home\site\wwwroot\extract_matter_cognitive_skill\responses.js:14:18)
2018-10-04T21:24:13.892 [Information] at startMatterMatch (D:\home\site\wwwroot\extract_matter_cognitive_skill\index.js:30:14)
2018-10-04T21:24:13.892 [Information] at <anonymous>
2018-10-04T21:24:13.892 [Information] (node:4216) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
2018-10-04T21:24:13.892 [Information] (node:4216) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2018-10-04T21:24:13.898 [Information] Error: Error: connect EACCES 127.0.0.1:80
2018-10-04T21:27:08.421 [Information] Executing 'Functions.extract_client_cognitive_skill' (Reason='This function was programmatically called via the host APIs.', Id=2e2a9fc3-1aa4-4803-930e-e748aca89baa)
2018-10-04T21:27:08.772 [Information] Executed 'Functions.extract_client_cognitive_skill' (Succeeded, Id=2e2a9fc3-1aa4-4803-930e-e748aca89baa)
2018-10-04T21:27:08.981 [Information] Executing 'Functions.extract_matter_cognitive_skill' (Reason='This function was programmatically called via the host APIs.', Id=fd7b5bb0-0062-4331-8b41-14b89a2d4ad3)
2018-10-04T21:27:09.335 [Information] (node:4216) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
2018-10-04T21:27:09.335 [Information] at JSON.stringify (<anonymous>)
2018-10-04T21:27:09.335 [Information] at toTypedData (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:23337:29)
2018-10-04T21:27:09.335 [Information] at Object.toRpcHttp [as converter] (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:23284:24)
2018-10-04T21:27:09.335 [Information] at response.outputData.Object.keys.filter.map.key (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:28829:56)
2018-10-04T21:27:09.335 [Information] at Array.map (<anonymous>)
2018-10-04T21:27:09.335 [Information] at resultCallback (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:28827:26)
2018-10-04T21:27:09.335 [Information] at Context.done (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:30514:13)
2018-10-04T21:27:09.335 [Information] at InternalServerError (D:\home\site\wwwroot\extract_matter_cognitive_skill\responses.js:14:18)
2018-10-04T21:27:09.335 [Information] at startMatterMatch (D:\home\site\wwwroot\extract_matter_cognitive_skill\index.js:30:14)
2018-10-04T21:27:09.335 [Information] at <anonymous>
2018-10-04T21:27:09.335 [Information] (node:4216) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
2018-10-04T21:27:09.336 [Information] Error: Error: connect EACCES 127.0.0.1:80
2018-10-04T21:28:14.593 [Information] Executing 'Functions.extract_client_cognitive_skill' (Reason='This function was programmatically called via the host APIs.', Id=7966b003-a291-4b9b-a86f-5869bdddb33e)
2018-10-04T21:28:15.138 [Information] Executed 'Functions.extract_client_cognitive_skill' (Succeeded, Id=7966b003-a291-4b9b-a86f-5869bdddb33e)
2018-10-04T21:28:15.355 [Information] Executing 'Functions.extract_matter_cognitive_skill' (Reason='This function was programmatically called via the host APIs.', Id=631a8b3a-6ad4-4145-abdd-39755721bb33)
2018-10-04T21:28:15.873 [Information] (node:4216) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
2018-10-04T21:28:15.873 [Information] at JSON.stringify (<anonymous>)
2018-10-04T21:28:15.873 [Information] at toTypedData (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:23337:29)
2018-10-04T21:28:15.873 [Information] at Object.toRpcHttp [as converter] (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:23284:24)
2018-10-04T21:28:15.873 [Information] at response.outputData.Object.keys.filter.map.key (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:28829:56)
2018-10-04T21:28:15.873 [Information] at Array.map (<anonymous>)
2018-10-04T21:28:15.873 [Information] at resultCallback (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:28827:26)
2018-10-04T21:28:15.873 [Information] at Context.done (D:\Program Files (x86)\SiteExtensions\Functions\2.0.12115\32bit\workers\node\worker-bundle.js:30514:13)
2018-10-04T21:28:15.873 [Information] at InternalServerError (D:\home\site\wwwroot\extract_matter_cognitive_skill\responses.js:14:18)
2018-10-04T21:28:15.874 [Information] Error: Error: connect EACCES 127.0.0.1:80
2018-10-04T21:28:15.874 [Information] at startMatterMatch (D:\home\site\wwwroot\extract_matter_cognitive_skill\index.js:30:14)
2018-10-04T21:28:15.874 [Information] at <anonymous>
2018-10-04T21:28:15.874 [Information] (node:4216) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
2018-10-04T21:29:13.259 [Error] Timeout value of 00:05:00 exceeded by function 'Functions.extract_matter_cognitive_skill' (Id: 'e689b3f3-fcc5-46b1-ae73-5b1b1cf99c77'). Initiating cancellation.
2018-10-04T21:29:13.382 [Error] Executed 'Functions.extract_matter_cognitive_skill' (Failed, Id=e689b3f3-fcc5-46b1-ae73-5b1b1cf99c77)
2018-10-04T21:29:13.424 [Information] Stopping JobHost
2018-10-04T21:29:13.471 [Information] Job host stopped

Replies

robrien-MSFT on Fri, 05 Oct 2018 10:10:32


Can I ask, is your Azure Function part of a Consumption plan or App Service plan?  On a Consumption plan, there is a limit of 300 connections as mentioned in the following guide: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#per-sandbox-per-appper-site-numerical-limits

If your function uses more connections than this, then this could be causing this error for you. 

It's recommended that you have your function as part of an App Service plan which does not have this limitation.

Diego Landa on Tue, 09 Oct 2018 14:04:45


Thank you for your answer,

My Azure Function is on Consumption Plan, but is 300 parallel connections?  as the function failing is on a slot. The master one works fine only the slot is failing.

I don't think we are reaching 300 connections as currently is on closed/limited demo.

Mike Urnun (Azure) on Thu, 25 Oct 2018 00:09:17


Thank you for your answer,

My Azure Function is on Consumption Plan, but is 300 parallel connections?  as the function failing is on a slot. The master one works fine only the slot is failing.

I don't think we are reaching 300 connections as currently is on closed/limited demo.

Hi Diego - any updates on this? Were you able to verify exactly how many connections are being opened to rule out the possibility that robrien made above?