{"id":3639,"date":"2017-10-12T08:35:40","date_gmt":"2017-10-12T06:35:40","guid":{"rendered":"https:\/\/rephlex.de\/blog\/?p=3639"},"modified":"2017-10-12T08:37:27","modified_gmt":"2017-10-12T06:37:27","slug":"mariadb-10-1-28-with-wsrep-will-not-start-heres-how-you-can-fix-it","status":"publish","type":"post","link":"https:\/\/rephlex.de\/blog\/2017\/10\/12\/mariadb-10-1-28-with-wsrep-will-not-start-heres-how-you-can-fix-it\/","title":{"rendered":"MariaDB 10.1.28 with WSREP will not start &#8211; here&#8217;s how you can fix it"},"content":{"rendered":"<p>If you are running MariaDB 10.1 branch on any major distro (Ububtu, CentOS\/RHEL&#8230;) with WSREP=ON (indicating replication such as galera), then your MariaDB systemd unit will most likely fail to start.<\/p>\n<p>Steps to reproduce:<\/p>\n<ul>\n<li>Install mariadb-10.1.27 or earlier for any distro<\/li>\n<li>enable WSREP (have a cluster running)<\/li>\n<li>upgrade one node to 10.1.28<\/li>\n<li>mysql will simply quit any time you start the systemd unit, with no fishy warning or error messages whatsowver, just a silent insta-death.<\/li>\n<\/ul>\n<p>If you now try to run mysqld (do a &#8222;which mysqld&#8220;) in foreground, it will actually keep on running.<\/p>\n<p><em>Note: use &#8222;killall mysqld&#8220; on a different shell to gracefully quit mysqld when running in foreground, because mysqld will ignore you hammering Ctrl+C, duh.<\/em><\/p>\n<p>So my guess was: &#8222;This has to do with the unit file, or with mysqld_safe&#8220;.\u00a0Turns out i was right, after a bit of googling i found this patch for mysqld_safe, which is just broken in that release.<\/p>\n<blockquote><p>diff mysqld_safe.bug mysqld_safe.fixed<br \/>\n249c249<br \/>\n&lt; local wr_logfile=$(mktemp wsrep_recovery.XXXXXX)<br \/>\n&#8212;<br \/>\n&gt; local wr_logfile=$(mktemp -t wsrep_recovery.XXXXXX)<br \/>\n271c271<br \/>\n&lt; eval_log_error &#8222;$mysqld_cmd &#8211;wsrep_recover $wr_options 2&gt; $wr_logfile&#8220;<br \/>\n&#8212;<br \/>\n&gt; eval_log_error &#8222;$mysqld_cmd &#8211;wsrep_recover $wr_options &gt; $wr_logfile&#8220;<\/p><\/blockquote>\n<p>Source: <a href=\"https:\/\/jira.mariadb.org\/browse\/MDEV-13950?focusedCommentId=100911&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-100911\">click here<\/a><\/p>\n<p>I wonder how this can happen, do they run their rpm package tests only without replication enabled!?<\/p>\n<p><strong>Of course I hit this in production, where else!? You don&#8217;t run replication in testing, because nobody is willing to pay the extra server(s) \ud83d\ude00<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are running MariaDB 10.1 branch on any major distro (Ububtu, CentOS\/RHEL&#8230;) with WSREP=ON (indicating replication such as galera), then your MariaDB systemd unit will most likely fail to start. Steps to reproduce: Install mariadb-10.1.27 or earlier for any distro enable WSREP (have a cluster running) upgrade one node to 10.1.28 mysql will simply [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[441,442,288,39,446,435,443,444,440,438,445,439,47,436,437],"class_list":["post-3639","post","type-post","status-publish","format-standard","hentry","category-techtalk","tag-10-1-28","tag-442","tag-centos","tag-debian","tag-fix","tag-mariadb","tag-mysqld","tag-mysqld_safe","tag-no-error","tag-not-start","tag-systemd","tag-terminate","tag-ubuntu","tag-update","tag-wsrep"],"_links":{"self":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/comments?post=3639"}],"version-history":[{"count":4,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3639\/revisions"}],"predecessor-version":[{"id":3643,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3639\/revisions\/3643"}],"wp:attachment":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/media?parent=3639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/categories?post=3639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/tags?post=3639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}