Getting a error in authentication, sql server does not support it. Can't use mail server

Do you want to: Suggest a feature / Report a bug / Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail:
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem:
Community Server/Control Panel version: Workspace new install
Type of installation of Workspace (docker, deb/rpm, exe)
OS: docker on Ubunut 22.04 LTS
Browser version:

When trying to activate the mail server I can’t get it to work. It says internal error when connecting the doman, I tried the instructions for changing the domain for the mail server, but when starting the docker image I get the error in the terminal:

Starting httpd: [ OK ]
Starting OpenDKIM Milter: opendkim: /etc/opendkim.conf: dsn:mysql://{redacted}@onlyoffice-mysql-server/onlyoffice_mailserver/table=dkim?keycol=domain_name?datacol=id: dkimf_db_open(): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[FAILED]
Starting spamd: [ OK ]
Starting fail2ban: [ OK ]

Now I can’t get the portal to open

Also I notice a error in the instructions. For MySQL the -p my-secret password option does not work. the my-secret-password needs to be removed and just -p used. And manually type the password when prompted. The -p password option is interactive only.

Hi,
I noticed there is a missmatch in the SQL server version from the default install script and the instructions on how to update the mail server. I think this is causing the error. I am testing if aligning the versions to the latest MYSQL version will work. And it does not solve the problem. I can’t add a mail domain. There is a internal server error.

[ INFO ] Checking configuration file: /usr/src/iRedMail/config … [FOUND]
[ INFO ] Import installation process status from file: /usr/src/iRedMail/runtime/install.status.
Waiting for external MySql response


  • Start iRedMail Configurations

