You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a sample Grpc application and have added the docker image to the Azure container registry. Have hosted the same in Azure container and when I am trying to consume the the container url in the client. I get an exception
Status(StatusCode="Internal", Detail="Bad gRPC response. Response protocol downgraded to HTTP/1.1.")'
FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY ["project/project.csproj", "project/"]
RUN dotnet restore "project/project.csproj"
COPY . .
WORKDIR "/src/project"
RUN dotnet build "project.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "project.csproj" -c Release -o /app/publish
FROM base AS final
ENV ASPNETCORE_URLS="https://+;http://+"
ENV ASPNETCORE_HTTPS_PORT=443
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "project.dll"]
I am now trying to use the http protocol and have enable http2 on the port 5000. But I get the below issue while I connect to the client from grpc.
Grpc.Core.RpcException: 'Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while HTTP/2 is not enabled.", DebugException="System.Net.Http.HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while HTTP/2 is not enabled.
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync
I have enable http2 in the server for port 5000
webBuilder.ConfigureKestrel(options =>
{
// Setup a HTTP/2 endpoint without TLS.
// options.ListenLocalhost(80, o => o.Protocols =
// HttpProtocols.Http2);
options.ListenAnyIP(5000, o => o.Protocols =
HttpProtocols.Http2);
});
webBuilder.UseStartup();
Activity
mukthiarahamad commentedon May 11, 2021
I am now trying to use the http protocol and have enable http2 on the port 5000. But I get the below issue while I connect to the client from grpc.
Grpc.Core.RpcException: 'Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while HTTP/2 is not enabled.", DebugException="System.Net.Http.HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while HTTP/2 is not enabled.
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync
I have enable http2 in the server for port 5000
webBuilder.ConfigureKestrel(options =>
{
// Setup a HTTP/2 endpoint without TLS.
// options.ListenLocalhost(80, o => o.Protocols =
// HttpProtocols.Http2);
options.ListenAnyIP(5000, o => o.Protocols =
HttpProtocols.Http2);
});
webBuilder.UseStartup();
Kindly suggest.