Attention: Before using this script, you MUSTKNOW how to use ISPConfig API. If you are first time to learning ISPConfig API, Please go to see First time test ISPConfig API learning how to config, how to run it and how to debug with https.
After Install ISPConfig , the application would not saved any API Example or Document. So, we need to find out the example scripts at the source file and copy them to /usr/local/ispconfig.
cd /tmp
wget -O ispconfig.tar.gz https://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ispconfig.tar.gz
cd ispconfig3_install/
cp -R remoting_client/ /usr/local/ispconfig/
cd /usr/local/ispconfig/remoting_client
All API Document and example file was copied to /usr/local/ispconfig/remoting_client
ISPConfig add Remote Users
ISPConfig Web UI > system > Remote User > Add new user
Entry username & password, And click what do you want function. In first test, please click all Functions. Please remember username & password for modify API config file .
save
Modify API config file
cd /usr/local/ispconfig/remoting_client/examples/
nano soap_config.php
But some API have some BUG and not work. This is because the normally working API was disabled ‘ssl verify peer’ when using https connect. So, we need add ‘disabled ssl verify peer’ in not work API.
Test sites_web_domain_get.php, you will get a error message ‘SOAP Error: Could not connect to host‘
php sites_web_domain_get.php
SOAP Error: Could not connect to host[root@system]#
If you don’t want REDO the complete procedure, a good fix would be to use
STOP SLAVE;
SET GLOBAL sql_slave_skip_counter=1;
START SLAVE;
If there are too many such errors, a good idea would be to automate it using a bash script.
Reference : Ut xD(2017), https://serverfault.com/questions/336888/what-causes-the-mysql-error-1062-duplicate-entry-when-starting-slave, Last visit at Jan 2022