Hey there! I am providing the following certificate to a MariaDB Community 11.4.4. It consists of 2 PEM blocks, in this order:
- Leaf certificate
- Intermediate CA certificate
The certificates have been issued by cert-manager which using the go x509 library to issue certificates.
It seems like Galera is not able to parse multiple PEM blocks, returning the following error when setting up the donor:
mariadb 2025-01-09 18:02:20 0 [Note] WSREP: Failed to establish connection: unexpected eof while reading (SSL routines)
|
The donor node comes up anyway and when the SST is requested by a joiner, a crash happens. (see attached logs)
Including an intermediate CA as part of the certificate is valid and accepted by MariaDB. Standalone and replication topologies work normally with MariaDB 11.4.4. I have tested previous versions (11.4.3), but they also result in SSL errors (but not parsing errors) when this certificate structure is provided. It is also a very common PKI practice nowadays, as it allows to build trust in complex scenarios where multiple intermediate CAs are involved.
I have found the following issues during my investigation, which might provide some context:
I have attached the logs, configuration files and the PKI material.
{"report":{"fcp":1970.7000000476837,"ttfb":635.7999999523163,"pageVisibility":"visible","entityId":132322,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"cd50c30e-66b8-4313-8719-ee9b9b4ebbfb","navigationType":0,"readyForUser":2074.600000143051,"redirectCount":0,"resourceLoadedEnd":2067,"resourceLoadedStart":644.2000000476837,"resourceTiming":[{"duration":389.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":644.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":644.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1033.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":389.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":644.6000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":644.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1034.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":461.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":648.6000001430511,"connectEnd":648.6000001430511,"connectStart":648.6000001430511,"domainLookupEnd":648.6000001430511,"domainLookupStart":648.6000001430511,"fetchStart":648.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":648.6000001430511,"responseEnd":1110.2000000476837,"responseStart":1110.2000000476837,"secureConnectionStart":648.6000001430511},{"duration":959.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":648.9000000953674,"connectEnd":648.9000000953674,"connectStart":648.9000000953674,"domainLookupEnd":648.9000000953674,"domainLookupStart":648.9000000953674,"fetchStart":648.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":648.9000000953674,"responseEnd":1608.4000000953674,"responseStart":1608.4000000953674,"secureConnectionStart":648.9000000953674},{"duration":964.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":649,"connectEnd":649,"connectStart":649,"domainLookupEnd":649,"domainLookupStart":649,"fetchStart":649,"redirectEnd":0,"redirectStart":0,"requestStart":649,"responseEnd":1613.7999999523163,"responseStart":1613.7999999523163,"secureConnectionStart":649},{"duration":969.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":649.2999999523163,"connectEnd":649.2999999523163,"connectStart":649.2999999523163,"domainLookupEnd":649.2999999523163,"domainLookupStart":649.2999999523163,"fetchStart":649.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":649.2999999523163,"responseEnd":1618.6000001430511,"responseStart":1618.6000001430511,"secureConnectionStart":649.2999999523163},{"duration":969.6000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":649.5,"connectEnd":649.5,"connectStart":649.5,"domainLookupEnd":649.5,"domainLookupStart":649.5,"fetchStart":649.5,"redirectEnd":0,"redirectStart":0,"requestStart":649.5,"responseEnd":1619.1000001430511,"responseStart":1619.1000001430511,"secureConnectionStart":649.5},{"duration":970.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":649.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":649.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1620.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":970.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":649.9000000953674,"connectEnd":649.9000000953674,"connectStart":649.9000000953674,"domainLookupEnd":649.9000000953674,"domainLookupStart":649.9000000953674,"fetchStart":649.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":649.9000000953674,"responseEnd":1620.1000001430511,"responseStart":1620.1000001430511,"secureConnectionStart":649.9000000953674},{"duration":973,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":650,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":650,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1623,"responseStart":0,"secureConnectionStart":0},{"duration":974.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":650.2000000476837,"connectEnd":650.2000000476837,"connectStart":650.2000000476837,"domainLookupEnd":650.2000000476837,"domainLookupStart":650.2000000476837,"fetchStart":650.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":650.2000000476837,"responseEnd":1624.6000001430511,"responseStart":1624.6000001430511,"secureConnectionStart":650.2000000476837},{"duration":1415.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":651,"connectEnd":651,"connectStart":651,"domainLookupEnd":651,"domainLookupStart":651,"fetchStart":651,"redirectEnd":0,"redirectStart":0,"requestStart":651,"responseEnd":2066.7000000476837,"responseStart":2066.7000000476837,"secureConnectionStart":651},{"duration":1408.3999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":658.6000001430511,"connectEnd":658.6000001430511,"connectStart":658.6000001430511,"domainLookupEnd":658.6000001430511,"domainLookupStart":658.6000001430511,"fetchStart":658.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":658.6000001430511,"responseEnd":2067,"responseStart":2067,"secureConnectionStart":658.6000001430511},{"duration":770,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1291.2000000476837,"connectEnd":1291.2000000476837,"connectStart":1291.2000000476837,"domainLookupEnd":1291.2000000476837,"domainLookupStart":1291.2000000476837,"fetchStart":1291.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1291.2000000476837,"responseEnd":2061.2000000476837,"responseStart":2061.2000000476837,"secureConnectionStart":1291.2000000476837},{"duration":250.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1964.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1964.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2214.9000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":456,"responseStart":635,"responseEnd":645,"domLoading":639,"domInteractive":2296,"domContentLoadedEventStart":2296,"domContentLoadedEventEnd":2389,"domComplete":2865,"loadEventStart":2866,"loadEventEnd":2866,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2241.7000000476837},{"name":"bigPipe.sidebar-id.end","time":2242.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":2242.600000143051},{"name":"bigPipe.activity-panel-pipe-id.end","time":2249.9000000953674},{"name":"activityTabFullyLoaded","time":2408.7000000476837}],"measures":[],"correlationId":"82f968fce2dbc8","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":119,"dbReadsTimeInMs":15,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I have enabled encryption for the SST:
[sst]
tca=/etc/pki/ca.crt
tcert=/etc/pki/client.crt
tkey=/etc/pki/client.key
Resulting in the following logs in the donor:
questing off
questing off
The crash still happens in the donor with the same error:
mariadb
mariadb
mariadb diagnose the problem, but since we have already crashed,
mariadb
mariadb It is possible that mysqld could use up to
mariadb
mariadb WSREP: Suppressing further logging
mariadb WSREP: Shutting down network communications
mariadb
mariadb Attempting backtrace. You can use the following information to find out
mariadb terribly wrong...
I see that we are passing the container IP as `commonname='10.244.0.19';` , whereas the certificate is not valid for the container IP, as IPs are ephemeral in Kubernetes. Could this be related? In any case, it shouldn't be causing a crash I'm guessing?