Teknologi migrasi akun pada panel hosting CWP (Control Web Panel) menggunakan API yang berjalan di port 2304, terkadang kita menghadapi kegagalan dalam proses migrasi dengan pesan Error API Connection to port 2304 cannot be established. Untuk mengatasi kegagalan tersebut anda harus melakukan proses pengecekan menggunakan perintah command line via SSH (putty).
Langkah Pertama :
[root@domainku ~]# cd /scripts/ [root@domainku scripts]#
Kemudian ketik perintah check api
[root@domainku scripts]# ./check_api
Kemudian akan muncul hasil seperti ini :
[root@domainku scripts]# ./check_api User API port 2302 check: OK Oauth query check: OK User API folder check: OK External API port 2304 check: FAILED CSF Firewall status check: ENABLED TCP_IN for port 2304 set in /etc/csf/csf.conf: OK TCP_OUT for port 2304 set in /etc/csf/csf.conf: OK
Bila terdapat pesan “External API port 2304 check: FAILED” lakukan pengecekan menggunakan :
[root@domainku scripts]# netstat -tulpn|grep cwp tcp 0 0 127.0.0.1:2302 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2082 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2083 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2086 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2087 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2030 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2095 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2031 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2096 0.0.0.0:* LISTEN 108878/cwpsrv: master
Bila port 2304 tidak muncul pada daftar diatas anda harus melakukan langkah selanjutnya
Langkah Kedua :
Lakukan penginstalasi API dengan perintah :
[root@domainku scripts]# ./install_api
Bila muncul pesan :
[root@domainku scripts]# ./install_api Failed to match /etc/pki/tls/certs/hostname.bundle and /etc/pki/tls/private/hostname.key
Lakukan perintah instalasi SSL hostname :
[root@domainku scripts]#./generate_hostname_ssl Generating RSA private key, 2048 bit long modulus .+++ ..........................+++ e is 65537 (0x10001) writing RSA key Signature ok subject=/C=HR/ST=Zagreb/O=CentOS Web Panel/L=HR/CN=localhost/OU=CentOS Web Panel/[email protected] Getting Private key Redirecting to /bin/systemctl restart postfix.service Redirecting to /bin/systemctl restart dovecot.service Redirecting to /bin/systemctl restart cwpsrv.service Redirecting to /bin/systemctl restart httpd.service Redirecting to /bin/systemctl restart nginx.service Redirecting to /bin/systemctl restart pure-ftpd.service
Setelah selesai lakukan langkah ulang
[root@domainku scripts]# ./install_api Redirecting to /bin/systemctl reload cwpsrv.service
Kemudian cek kembali menggunakan perintah :
[root@domainku scripts]# ./check_api User API port 2302 check: OK Oauth query check: OK User API folder check: OK External API port 2304 check: OK External API files and htaccess : OK CSF Firewall status check: ENABLED TCP_IN for port 2304 set in /etc/csf/csf.conf: OK TCP_OUT for port 2304 set in /etc/csf/csf.conf: OK
[root@domainku scripts]# netstat -tulpn|grep cwp tcp 0 0 127.0.0.1:2302 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2304 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2082 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2083 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2086 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2087 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2030 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2095 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2031 0.0.0.0:* LISTEN 108878/cwpsrv: master tcp 0 0 0.0.0.0:2096 0.0.0.0:* LISTEN 108878/cwpsrv: master
Terima kasih