If WSREP is turned off, the init script can't stop mysqld.
We can start the server, then turn off WSREP:
[gmontee@localhost ~]$ sudo service mysql bootstrap
|
Bootstrapping the cluster.. Starting MySQL.... [ OK ]
|
[gmontee@localhost ~]$ mysql -u root --execute="SET GLOBAL wsrep_on=OFF;"
|
Then try to stop the server, but it fails:
[gmontee@localhost ~]$ sudo service mysql stop
|
Shutting down MySQL..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................[FAILED]..........................................
|
The process is still running:
[gmontee@localhost ~]$ ps -elf | grep "mysqld"
|
4 S root 6905 1 0 80 0 - 2868 wait 11:17 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --wsrep-new-cluster
|
4 S mysql 7168 6905 0 80 0 - 230398 futex_ 11:17 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --wsrep-provider=/usr/lib64/galera/libgalera_smm.so --wsrep-new-cluster --log-error=/var/lib/mysql/localhost.localdomain.err --pid-file=/var/lib/mysql/localhost.localdomain.pid --wsrep_start_position=5edc131e-ae0b-11e4-85d1-c2c0512e9e7e:4
|
0 S gmontee 9202 3464 0 80 0 - 25814 pipe_w 11:33 pts/1 00:00:00 grep mysqld
|
However, the server isn't usable:
[gmontee@localhost ~]$ mysql -u root
|
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
|
The error log:
[gmontee@localhost ~]$ sudo tail -n 20 /var/lib/mysql/localhost.localdomain.err
|
150318 11:17:54 InnoDB: Completed initialization of buffer pool
|
150318 11:17:54 InnoDB: highest supported file format is Barracuda.
|
150318 11:17:54 InnoDB: Waiting for the background threads to start
|
150318 11:17:55 Percona XtraDB (http://www.percona.com) 5.5.40-MariaDB-36.1 started; log sequence number 1604754
|
150318 11:17:55 [Note] Plugin 'FEEDBACK' is disabled.
|
150318 11:17:55 [Note] Server socket created on IP: '0.0.0.0'.
|
150318 11:17:55 [Note] Event Scheduler: Loaded 0 events
|
150318 11:17:55 [Note] /usr/sbin/mysqld: ready for connections.
|
Version: '5.5.41-MariaDB-wsrep' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server, wsrep_25.11.r4026
|
150318 11:17:55 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
|
150318 11:17:55 [Note] WSREP: REPL Protocols: 5 (3, 1)
|
150318 11:17:55 [Note] WSREP: Service thread queue flushed.
|
150318 11:17:55 [Note] WSREP: Assign initial position for certification: 4, protocol version: 3
|
150318 11:17:55 [Note] WSREP: Service thread queue flushed.
|
150318 11:17:55 [Note] WSREP: Synchronized with group, ready for connections
|
150318 11:17:55 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
|
150318 11:18:10 [Note] /usr/sbin/mysqld: Normal shutdown
|
|
150318 11:18:10 [Note] WSREP: rollbacker thread exiting
|
150318 11:18:10 [Note] Event Scheduler: Purging the queue. 0 events
|
I have to kill -9 the server to stop it:
[gmontee@localhost ~]$ sudo kill -9 7168
|
[gmontee@localhost ~]$ ps -elf | grep "mysqld"
|
0 S gmontee 9255 3464 0 80 0 - 25813 pipe_w 11:36 pts/1 00:00:00 grep mysqld
|
If I turn WSREP back on before attempting to shut down the server, everything works normally:
[gmontee@localhost ~]$ sudo service mysql bootstrap
|
Bootstrapping the cluster.. Starting MySQL.... [ OK ]
|
[gmontee@localhost ~]$ mysql -u root --execute="SET GLOBAL wsrep_on=OFF;"
|
[gmontee@localhost ~]$ mysql -u root --execute="SET GLOBAL wsrep_on=ON;"
|
[gmontee@localhost ~]$ sudo service mysql stop
|
Shutting down MySQL... [ OK ]
|
{"report":{"fcp":1205.1000001430511,"ttfb":296.2999999523163,"pageVisibility":"visible","entityId":50537,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e8f7008b-da71-4e51-9461-df9130c0be06","navigationType":0,"readyForUser":1388.6000001430511,"redirectCount":0,"resourceLoadedEnd":1315.2999999523163,"resourceLoadedStart":312.7999999523163,"resourceTiming":[{"duration":137.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":312.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":312.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":450,"responseStart":0,"secureConnectionStart":0},{"duration":136.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":313.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":313.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":450,"responseStart":0,"secureConnectionStart":0},{"duration":213.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":313.7000000476837,"connectEnd":313.7000000476837,"connectStart":313.7000000476837,"domainLookupEnd":313.7000000476837,"domainLookupStart":313.7000000476837,"fetchStart":313.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":450.90000009536743,"responseEnd":527.6000001430511,"responseStart":464.60000014305115,"secureConnectionStart":313.7000000476837},{"duration":223.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":313.7999999523163,"connectEnd":313.7999999523163,"connectStart":313.7999999523163,"domainLookupEnd":313.7999999523163,"domainLookupStart":313.7999999523163,"fetchStart":313.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":451.5,"responseEnd":537.2000000476837,"responseStart":465.2999999523163,"secureConnectionStart":313.7999999523163},{"duration":149.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":314.2999999523163,"connectEnd":314.2999999523163,"connectStart":314.2999999523163,"domainLookupEnd":314.2999999523163,"domainLookupStart":314.2999999523163,"fetchStart":314.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":452.10000014305115,"responseEnd":463.7000000476837,"responseStart":462.7999999523163,"secureConnectionStart":314.2999999523163},{"duration":184.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":314.60000014305115,"connectEnd":471,"connectStart":471,"domainLookupEnd":471,"domainLookupStart":471,"fetchStart":314.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":473.2000000476837,"responseEnd":499.2000000476837,"responseStart":495.2000000476837,"secureConnectionStart":471},{"duration":184.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":314.7999999523163,"connectEnd":314.7999999523163,"connectStart":314.7999999523163,"domainLookupEnd":314.7999999523163,"domainLookupStart":314.7999999523163,"fetchStart":314.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":473.40000009536743,"responseEnd":499.5,"responseStart":496,"secureConnectionStart":314.7999999523163},{"duration":156.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":315.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":315.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":471.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":184.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":315.2000000476837,"connectEnd":315.2000000476837,"connectStart":315.2000000476837,"domainLookupEnd":315.2000000476837,"domainLookupStart":315.2000000476837,"fetchStart":315.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":476.40000009536743,"responseEnd":499.60000014305115,"responseStart":496.7999999523163,"secureConnectionStart":315.2000000476837},{"duration":157,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":315.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":315.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":472.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":194.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":315.40000009536743,"connectEnd":315.40000009536743,"connectStart":315.40000009536743,"domainLookupEnd":315.40000009536743,"domainLookupStart":315.40000009536743,"fetchStart":315.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":494.40000009536743,"responseEnd":509.90000009536743,"responseStart":506.90000009536743,"secureConnectionStart":315.40000009536743},{"duration":970.3999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":344.90000009536743,"connectEnd":344.90000009536743,"connectStart":344.90000009536743,"domainLookupEnd":344.90000009536743,"domainLookupStart":344.90000009536743,"fetchStart":344.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":875.2000000476837,"responseEnd":1315.2999999523163,"responseStart":1305.1000001430511,"secureConnectionStart":344.90000009536743},{"duration":969.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":345,"connectEnd":345,"connectStart":345,"domainLookupEnd":345,"domainLookupStart":345,"fetchStart":345,"redirectEnd":0,"redirectStart":0,"requestStart":1259.7000000476837,"responseEnd":1314.7000000476837,"responseStart":1303.4000000953674,"secureConnectionStart":345},{"duration":510.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":804.5,"connectEnd":804.5,"connectStart":804.5,"domainLookupEnd":804.5,"domainLookupStart":804.5,"fetchStart":804.5,"redirectEnd":0,"redirectStart":0,"requestStart":1190.5,"responseEnd":1315.1000001430511,"responseStart":1304.2000000476837,"secureConnectionStart":804.5},{"duration":274.2000000476837,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1194.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1194.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1469.1000001430511,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":124,"domainLookupEnd":130,"connectStart":130,"connectEnd":151,"secureConnectionStart":139,"requestStart":151,"responseStart":296,"responseEnd":338,"domLoading":302,"domInteractive":1503,"domContentLoadedEventStart":1503,"domContentLoadedEventEnd":1546,"domComplete":2495,"loadEventStart":2495,"loadEventEnd":2496,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1452.5},{"name":"bigPipe.sidebar-id.end","time":1479.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1479.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1482.9000000953674},{"name":"activityTabFullyLoaded","time":1554.9000000953674}],"measures":[],"correlationId":"9f375370406c29","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":75,"dbReadsTimeInMs":10,"dbConnsTimeInMs":16,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}