[ INFO ] Create required system accounts: vmail, iredapd.
[ INFO ] Configure Apache web server and PHP.
[ INFO ] Configure PHP.
[ INFO ] Configure MySQL database server.
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[ INFO ] Configure Postfix (Message Transfer Agent).
[ INFO ] Configure Cluebringer (postfix policy server).
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[ INFO ] Configure Dovecot (pop3/imap/managesieve server).
[ INFO ] Configure ClamAV (anti-virus toolkit).
[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[ INFO ] Configure SpamAssassin (content-based spam filter).
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[ INFO ] Configure OpenDkim.
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[ INFO ] Configure Fail2ban (authentication failure monitor).
[ INFO ] Configure Server API.
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
rake aborted!
Mysql2::Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client
/usr/local/rvm/gems/ruby-2.3.3/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in connect' /usr/local/rvm/gems/ruby-2.3.3/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in initialize’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in new' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in mysql2_connection’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in new_connection' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in checkout_new_connection’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in block (2 levels) in checkout' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in loop’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in block in checkout' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in checkout’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in block in connection' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in connection’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in retrieve_connection' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in retrieve_connection’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in connection' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/model_schema.rb:229:in columns’
/usr/local/rvm/gems/ruby-2.3.3/gems/schema_plus-1.5.3/lib/schema_plus/active_record/base.rb:23:in columns_with_schema_plus' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/model_schema.rb:244:in column_defaults’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/base.rb:482:in initialize' /usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/persistence.rb:44:in new’
/usr/local/rvm/gems/ruby-2.3.3/gems/activerecord-3.2.22.5/lib/active_record/persistence.rb:44:in create' /var/www/html/mailserver_api-2.0.1/Rakefile:8:in block (2 levels) in <top (required)>’
Tasks: TOP => api_key:generate
(See full trace by running task with --trace)
[ INFO ] Configure SpamTrainer.
[ INFO ] Configure Awstats (logfile analyzer for mail and web server).


  • iRedMail-0.9.2 installation and configuration complete.

[ INFO ] Disable SELinux in /etc/selinux/config.
[ INFO ] Removing package(s): sendmail
Loaded plugins: fastestmirror, ovl
Setting up Remove Process
Resolving Dependencies
→ Running transaction check
—> Package sendmail.x86_64 0:8.14.4-9.el6_8.1 will be erased
→ Processing Dependency: sendmail = 8.14.4-9.el6_8.1 for package: sendmail-devel-8.14.4-9.el6_8.1.x86_64
→ Running transaction check
—> Package sendmail-devel.x86_64 0:8.14.4-9.el6_8.1 will be erased
→ Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
Package Arch Version Repository Size

Removing:
sendmail x86_64 8.14.4-9.el6_8.1 @base 1.5 M
Removing for dependencies:
sendmail-devel x86_64 8.14.4-9.el6_8.1 @base 254 k

Transaction Summary

Remove 2 Package(s)

Installed size: 1.8 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.

Erasing : sendmail-devel-8.14.4-9.el6_8.1.x86_64 1/2

Erasing : sendmail-8.14.4-9.el6_8.1.x86_64 2/2
warning: erase unlink of /var/log/mail/statistics failed: No such file or directory
warning: erase unlink of /var/log/mail failed: No such file or directory

Verifying : sendmail-devel-8.14.4-9.el6_8.1.x86_64 1/2

Verifying : sendmail-8.14.4-9.el6_8.1.x86_64 2/2

Removed:
sendmail.x86_64 0:8.14.4-9.el6_8.1

Dependency Removed:
sendmail-devel.x86_64 0:8.14.4-9.el6_8.1

Complete!
[ INFO ] Copy firewall sample rules: /etc/sysconfig/iptables.
[ INFO ] Restarting firewall …
[ INFO ] Copy MySQL sample file: /etc/my.cnf.
[ INFO ] Enable SSL support for MySQL server.



  • Congratulations, mail server setup completed successfully. Please
  • read below file for more information:
    • /usr/src/iRedMail/iRedMail.tips
  • And it’s sent to your mail account postmaster@yourdomain.com.

********************* WARNING **************************************
dig: couldn’t get address for ‘resolver1.opendns.com’: failure
dig: couldn’t get address for ‘resolver1.opendns.com’: failure
Waiting for external MySql response
[ INFO ] Checking configuration file: /usr/src/iRedMail/config … [FOUND]
[ INFO ] Import installation process status from file: /usr/src/iRedMail/runtime/install.status.
Waiting for external MySql response
< SKIP > Function: install_all.


  • Start iRedMail Configurations

< SKIP > Function: add_required_users.
< SKIP > Function: web_server_config.
[ INFO ] Configure MySQL database server.
< SKIP > Function: mysql_import_vmail_users.
< SKIP > Function: postfix_config_basic.
< SKIP > Function: postfix_config_virtual_host.
< SKIP > Function: postfix_config_sasl.
< SKIP > Function: postfix_config_tls.
< SKIP > Function: policy_server_config.
< SKIP > Function: enable_dovecot.
< SKIP > Function: clamav_config.
< SKIP > Function: amavisd_config_rhel.
< SKIP > Function: amavisd_config_general.
< SKIP > Function: amavisd_import_sql.
< SKIP > Function: sa_config.
< SKIP > Function: opendkim_config.
< SKIP > Function: fail2ban_config.
< SKIP > Function: server_api_config.
< SKIP > Function: spam_trainer_config.
< SKIP > Function: awstats_config_basic.
< SKIP > Function: awstats_config_weblog.
< SKIP > Function: awstats_config_maillog.
< SKIP > Function: awstats_config_crontab.
< SKIP > Function: cleanup.
Waiting for external MySql response
[ INFO ] Configure MySQL database server.
ERROR 1251 (08004): Client does not support authentication protocol requested by server; consider upgrading MySQL client
Starting crond: [60G[ [0;32m OK [0;39m]

Starting Dovecot Imap: [60G[ [0;32m OK [0;39m]

Starting system logger: [60G[ [0;32m OK [0;39m]

Starting amavisd: [60G[ [0;32m OK [0;39m]

Starting postfix: [60G[ [0;32m OK [0;39m]

Starting cbpolicyd: [60G[ [0;32m OK [0;39m]

Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************
[60G[ [0;32m OK [0;39m]

Starting clamd.amavisd: LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************
[60G[ [0;32m OK [0;39m]

Starting httpd: [60G[ [0;32m OK [0;39m]

Starting OpenDKIM Milter: opendkim: /etc/opendkim.conf: dsn:mysql://root:my-secret-pw@onlyoffice-mysql-server/onlyoffice_mailserver/table=dkim?keycol=domain_name?datacol=id: dkimf_db_open(): Client does not support authentication protocol requested by server; consider upgrading MySQL client
[60G[ [0;31mFAILED [0;39m]

Starting spamd: [60G[ [0;32m OK [0;39m]

Starting fail2ban: [60G[ [0;32m OK [0;39m]

Starting server

I don’t know how to update the mysql client. The YUM package manager doesn’t have any valid update source. The above is the mail server logs. Please help. I can’t get the mail serveer to work correctly.

Hello, @richard378
Analyzing your problem :handshake:
We will try to help

Please point me to the guide which you used for Workspace installation. Also please run docker ps -a and show us the output result.

Were the portal and mail server installed separately?

1 Like

I installed using the Linux script to install the docker version complete with mail server as one complete install as per the documentation. Ubuntu 22.04 LTS server.
I used, Workspace-install.sh -md mail.webhoran.com with docker version for all apps. I have abandoned trying to get it to work after trying to reinstall several times. I currently have iRedmail installed instead of onlyoffice workspace. I would prefer onlyoffice workspace, but can’t get it to work correctly. I noticed the GitHub version is several years old since the last update for the docker of the mail server. If it is not updated I wonder if anyone has been using it. When installing they seam to run correctly in docker but internally they don’t work with the default configuration. They were all installed together as all docker containers. I will try installing it again for debugging on Windows 11 as docker compose. And get back with the docker ps -a example. It seems the community edition is not working for me with the same SQL error every time I try

I apologize, I didn’t have time to review.

Let’s get straight to the point:

  • Please provide a screenshot of the “docker ps” command output.
  • Also, a screenshot of the error you’re encountering with the mail server would be really helpful. This will assist us in understanding where the issue might be occurring, especially if it’s during the Mail Wizard setup on the portal.

Feel free to share these screenshots, and we’ll do our best to assist you further.

Hi, I’m getting the same thing.

Seems to boil down to the install.sh script installing onlyoffice/mailserver:1.6.75 and that container having the ten-year-old mysql v5.1.73 client in it. Is that expected? What versions should I be seeing on a fresh install of both the mailserver container and mysql client contained within it?

This is using bash workspace-install.sh -it WORKSPACE -md office.my.domain on Ubuntu 22.04.

# onlyoffice-mail-server
root@onlyoffice:~# docker exec -it onlyoffice-mail-server mysql --version
mysql  Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1

# onlyoffice-mysql-server
root@onlyoffice:~# docker exec -it onlyoffice-mysql-server mysql --version
mysql  Ver 8.0.29 for Linux on x86_64 (MySQL Community Server - GPL)

# the community server
root@onlyoffice:~# docker exec -it onlyoffice-community-server mysql --version
mysql  Ver 8.0.33-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))

Ok I’ve got around it with this quick and dirty hack to enable mysql_native_password authentication, which in turn allows onlyoffice-mailserver to create its databases and work:

root@onlyoffice:~# docker exec -it onlyoffice-mysql-server mysql -pmy-secret-pw
# Look up mail-server IP and use it below:
CREATE USER 'root'@'172.18.0.5';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.18.0.5';
ALTER USER 'root'@'172.18.0.5' IDENTIFIED WITH mysql_native_password BY 'my-secret-pw';
quit

docker stop onlyoffice-mailserver
docker rm onlyoffice-mailserver
docker stop onlyoffice-community-server
bash install.sh -ics true -ids false -icp false -ims true -md office.my.domain -es true

At this point the onlyoffice_mailserver database was finally created and things started working.

Note “my-secret-pw” is the OnlyOffice default MySQL root password (this is a test/evaluation environment for when Zimbra OSE goes end-of-life soon).

1 Like