Description: On Access Server, while creating a cluster of Access Servers or converting from a local DB (e.g., sqlite3) to an external DB server (e.g., MySQL), you may encounter the below error:
"Exception: Error while converting Databases to MySQL (9000)"
Follow the below recommendation to troubleshoot this issue.
+ Ensure your Access Server can reach your external MySQL server on your specified port. You can test that via Telnet:
telnet <mysql_ip> <Port>
+ If you're using MySQL Version 8, use "mysql_native_password" instead of "caching_sha2_password" for the password plugin. You can verify with the below command on your MySQL DB server:
SELECT User, plugin from mysql.user where User="USERNAME";
Where "USERNAME" is the username that you use to connect with your external MySQL server.
Suppose you're using "caching_sha2_password" for the password plugin; you can change that with the below command:
ALTER USER 'USERNAME'@'%' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Ensure you replace "USERNAME" and "PASSWORD" with your username and password.
+ Ensure you can connect your OpenVPN Access Server to your external MySQL server. You can test that with the below command:
mysql -u USERNAME -p -h <mysql_ip> -P <port>
Where "USERNAME" is the username that you use to connect with your external MySQL server.
+ If you're using a domain name instead of an IP for your external MySQL server, ensure that your OpenVPN Access Server can resolve DNS for that domain. You can test that with the below command:
nslookup <mysql_domain>
+ Suppose you're using MariaDB for your external DB server and Ubuntu18 on your OpenVPN Access Server; you must install additional packages on your OpenVPN Access Server. You can do that by using the below commands:
wget https://archive.mariadb.org//mariadb-10.9.3/repo/ubuntu/pool/main/m/mariadb/libmariadb3_10.9.3%2Bmaria~ubu1804_amd64.deb -O /tmp/libmariadb3_10.9.3+maria~bionic_amd64.deb
sudo apt install /tmp/libmariadb3_10.9.3+maria~bionic_amd64.deb
sudo service openvpnas restart
Then you can retry the create cluster/convert DB.
+ If any of the above steps don't help you to isolate your issue, follow the below steps to collect some OpenVPN Access Server logs:
1. Open the as.conf file for editing:
nano /usr/local/openvpn_as/etc/as.conf
2. At the bottom, add this line:
DEBUG_DB=yes
DEBUG_CLUSTERDB=1
Save and exit by pressing Ctrl+x, then y
3. Restart the Access Server service:
service openvpnas restart
4. Retry creating the cluster/convert DB.
5. Collect the OpenVPN Server Logs:
cat /var/log/openvpnas.log
If you need help interpreting the results from the above commands, please collect the above logs and submit a ticket.
Comments
0 comments
Please sign in to leave a comment.