Giter VIP home page Giter VIP logo

percona-clustercheck's People

Contributors

boomfish avatar daniel-lucio avatar loicmahieu avatar matthewfischer avatar olafz avatar spamaps avatar vdvm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

percona-clustercheck's Issues

error after update /etc/sysconfig/clustercheck

hi.

after you edit file six days ago, i use script check not running. compare 2 file:

before:
MYSQL_USERNAME="${1-clustercheckuser}"
MYSQL_PASSWORD="${2-clustercheckpassword!}"
AVAILABLE_WHEN_DONOR=${3:-0}
ERR_FILE="${4:-/dev/null}"
AVAILABLE_WHEN_READONLY=${5:-1}
DEFAULTS_EXTRA_FILE=${6:-/etc/my.cnf}

After (now):
set -e

if [ -f /etc/sysconfig/clustercheck ]; then
. /etc/sysconfig/clustercheck
fi

MYSQL_USERNAME="${MYSQL_USERNAME:=-clustercheckuser}"
MYSQL_PASSWORD="${MYSQL_PASSWORD-clustercheckpassword!}"
AVAILABLE_WHEN_DONOR=${AVAILABLE_WHEN_DONOR:-0}
ERR_FILE="${ERR_FILE:-/dev/null}"
AVAILABLE_WHEN_READONLY=${AVAILABLE_WHEN_READONLY:-1}
DEFAULTS_EXTRA_FILE=${DEFAULTS_EXTRA_FILE:-/etc/my.cnf}

i don't have file /etc/sysconfig/clustercheck, script is not running. i must edit same old file, it is running normal.

clustercheck not running correctly as MYSQL_USERNAME:=-clustercheckuser

On my test DB server running a MariaDB cluster:

$ ./clustercheck
HTTP/1.1 503 Service Unavailable
Content-Type: text/plain
Connection: close
Content-Length: 44

Percona XtraDB Cluster Node is not synced


$ mysql -u clustercheckuser -p -e "SHOW STATUS LIKE 'wsrep_local_state';"
Enter password:
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| wsrep_local_state | 4     |
+-------------------+-------+

When I corrected the MYSQL_USERNAME to "clustercheckuser", the script now runs correctly. I have created a pull request for this.

$ ./clustercheck
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: close
Content-Length: 40

Percona XtraDB Cluster Node is synced.

Requires passing password insecurely on CLI

Bash doesn't offer us an easy way to redact the password the way mysql's CLI does with --password, and so all users on a system where clustercheck is running will see the password in plain text.

The script should allow users to set user/password to "" as long as DEFAULTS_EXTRA_FILE exists, and then try to use that alone, since it can contain the user/password in a secure location that is only readable by the user running the script.

Will submit a patch.

GRANT PROCESS not necessary

An auditor pointed out to me that GRANT PROCESS is unnecessary for the two SQL-queries executed by this script. Any unprivileged user can execute them.

This is probably a relic from the past, but the README should be adjusted to remove the GRANT PROCESS-lines and replace them with GRANT USAGE.

Mismatch between clustercheck and xinetd response

Hi guys,

Quick question; I am getting a mismatch between the clustercheck response (via cli) and the response returned via the mysqlchk xinetd request:

root@host:~# /usr/local/bin/clustercheck 
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: close
Content-Length: 40

