-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
Npgsql 10 started to use GSSAPI encryption for PostgreSQL by default . Npgsql will always try to use GSSAPI first and then fall back to another mechanism if it's not available.
If libgssapi_krb5 is not available on the system (like in the default chiseled containers) this unfortunately causes the runtime to write an error to stderr:
Cannot load library libgssapi_krb5.so.2
Error: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
This is coming from pal_gssapi.c.
There has been some discussion about this in npgsql/npgsql#6360 and npgsql apprently can't easily fix this.
This causes some confusion since you get an error on stderr that isn't actually a problem. Would it be an option for the runtime to just not log this message? Since the caller must deal with the TypeInitializationException anyway, I'm not sure this is even needed.
Reproduction Steps
see https://github.com/mus65/libgssapinotfound .
Clone and run:
docker build -t gssapi . && docker run --rm gssapi
Expected behavior
No messages are written to stderr.
Actual behavior
Messages are written to stderr:
Cannot load library libgssapi_krb5.so.2
Error: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
Regression?
No response
Known Workarounds
No response
Configuration
.NET 11 Preview 2
Other information
No response
Metadata
Metadata
Labels
Type
Projects
Status