SCA Appliance configuration reports ERROR 2002 (HY000): Can't connect to MySQL server
This document (000020301) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12 SP5
SUSE Linux Enterprise Server 12 SP4
Situation
... SCA Agent Configuration ERROR #################################################################### # SCA Agent Configuration Tool v1.0.6 #################################################################### ERROR 2002 (HY000): Can't connect to MySQL server on 'sles15sp2' (115) ERROR: Cannot obtain AgentID on sles15sp2-base for sles15sp2 Consider running setup-sdagent on the Broker server.Runnnig scadb shows the following:
Table: Agents +-----------+------------+---------------------+---------------------------------+---------------+------------+ | Hostname | AgentState | AgentEvent | AgentMessage | ThreadsActive | CPUCurrent | +-----------+------------+---------------------+---------------------------------+---------------+------------+ | sles15sp2 | Configure | 2021-06-18 15:17:49 | Run sdagent-config on sles15sp2 | 0 | 0 | +-----------+------------+---------------------+---------------------------------+---------------+------------+The bind-address is configured in /etc/my.cnf for the loop back address
# grep bind-address /etc/my.cnf bind-address = 127.0.0.1
Resolution
# grep bind-address /etc/my.cnf #bind-address = 127.0.0.1 systemctl restart mariadb.serviceIf you have not started the SCA Appliance Server configuration yet, run: setup-sca.
If you have already run setup-sca and received the errors described, you can manually run sdagent-config and install the cron jobs as follows:
/usr/sbin/sdagent-config -h $HOSTNAME -l $HOSTNAME -p sdagent_password -e root -i 'file:///tmp/' crontab /usr/share/doc/packages/sca-appliance-broker/combined.cronOnce the configuration is complete and cron jobs have executed at least once, you will see an AgentMessage "Ready."
# scadb Table: Agents +-----------+------------+---------------------+--------------+---------------+------------+ | Hostname | AgentState | AgentEvent | AgentMessage | ThreadsActive | CPUCurrent | +-----------+------------+---------------------+--------------+---------------+------------+ | sles15sp2 | Active | 2021-06-24 18:16:02 | Ready | 0 | 11 | +-----------+------------+---------------------+--------------+---------------+------------+
Cause
Status
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020301
- Creation Date: 25-Jun-2021
- Modified Date:28-Jun-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com