AVideo
AVideo copied to clipboard
Plugin Clone Error - Connection unexpectedly closed / unexplained error (code 255)
@DanielnetoDotCom Danny, I created a new installation of AVIDEO to run tests and isolate problems. I'm trying to clone but it's showing the following error:
Clone: Clone Start
Clone (1 of 7): Asking the Server the database and the files
Clone: Good start! the server has answered
Clone (2 of 7): Geting MySQL Dump file [wget -O /var/www/html/AVideo/videos/clones/Clone_mysqlDump_***************.sql https://**********************/Clone_mysqlDump_**************.sql]
Clone: Nice! we got the MySQL Dump file [https://**************/videos/clones/Clone_mysqlDump_****************.sql] 206.52MB
Clone (3 of 7): Overwriting our database with the server database /var/www/html/AVideo/videos/clones/Clone_mysqlDump_*****************.sql
Clone: Great! we overwrite it with success.
Clone (4 of 7): execute rsync (sshpass -p '{password}' rsync -av -e 'ssh -p 22 -o StrictHostKeyChecking=no' --exclude '*.php' --exclude 'cache' --exclude '*.sql' --exclude '*.log' @:/var/www/html/AVideo/videos/ /var/www/html/AVideo/videos/ --log-file='/var/www/html/AVideo/videos/cache/clones/client.log' )
2024/04/24 14:30:33 [27769] rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
2024/04/24 14:30:33 [27769] rsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]
Clone (5 of 7): rsync finished
Clone (6 of 7): Notify Server to Delete Dump
Clone: Dump DELETED
Clone (7 of 7): Resotre the Clone Configuration
Clone: Complete, Database, 0 Videos and 0 Photos
Total Execution Time: 2.2567868153254 Minutes
I saw this same issue in #3030, but I couldn't understand the solution.
- based on your command you are missing the cloneSiteSSHUser and cloneSiteSSHIP
- check /var/www/html/AVideo/videos/cache/clones/client.log
- Execute the code below manually, make sure you replace {cloneSiteSSHUser} and {cloneSiteSSHIP}
sshpass -p '{password}' rsync -av -e 'ssh -p 22 -o StrictHostKeyChecking=no' --exclude '*.php' --exclude 'cache' --exclude '*.sql' --exclude '*.log' {cloneSiteSSHUser}@{cloneSiteSSHIP}:/var/www/html/AVideo/videos/ /var/www/html/AVideo/videos/ --log-file='/var/www/html/AVideo/videos/cache/clones/client.log'
check /var/www/html/AVideo/videos/cache/clones/client.log
There is no CLONES directory within the CACHE directory and the LOG client was not generated. When is this directory created? I have to create?
In the directory /var/www/html/AVideo/videos/clones
there are several MYSQL Dumps that have not been deleted. But it doesn't have any LOG file.
My server is only accessed using the public key via SSH. Does this command accept this?
I also verify that the aforementioned client.log
file is not present on any of the servers.
rsync: [client] failed to open log-file /var/www/html/AVideo/videos/cache/clones/client.log: No such file or directory (2)
Ignoring "log file" setting.
Warning: Permanently added '168.138.238.116' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]
this plugin is designed to work with user and password
maybe there is another way to do it. but I am not sure
@DanielnetoDotCom There is a safer way to connect with rsync. I read in several places that connecting via publickey is the best and safest practice for connecting between servers. I think it's important to evolve this Plugin Clone tool.
This link has some instructions on this connection: https://gist.github.com/jyap808/8700714