Hello Guest

Author Topic: Missing pandora_console directory during update  (Read 475 times)

0 Members and 1 Guest are viewing this topic.

Offline Cursorkeys

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Missing pandora_console directory during update
« on: January 10, 2017, 09:01:51 AM »
Version: 6.0SP4 (P) 170102
Platform: CentOS

The 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_console

As 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

Offline antonio.s

  • Administrator
  • Smart member
  • *****
  • Posts: 288
  • Karma: 2
    • View Profile
Re: Missing pandora_console directory during update
« Reply #1 on: January 12, 2017, 08:02:24 AM »
Hello Cursorkeys,

I think the issue is the folder isn't being created at the start of the update, because when the update ends it should be deleted. Can it be caused by an incorrect permissions of the upper level folder?

Kind regards,
Antonio.

Offline Cursorkeys

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #2 on: January 13, 2017, 04:19:41 AM »
Hi Antonio,

Thanks a lot for the information. The downloads folder was 755, user and group was apache. I've changed it to 777 and we'll see what happens next week!

Many thanks,

Jon

Offline XyVy

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #3 on: January 23, 2017, 11:27:59 AM »
I have other version, 6.0 SP3 but I have the same problem.

I have put 777 permissions to download folder but it happens the same.

any sugestion?


Offline XyVy

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #4 on: January 25, 2017, 04:25:08 AM »
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:
   
Code: [Select]
$full_path = $config['attachment_store'] . "/downloads/pandora_console";And it must say:
   
Code: [Select]
$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:
   
Code: [Select]
if ($result != 0) {it should say:
   
Code: [Select]
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.



Offline gairhald

  • Full Member
  • ***
  • Posts: 46
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #5 on: January 27, 2017, 02:18:33 AM »
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:
   
Code: [Select]
$full_path = $config['attachment_store'] . "/downloads/pandora_console";And it must say:
   
Code: [Select]
$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:
   
Code: [Select]
if ($result != 0) {it should say:
   
Code: [Select]
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!

Offline antonio.s

  • Administrator
  • Smart member
  • *****
  • Posts: 288
  • Karma: 2
    • View Profile
Re: Missing pandora_console directory during update
« Reply #6 on: January 30, 2017, 01:33:27 AM »
Hello everyone,

Thanks for posting, I've told the development team about the issues found by XyVy and we're going to apply the changes to the following versions so this issue with the update manager gets 100% resolved.
Thanks for all the info!

Kind regards,
Antonio.

Offline XyVy

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #7 on: February 01, 2017, 03:05:06 PM »
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:
Code: [Select]
[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:
Code: [Select]
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

Offline XyVy

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #8 on: February 08, 2017, 07:56:58 AM »
The 170206 update has the same error, the last_package is corrupt.

Offline Cursorkeys

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Missing pandora_console directory during update
« Reply #9 on: February 15, 2017, 08:09:56 AM »
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!