Welcome to Pandora FMS Community › Forums › Community support › Advanced troubleshooting › Missing pandora_console directory during update
-
Missing pandora_console directory during update
Posted by Cursorkeys on January 10, 2017 at 21:01Version: 6.0SP4 (P) 170102
Platform: CentOSThe last two times I’ve tried to use the Online update I’ve received “Failed to copy files”.
Fixing it requires:
cd /var/www/html/pandora_console/attachment/downloads
mkdir pandora_console
chown apache pandora_consoleAs soon as the update succeeds the folder is deleted again. Is the deletion abnormal or is the issue that the folder isn’t being created at the start of the update attempt?
Many thanks,
Jon
Cursorkeys replied 7 years, 11 months ago 4 Members · 9 Replies -
9 Replies
-
-
-
-
::
Finaly, I have done a fresh install 6.0SP4 161104, but it has the same problem.
I believe there is a bug in functions_update_manager.php file, after review the function update_manager_starting_update() I see two problems:
If you obtain the error “Failed to copy files” the problem is that the 611 line says:
$full_path = $config['attachment_store'] . "/downloads/pandora_console";
And it must say:
$full_path = $config['attachment_store'] . "/downloads/unix";
Because the last_package.tgz is extracted to the “unix” folder not in “pandora_console” how the script php is awaiting.
If you obtain the error “fail to extract files” the problem is the 649 line, because where it says:
if ($result != 0) {
it should say:
if ($result != true) {
Because $result is the returned value from the function extractTo when it extracts the lastpackage.tgz
In sp3, the problem was only the copying files, but in my version 6.0SP4 161104 I had the two problems, but I have changed the files according I have explained above and the update process was ended correctly, and now I have 170116 version installed and the update manager says me there is no updates available.
-
::
Finaly, I have done a fresh install 6.0SP4 161104, but it has the same problem.
I believe there is a bug in functions_update_manager.php file, after review the function update_manager_starting_update() I see two problems:
If you obtain the error “Failed to copy files” the problem is that the 611 line says:
$full_path = $config['attachment_store'] . "/downloads/pandora_console";
And it must say:
$full_path = $config['attachment_store'] . "/downloads/unix";
Because the last_package.tgz is extracted to the “unix” folder not in “pandora_console” how the script php is awaiting.
If you obtain the error “fail to extract files” the problem is the 649 line, because where it says:
if ($result != 0) {
it should say:
if ($result != true) {
Because $result is the returned value from the function extractTo when it extracts the lastpackage.tgz
In sp3, the problem was only the copying files, but in my version 6.0SP4 161104 I had the two problems, but I have changed the files according I have explained above and the update process was ended correctly, and now I have 170116 version installed and the update manager says me there is no updates available.
Thanks for the info!
-
-
::
Thanks Antonio.s
I believe that there is other bug in the last update 170130, I have SP4 170116 when I try to update to 170130 the update manager says: There is a unknown error.
The pandora_console logs shows:
[01-Feb-2017 23:56:53 Europe/Madrid] PHP Fatal error:Â Uncaught exception 'UnexpectedValueException' with message 'unable to decompress gzipped phar archive "/var/www/pandora_console/attachment/downloads/last_package.tgz" to temporary file' in /var/www/pandora_console/include/functions_update_manager.php:624 Stack trace: #0 /var/www/pandora_console/include/functions_update_manager.php(624): PharData->__construct('/var/www/pandor...') #1 /var/www/pandora_console/include/ajax/update_manager.ajax.php(488): update_manager_starting_update() #2 /var/www/pandora_console/ajax.php(86): require_once('/var/www/pandor...') #3 {main} Â thrown in /var/www/pandora_console/include/functions_update_manager.php on line 624
I have seen the last_package.tgz is downloaded, but there is a problem to decompress the file.
If I open a shell to do a tar -zxvf last_package.tgz the procces ends with:tar: Child returned status 2 tar: Error is not recoverable: exiting now
I believe that the last_package.tgz corresponding to 170130 version is corrupted. The Pandora team has tested the last_package.tgz (170130) integrity?
Thanks
-
-
::
As an update for what I did in the end: I fixed this by creating a dot-file owned by root in /var/www/html/pandora_console/attachment/downloads/pandora_console.
As the update script doesn’t have root permissions it can’t remove that file to delete the directory so everything continues working. Not elegant but a solution nonetheless!