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

simple-kbs-server startup error: error communicating with database: invalid certificate: BadDER #64

Closed
rayshaw001 opened this issue Jul 30, 2024 · 7 comments · Fixed by #65

Comments

@rayshaw001
Copy link

rayshaw001 commented Jul 30, 2024

startup step:

# git clone https://github.com/confidential-containers/simple-kbs

# cd simple-kbs

# git checkout v0.1.3

# docker compose up -d

# docker ps -a
CONTAINER ID   IMAGE                                             COMMAND                  CREATED          STATUS                           PORTS                                       NAMES
0309dc666108   simple-kbs-server                                 "simple-kbs --grpc_s…"   17 minutes ago   Restarting (127) 9 seconds ago                                               simple-kbs-server-1
6320613607da   simple-kbs-db                                     "docker-entrypoint.s…"   17 minutes ago   Up 17 minutes                    3306/tcp                                    simple-kbs-db-1

# docker logs 0309dc666108
[2024-07-30T13:08:21Z INFO  simple_kbs] Starting gRPC Server
[2024-07-30T13:08:37Z DEBUG rustls::client::hs] No cached session for DNSNameRef("db")
[2024-07-30T13:08:37Z DEBUG rustls::client::hs] Not resuming any session
[2024-07-30T13:08:37Z DEBUG rustls::client::hs] Using ciphersuite TLS13_CHACHA20_POLY1305_SHA256
[2024-07-30T13:08:37Z DEBUG rustls::client::tls13] Not resuming
[2024-07-30T13:08:37Z DEBUG rustls::client::tls13] TLS1.3 encrypted extensions: []
[2024-07-30T13:08:37Z DEBUG rustls::client::hs] ALPN protocol is None
[2024-07-30T13:08:37Z DEBUG rustls::client::tls13] Got CertificateRequest CertificateRequestPayloadTLS13 { context: PayloadU8([]), extensions: [SignatureAlgorithms([ECDSA_NISTP256_SHA256, ECDSA_NISTP384_SHA384, ECDSA_NISTP521_SHA512, ED25519, ED448, Unknown(2057), Unknown(2058), Unknown(2059), RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, Unknown(771), Unknown(769)])] }
[2024-07-30T13:08:37Z DEBUG rustls::client::tls13] Client auth requested but no cert selected
[2024-07-30T13:08:37Z WARN  rustls::session] Sending fatal alert DecodeError
Error: db::get_db_pool:: Encountered error trying to create database pool: error communicating with database: invalid certificate: BadDER
@rayshaw001 rayshaw001 changed the title simple-kbs-server startup error: libssl.so.3: cannot open shared object file: No such file or directory simple-kbs-server startup error: error communicating with database: invalid certificate: BadDER Jul 30, 2024
@rayshaw001
Copy link
Author

tag 0.1.1 tells blew error:
simple-kbs: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

@rayshaw001
Copy link
Author

solved by adding startup params to kbs-db:

entrypoint: ["docker-entrypoint.sh", "mariadbd", "--skip-ssl"]

@fitzthum
Copy link
Member

Hm ok. I suspect that there might be a way to fix without disabling ssl entirely. Let me take a look.

@panpingsheng
Copy link

I also encountered the same problem, is it because of different versions of mariadbd containers on different systems, resulting in incompatibility? Some systems are normal, and some systems report the above error

@fitzthum
Copy link
Member

Seems like this has been reported upstream. Let me try bumping some versions

@panpingsheng
Copy link

panpingsheng commented Aug 12, 2024 via email

@fitzthum
Copy link
Member

@rayshaw001 @panpingsheng please try testing with changes from #65

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

Successfully merging a pull request may close this issue.

3 participants