Percona XtraDB Cluster Node is synced.
root@host:~# curl -v http://localhost:9200/
* About to connect() to localhost port 9200 (#0)
*   Trying 127.0.0.1... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:9200
> Accept: */*
> 
< HTTP/1.1 503 Service Unavailable
< Content-Type: text/plain
< Connection: close
< Content-Length: 44
< 

/etc/xinetd.d/mysqlchk is configured to simply call server=/usr/local/bin/clustercheck, as per the install instructions.

Any ideas?

when requesting via xinetd+curl, "Recv failure"

$ curl localhost:9200
Percona XtraDB Cluster Node is synced.

curl: (56) Recv failure: Connection reset by peer

This breaks Amazon ELB, as it sees a 200 response of this nature as a failure.

I tweaked the script to add a Content-Length: 0 header, which appears to make Amazon happy, but I'm not entirely clear on the implications of this, or if there's a better way.

Passing empty string arguments

The possibility to have mysql credentials as a parameter is a great idea but in our case, we want to use credentials stored in my.cnf.
Because ${1:-default} treat an empty string argument as non-valid, this cases are impossible at this time:

# Lease empty in order to mysql uses my.cnf to credentials
clustercheck "" ""
# User clustercheck with empty password
clustercheck "clustercheck" ""

I don't know what solution would be the most elegant... Any idea?

Diffrent Port 3307

I run mysql on port 3307 how can make the script work?

/etc/haproxy/haproxy.cfg

I have like:
...
listen percona-cluster 0.0.0.0:3306
balance leastconn
option httpchk
mode tcp
server node1 1.2.3.4:3307 check port 9200 inter 5000 fastinter 2000 rise 2 fall 2
server node2 1.2.3.5:3307 check port 9200 inter 5000 fastinter 2000 rise 2 fall 2
server node3 1.2.3.6:3307 check port 9200 inter 5000 fastinter 2000 rise 2 fall 2 backup

service: Deactivated successfully.

After upgrade to debian 12 we periodically get the following mesage in syslog:

Jan 9 08:31:02 db systemd[1]: Started [email protected]:9200-a.b.c.d:9764.service - Percona XtraDB Cluster node check service (172.17.24.225:9764).
Jan 9 08:31:02 db systemd[1]: [email protected]:9200-a.b.c.d:9764.service: Deactivated successfully.

Previously in debian 11:

Jan 6 23:59:58 db systemd[1]: Started Percona XtraDB Cluster node check service (a.b.c.d:24158).
Jan 6 23:59:58 db systemd[1]: [email protected]:9200-a.b.c.d:24158.service: Succeeded.

License

How is this licensed? I don't see a license specificed. Thanks!

Default user changed

By this commit: 245f1e3

The default user is now: -clustercheckuser instead of clustercheckuser (the "-" has been added).

Script has issue with new version

I've just upgraded to Galera cluster 5.6.28-76.1-56 and the cluster state, wsrep_local_state is 4 and wsrep_cluster_status is Primary, though the parsing of the return seems to be failing and claiming the cluster is out of sync.

I think it's not parsing the -e CLI mysql responses correctly?

Systemd with Clusterchk not longer working

Hi,

Could there be an problem with the clusterchk.socket and systemd by filling up the system with so many file descriptors that the system can't no longer handle it?

Here are some syslogs from a debian vm:

xxxxxxxxxxxxx@pr-be-mdb-galera01-01:~$ sudo systemctl start reboot.target
Failed to start reboot.target: Argument list too long
See system logs and 'systemctl status reboot.target' for details.
xxxxxxxxxxxxxx@pr-be-mdb-galera01-01:~$ sudo systemctl status reboot.target
Failed to get properties: Unknown object '/org/freedesktop/systemd1/unit/reboot_2etarget'.
xxxxxxxxxxxxxx@pr-be-mdb-galera01-01:~$ sudo systemctl reboot
Failed to reboot system via logind: Invalid request descriptor
Failed to start reboot.target: Argument list too long
See system logs and 'systemctl status reboot.target' for details.



xxxxxxxxxxx@pr-be-mdb-galera01-01:~$ sudo journalctl --unit dbus
-- Journal begins at Tue 2023-11-21 22:04:31 CET, ends at Mon 2023-11-27 11:34:07 CET. --
Nov 27 07:31:47 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:32:12 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:32:37 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:33:02 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:33:27 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:33:52 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:34:17 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:34:42 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:35:07 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:35:32 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:35:57 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:36:22 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:36:47 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:37:12 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:37:37 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:38:02 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:38:27 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:38:52 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:39:17 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:39:42 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:40:07 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:40:32 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:40:57 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:41:22 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:41:47 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:42:12 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:42:37 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:43:02 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:43:27 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:43:52 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:44:17 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:44:42 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:45:07 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:45:32 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:45:57 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:46:22 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:46:47 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:47:12 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:47:37 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:48:02 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:48:27 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:48:52 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:49:17 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:49:42 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:50:07 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:50:32 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:50:57 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 07:51:19 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Successfully activated service 'org.freedesktop.systemd1'
Nov 27 08:15:03 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 08:15:28 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 08:15:53 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms)
Nov 27 08:16:02 pr-be-mdb-galera01-01 dbus-daemon[477]: [system] Successfully activated service 'org.freedesktop.systemd1'
-- Boot 29a3a40650fe42d4a37bdce0bdf2b71d --
Nov 27 08:19:11 pr-be-mdb-galera01-01 systemd[1]: Started D-Bus System Message Bus.
Nov 27 08:19:28 pr-be-mdb-galera01-01 systemd[1]: Stopping D-Bus System Message Bus...
Nov 27 08:19:28 pr-be-mdb-galera01-01 systemd[1]: dbus.service: Succeeded.
Nov 27 08:19:28 pr-be-mdb-galera01-01 systemd[1]: Stopped D-Bus System Message Bus.
-- Boot 363a9b051c5d4b0289eec63faec54352 --
Nov 27 08:19:45 pr-be-mdb-galera01-01 systemd[1]: Started D-Bus System Message Bus.
xxxxxxxxxxxx@pr-be-mdb-galera01-01:~$ sudo journalctl --unit clusterchk.socket
-- Journal begins at Tue 2023-11-21 22:04:31 CET, ends at Mon 2023-11-27 11:35:11 CET. --
Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Failed to queue service startup job (Maybe the service file is missing or not a template unit?): Argument list too long
Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Failed with result 'resources'.
Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Consumed 26min 57.357s CPU time.
Nov 27 07:51:19 pr-be-mdb-galera01-01 systemd[1]: Listening on Clusterchk socket.
Nov 27 07:51:32 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Failed to queue service startup job (Maybe the service file is missing or not a template unit?): Argument list too long
Nov 27 07:51:32 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Failed with result 'resources'.
-- Boot 29a3a40650fe42d4a37bdce0bdf2b71d --
Nov 27 08:19:11 pr-be-mdb-galera01-01 systemd[1]: Listening on Clusterchk socket.
Nov 27 08:19:33 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Succeeded.
Nov 27 08:19:33 pr-be-mdb-galera01-01 systemd[1]: Closed Clusterchk socket.
-- Boot 363a9b051c5d4b0289eec63faec54352 --
Nov 27 08:19:45 pr-be-mdb-galera01-01 systemd[1]: Listening on Clusterchk socket.



Nov 19 01:38:25 pr-be-mdb-galera01-01 systemd[1]: Started Check the status of Galera/MySQL (10.49.97.138:33982).
Nov 19 01:38:25 pr-be-mdb-galera01-01 systemd[1]: Started Check the status of Galera/MySQL (10.49.97.139:44600).
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010546]: /bin/echo: write error: Connection reset by peer
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010547]: /bin/echo: write error: Broken pipe
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010548]: /bin/echo: write error: Broken pipe
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010549]: /bin/echo: write error: Broken pipe
Nov 19 01:38:25 pr-be-mdb-galera01-01 systemd[1]: [email protected]:9999-10.49.97.138:33982.service: Main process exited, code=exited, status=1/FAILURE
Nov 19 01:38:25 pr-be-mdb-galera01-01 systemd[1]: [email protected]:9999-10.49.97.138:33982.service: Failed with result 'exit-code'.
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010555]: /bin/echo: write error: Connection reset by peer
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010556]: /bin/echo: write error: Broken pipe
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010557]: /bin/echo: write error: Broken pipe
Nov 19 01:38:25 pr-be-mdb-galera01-01 clusterchk.sh[4010558]: /bin/echo: write error: Broken pipe
Nov 19 01:38:25 pr-be-mdb-galera01-01 systemd[1]: [email protected]:9999-10.49.97.139:44600.service: Main process exited, code=exited, status=1/FAILURE
Nov 19 01:38:25 pr-be-mdb-galera01-01 systemd[1]: [email protected]:9999-10.49.97.139:44600.service: Failed with result 'exit-code'.



Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: cannot add name, manager has too many units: Argument list too long
Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Failed to queue service startup job (Maybe the service file is missing or not a template unit?): Argument list too long
Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Failed with result 'resources'.
Nov 25 21:18:48 pr-be-mdb-galera01-01 systemd[1]: clusterchk.socket: Consumed 26min 57.357s CPU time.
Nov 26 00:00:08 pr-be-mdb-galera01-01 systemd[1]: cannot add name, manager has too many units: Argument list too long
Nov 26 00:00:08 pr-be-mdb-galera01-01 systemd[1]: cannot add name, manager has too many units: Argument list too long
Nov 26 00:00:08 pr-be-mdb-galera01-01 systemd[1]: cannot add name, manager has too many units: Argument list too long

It leads to an very slow system without the possibility to reboot (only hard reset at vm level possible).

Greetings
dcz010

how pass empty username and password ?

I tried passing double quotes ( two double quotes without any spaces for username and password
server_args = "" "" 1 /var/log/mysqlchk.log 1 /etc/.my.clustercheck.cnf

but xinetd shows status code 1, when I pass username and password, it works fine.

empty `MYSQL_USERNAME` is not possible

MYSQL_USERNAME="${MYSQL_USERNAME:=-clustercheckuser}"

always sets MYSQL_USERNAME to "clustercheckuser" if it is missing or empty. This will add --user parameter here

if [[ -n "$MYSQL_USERNAME" ]]; then
EXTRA_ARGS="$EXTRA_ARGS --user=${MYSQL_USERNAME}"
fi

and with that it always overrides username in /etc/my.cnf.

The right expansion should be:

MYSQL_USERNAME="${MYSQL_USERNAME-clustercheckuser}"

Also look at #23 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.