Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image dotnet-isolated #441

Open
lKoTl opened this issue Apr 29, 2021 · 6 comments
Open

Docker image dotnet-isolated #441

lKoTl opened this issue Apr 29, 2021 · 6 comments

Comments

@lKoTl
Copy link

lKoTl commented Apr 29, 2021

I'm using Functions as dotnet-isolated locally and it works fine.
I wish to host it with a docker container, so went straight to the dotnet-isolated images.

I have 2 Timer Trigger functions and 1 Queue Trigger function.

When using FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0 image I get missing compatible framework version and gRPC fails.

Host started (1559ms)
Job host started
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' was not found.
- No frameworks were found.
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=x64&rid=debian.10-x64

�=fail: Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher[0]
Exceeded language worker restart retry count for runtime:dotnet-isolated. Shutting down and proactively recycling the Functions Host to recover

Comparing the dotnet and dotnet-isolated:

dotnet dotnet-isolated Question
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 FROM mcr.microsoft.com/dotnet/runtime:5.0 Why isolated isn't using aspnet core runtime?

I hope to get some assistance with this.


UPDATE
I went installing aspnetcore-runtime-5.0 into the image manually, so the functions now are starting.

RUN wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb

RUN apt-get update -y \
  && apt-get install -y apt-transport-https \
  && apt-get update -y \
  && apt-get install -y aspnetcore-runtime-5.0

New issue that I'm hitting:

Host started (1475ms)
Job host started

Unhandled exception. Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="Error starting gRPC call. HttpRequestException: Connection refused (127.0.0.1:80) SocketException: Connection refused", DebugException="System.Net.Http.HttpRequestException: Connection refused (127.0.0.1:80)

Unhandled exception. Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: An error occurred while sending the request. Http2ConnectionException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1).", DebugException="System.Net.Http.HttpRequestException: An error occurred while sending the request.

UPDATE 2
Solved the gRPC startup issue with the 15733 image.

Next problem:

Executing 'Functions.X' (Reason='New queue message detected on 'Y'.', Id=ca5fbb1e-30a2-4dc2-be3a-992c8d1a2b2a)
Trigger Details: MessageId: xyz, DequeueCount: 1, InsertionTime: 2021-05-11T09:08:28.000+00:00

MS_FUNCTION_AZURE_MONITOR_EVENT 2,xyz,Microsoft.Web/sites/functions/log,FunctionAppLogs,,"{'appName':'xyz','roleInstance':'-','message':'Final functionDispatcher state: WorkerProcessRestarting. Initialization timed out and host is shutting down','category':'Microsoft.Azure.WebJobs.Script.Description.WorkerFunctionInvoker','hostVersion':'3.0.15733.0','functionInvocationId':'ca5fbb1e-30a2-4dc2-be3a-992c8d1a2b2a','functionName':'X','hostInstanceId':'xyz','level':'Error','levelId':4,'processId':1}"

Final functionDispatcher state: WorkerProcessRestarting. Initialization timed out and host is shutting down

FunctionExecutor.cs : 94','exceptionMessage':'Did not find any initialized language workers','exceptionType':'System.InvalidOperationException','eventId':3,'eventName':'FunctionCompleted'}
@lKoTl lKoTl changed the title Docker image dotnet-isolated, issues with QueueTrigger Docker image dotnet-isolated, Rpc issue May 7, 2021
@lKoTl
Copy link
Author

lKoTl commented May 7, 2021

Updated the description.

@lKoTl lKoTl changed the title Docker image dotnet-isolated, Rpc issue Docker image dotnet-isolated May 11, 2021
@dfibuch
Copy link

dfibuch commented Jul 27, 2021

I'm having the same problem, running a v3 Functions App using Docker (same image as you) with dotnet-isolated runtime. I've got a ticket open with MS to try solve this. I have tried deploying completely new AppService/ResourceGroup/FunctionsApp but still no luck,

Did you get anywhere with your issue?

@lKoTl
Copy link
Author

lKoTl commented Aug 3, 2021

@dfibuch,
No, I didn't take the fight; just optimized the existing function to take less than 10 min and hosted it on consumption plan.

@dfibuch
Copy link

dfibuch commented Aug 3, 2021

@lKoTl Fair enough. I just got off the phone with MS Azure support to show them exactly what is going on and it'll be getting escalated. Will update here if/when I hear back from them.

@dcwUipath
Copy link

Possibly related: Azure/azure-functions-dotnet-worker#524

@dfibuch
Copy link

dfibuch commented Aug 12, 2021

Possibly related: Azure/azure-functions-dotnet-worker#524

Thank you for linking this, it has actually fixed my issue,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants