-
Notifications
You must be signed in to change notification settings - Fork 362
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
Failed to load gRPC lib in Docker #5260
Comments
Transferred to google-cloud-dotnet as that's rather likely to be more appropriate (google-api-dotnet-client doesn't use gRPC) but we still really need more information. At the moment we don't have any idea what your library or the rest of your Dockerfile looks like. Please could you provide more information, ideally a complete example we can test with? |
This is a custom base image based on Alpine 3.10 Build image:
tried with/without |
Alpine certainly has caused problems before - but we're really going to need a way of reproducing the problem if we're going to help you. That means having a complete Dockerfile and a complete project. (The source code doesn't need to do much - just a Main method that tries to create a channel would almost certainly be enough.) |
Any more information? I'll close this issue at the end of the week unless I hear anything more. (If you have information after I've closed it, please just add it in a comment and I'll reopen - it's not like closure is permanent.) |
@jskeet : I'm facing the same issue here. When running in GKE i get the following exception :
In this output directory i can find the files that seem to be causing the issues :
I'm quiet new to this, maybe i'm doing something wrong. Any suggestions? |
@LStuyck: Again, what we really need is a complete example so we can reproduce the problem, although it seems very likely that the issue would be better in the gRPC repo than this one. |
I'll provide a sample project beginning of next week. |
@LStuyck: Thanks, I'll have a look tomorrow. (It's a public holiday today.) I'm expecting my first step after reproducing the problem to be removing all trace of PubSub, and just changing Main to "create new Channel" as that's been enough to reproduce similar problems. |
Okay, some progress:
So I've ended up with a project file like this: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Grpc.Core" Version="2.31.0" />
</ItemGroup>
</Project> and C# code of: using Grpc.Core;
using System;
namespace PubSubExceptionRepro
{
class Program
{
static void Main()
{
try
{
Console.WriteLine("Main entry");
var channel = new Channel("pubsub.googleapis.com", ChannelCredentials.Insecure);
Console.WriteLine("Reached end");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
throw;
}
}
}
} This still gives the same error. Looking into why now... |
Okay, it looks like this is basically a dupe of #4780. You just need to add this into
With that in place, the repro runs correctly. See also: grpc/grpc#21446 |
@jskeet: giving that a try immediately |
There is a little issue with the fix, it makes the container exposed to CVE-2019-14697 with 7.5 score. |
@StasPerekrestov: There may be a newer version of libc6-compat which avoids this - it's far from my area of expertise. I'd recommend commenting on grpc/grpc#21446 - there really isn't anything that the API libraries can do about this; it's in the gRPC library's court. |
@jskeet thank you for the update. I'll leave a comment under that thread. |
I'm running my app in Docker (linux x64 environment).
And the service fails to start because of the error:
So it is trying to load gRPC library from
runtimes/....
folder. But whenever I publish the project locally (with Linux target) I see this library in the project output root. So it looks like it is trying to load the library from the wrong location.Does anyone have the same issue?
The build command is nothing specific (tried with and without
-r
flag.):The text was updated successfully, but these errors were encountered: