Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu focal proxy fails to install with mysql-8.0 (syntax error) #752

Closed
dbnewman opened this issue Mar 19, 2021 · 1 comment
Closed

Ubuntu focal proxy fails to install with mysql-8.0 (syntax error) #752

dbnewman opened this issue Mar 19, 2021 · 1 comment

Comments

@dbnewman
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.21.1
  • Ruby: Bundled version
  • Distribution: Ubuntu 20.04.2 Focal
  • Module version: 8.0.0

How to reproduce (e.g Puppet code you use)

sudo /opt/puppetlabs/puppet/bin/puppet apply -e "class { 'mysql::server': } class { 'zabbix::proxy': hostname => 'AWS1ZAB02', zabbix_server_host => 'xxx.xxx.xxx.xxx', zabbix_version => '5.0', database_type => 'mysql' }"

What are you seeing

mysql> CREATE USER 'zabbix-proxy'@'localhost' IDENTIFIED BY "*3FB0E82C853429C7F02787F3D3BAA6BC4C364DF4" PASSWORD;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Notice: /Stage[main]/Zabbix::Database::Mysql/Exec[zabbix_proxy_create.sql]/returns: /bin/sh: 1: cd: can't cd to /usr/share/zabbix-*-mysql
Error: 'cd /usr/share/zabbix-*-mysql && if [ -f schema.sql.gz ]; then gunzip -f schema.sql.gz ; fi && mysql -h 'localhost' -u 'zabbix-proxy' -p'zabbix-proxy' -D 'zabbix_proxy' < schema.sql && touch /etc/zabbix/.schema.done' returned 2 instead of one of [0]
Error: /Stage[main]/Zabbix::Database::Mysql/Exec[zabbix_proxy_create.sql]/returns: change from 'notrun' to ['0'] failed: 'cd /usr/share/zabbix-*-mysql && if [ -f schema.sql.gz ]; then gunzip -f schema.sql.gz ; fi && mysql -h 'localhost' -u 'zabbix-proxy' -p'zabbix-proxy' -D 'zabbix_proxy' < schema.sql && touch /etc/zabbix/.schema.done' returned 2 instead of one of [0]

What behaviour did you expect instead

A successful installation of the MySQL Server, Zabbix Proxy, and configuration applied

Output log

Notice: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: created
Notice: /Stage[main]/Mysql::Server::Config/File[mysql-config-file]/ensure: defined content as '{md5}44e7aa974ab98260d7d013a2087f1c77'
Error: Execution of '/usr/bin/mysql --database=mysql -e CREATE USER 'zabbix-proxy'@'localhost' IDENTIFIED BY PASSWORD '*3FB0E82C853429C7F02787F3D3BAA6BC4C364DF4'' returned 1: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PASSWORD '*3FB0E82C853429C7F02787F3D3BAA6BC4C364DF4'' at line 1
Error: /Stage[main]/Zabbix::Database/Mysql::Db[zabbix_proxy]/Mysql_user[zabbix-proxy@localhost]/ensure: change from 'absent' to 'present' failed: Execution of '/usr/bin/mysql --database=mysql -e CREATE USER 'zabbix-proxy'@'localhost' IDENTIFIED BY PASSWORD '*3FB0E82C853429C7F02787F3D3BAA6BC4C364DF4'' returned 1: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PASSWORD '*3FB0E82C853429C7F02787F3D3BAA6BC4C364DF4'' at line 1
Notice: /Stage[main]/Zabbix::Proxy/Package[zabbix-proxy-mysql]/ensure: created
Notice: /Stage[main]/Zabbix::Proxy/File[/etc/zabbix/zabbix_proxy.conf]/content: content changed '{md5}52587f0a150d3da8995c582b10ca254c' to '{md5}8d20aa30458c6638e6c63b3fa1c85e4b'
Notice: /Stage[main]/Zabbix::Proxy/File[/etc/zabbix/zabbix_proxy.conf]/owner: owner changed 'root' to 'zabbix'
Notice: /Stage[main]/Zabbix::Proxy/File[/etc/zabbix/zabbix_proxy.conf]/group: group changed 'root' to 'zabbix'
Notice: /Stage[main]/Zabbix::Proxy/File[/etc/zabbix/zabbix_proxy.conf]/mode: mode changed '0600' to '0644'
Notice: /Stage[main]/Mysql::Client::Install/Package[mysql_client]/ensure: created
Notice: /Stage[main]/Zabbix::Database/Mysql::Db[zabbix_proxy]/Mysql_database[zabbix_proxy]/ensure: created
Notice: /Stage[main]/Zabbix::Database/Mysql::Db[zabbix_proxy]/Mysql_grant[zabbix-proxy@localhost/zabbix_proxy.*]: Dependency Mysql_user[zabbix-proxy@localhost] has failures: true
Warning: /Stage[main]/Zabbix::Database/Mysql::Db[zabbix_proxy]/Mysql_grant[zabbix-proxy@localhost/zabbix_proxy.*]: Skipping because of failed dependencies
Warning: /Stage[main]/Zabbix::Database::Mysql/Exec[zabbix_proxy_create.sql]: Skipping because of failed dependencies
Warning: /Stage[main]/Zabbix::Proxy/Service[zabbix-proxy]: Skipping because of failed dependencies
Notice: Applied catalog in 34.79 seconds

Any additional information you'd like to impart

It appears the MySQL configuration for the zabbix-proxy service does not work with 8.0 of MySQL-server.

/usr/sbin/mysqld  Ver 8.0.23-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
@dbnewman
Copy link
Author

Found issue related to other puppet module that had not updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant