Installation help

Error during upgrade to 2.0 - Incorrect pool file content

 
 
Me and my son
Error during upgrade to 2.0 - Incorrect pool file content
 

Upgrading from 1.9 to 2.0.

During the setup process I get the screen about the PHP config, one yellow everything else is green. Next screen shows the installed modules.  When I click to go on, I get a screen with "System

Migrated course files - course 25/35.

and error: "Incorrect pool file content".

 

Clicking continue takes me back to first install screen.

 
Average of ratings:Useful (1)
Tim at Lone Pine Koala Sanctuary
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

This looks like an interesting bug you have found. This is one of those things that should never happen, so the fact you caused it when upgrading your site is worth investigating. Can you look in your logs, or turn on Debugging to see if that generates a more helpful error message?

 
Average of ratings: -
Me and my son
Re: Error during upgrade to 2.0 - Incorrect pool file content
 
Here is one log, will this help?  How would I turn on debugging at this time?

[Sat Nov 27 05:48:48 2010] [error] [client 24.11.241.30] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/favicon.ico
[Sat Nov 27 06:07:51 2010] [error] [client 97.104.47.146] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/favicon.ico
[Sat Nov 27 06:08:27 2010] [error] [client 97.104.47.146] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/favicon.ico
[Sat Nov 27 08:15:20 2010] [warn-phpd] mmap cache can't open /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/lib/installlib.php - Permission denied (pid 14161)
[Sat Nov 27 08:15:48 2010] [error] [client 67.228.76.131] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/login/index.php
[Sat Nov 27 08:15:48 2010] [error] [client 67.228.76.131] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/login/index.php
[Sat Nov 27 08:17:22 2010] [error] [client 75.203.236.215] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/theme/standard/style/[[pix:theme|hgradient]]
[Sat Nov 27 08:17:29 2010] [error] [client 75.203.236.215] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/theme/standard/style/[[pix:theme|hgradient]]
[Sat Nov 27 08:18:57 2010] [error] [client 75.203.236.215] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/theme/standard/style/[[pix:theme|hgradient]]
[Sat Nov 27 08:19:01 2010] [error] [client 75.203.236.215] File does not exist: /usr/local/4admin/apache/vhosts/roaddoc.com/httpdocs/moodle16/theme/standard/style/[[pix:theme|hgradient]]
Default exception handler: Incorrect pool file content 9af4a96b8dfc40ec3265f2f89966bb06c12db083. Debug:
* line 1049 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
* line 779 of /lib/filestorage/file_storage.php: call to file_storage-add_file_to_pool()
* line 336 of /lib/db/upgradelib.php: call to file_storage-create_file_from_pathname()
* line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
* line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
* line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
* line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 252 of /admin/index.php: call to upgrade_core()

Default exception handler: Incorrect pool file content 9af4a96b8dfc40ec3265f2f89966bb06c12db083. Debug:
* line 1049 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
* line 779 of /lib/filestorage/file_storage.php: call to file_storage-add_file_to_pool()
* line 336 of /lib/db/upgradelib.php: call to file_storage-create_file_from_pathname()
* line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
* line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
* line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
* line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 252 of /admin/index.php: call to upgrade_core()


Thanks,
Shawn
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Well, the stack trace shows us exactly where in the upgrade process this error is occurring. That helps a bit. The error message does not give details of which file caused the problem. I made a patch to improve the error message, but this is not really my area of expertise, so it needs to be reviewed by one of the Moodle HQ people before it is committed.

(The patch is here: http://pastebin.com/SrWwcxpE but it is broken, I forgot to rename the calls to the exception class, as well as renaming the class.)

 
Average of ratings: -
Me and my son
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I tried the upgrade again, cleared the moodle directory, put a fresh copy of the 2.0 files in there, put in my config.php file with my settings and also with the debug settings in it,

$CFG->debug = 6143;
$CFG->debugdisplay = 1;

Started the upgrade again, first 2 screens (PHP settings and installed modules) goes OK.  Click on the start upgrade button, few minutes go by and I get a message in the middle of the screen:

 

"Site is being upgraded, please retry later."

 

No matter where I try to go to in the site, that is what I get.

 
Average of ratings: -
Me and my son
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I don't know why, but I have been able to get the install to work.

I took the debug messages out of the config.php, uploaded a new copy of the 2.0 files again, and reran the install.

Rec'd no errors and everything appears to be functioning.

 
Average of ratings: -
Picture of Matteo Scaramuccia
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group DevelopersGroup Particularly helpful Moodlers

Hi Shawn,

are you using a language different fron the standard English? See e.g. /path/to/httpdocs/moodle16/theme/standard/style/[[pix:theme|hgradient]], which sounds like missing localization strings or something not correctly addressed during the upgrade stage

Question: moodle16 stands for Moodle 1.6 or it is the old name of an already migrated Moodle installation, from 1.6 to 1.9?

HTH,

Matteo

 
Average of ratings: -
Me and my son
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Everything should be English, I haven't used anything else.

The Moodle16 comes from when I first started playing with Moodle, 1.5 was current.  I installed 1.5, played with it a bit and then started a seperate site with 1.6, hence moodle16.  That became my live site and I have just upgraded from then, I have never gotten around to migrating to a plain moodle site.

 
Average of ratings: -
Picture of Roy Anciso
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I receive a similar error:

System

 

Incorrect pool file content 8613efbb71690aca613b9498dae2f3dfa15c23b1.

More information about this error

Stack trace:
  • line 1031 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 779 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
  • line 336 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()
  • line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
  • line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 252 of /admin/index.php: call to upgrade_core()
 
Average of ratings: -
Picture of Chris Scurrah
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I have just got the same error, whilst upgrading I have had to press the refresh button on my browser as it kept timing out and saying done. (I was using the latest version of firefox

 

Migrating assignment submissions - 3363/4745.

1.34 sec

70.87%

Incorrect pool file content d2901f1f5f46134bd8cd767448c1da7daf9a41a2.

More information about this error

Stack trace:
  • line 1031 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 779 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
  • line 86 of /mod/assignment/db/upgrade.php: call to file_storage->create_file_from_pathname()
  • line 490 of /lib/upgradelib.php: call to xmldb_assignment_upgrade()
  • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 290 of /admin/index.php: call to upgrade_noncore()
 
Average of ratings: -
Picture of Chris Scurrah
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

With debug on I get the following:-

 

Notice: Trying to get property of non-object in /home/svc/public_html/lib/outputlib.php on line 406

Notice: Trying to get property of non-object in /home/svc/public_html/lib/outputlib.php on line 407

Notice: Trying to get property of non-object in /home/svc/public_html/lib/outputlib.php on line 408

Warning: Invalid argument supplied for foreach() in /home/svc/public_html/lib/outputlib.php on line 420

Warning: Invalid argument supplied for foreach() in /home/svc/public_html/lib/outputlib.php on line 427

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/svc/public_html/lib/outputlib.php on line 1115

Warning: Invalid argument supplied for foreach() in /home/svc/public_html/lib/outputlib.php on line 1118

Can not find layout file for: maintenance
  • line 1129 of /lib/outputlib.php: call to debugging()
  • line 583 of /lib/outputrenderers.php: call to theme_config->layout_file()
  • line ? of unknownfile: call to core_renderer->header()
  • line 1200 of /lib/setuplib.php: call to call_user_func_array()
  • line ? of unknownfile: call to bootstrap_renderer->__call()
  • line 1036 of /lib/upgradelib.php: call to bootstrap_renderer->header()
  • line 1129 of /lib/upgradelib.php: call to upgrade_started()
  • line 485 of /lib/upgradelib.php: call to print_upgrade_part_start()
  • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 290 of /admin/index.php: call to upgrade_noncore()

Upgrading to new version

You are not logged in. (Login)

mod_assignment

Migrating assignment submissions - 3363/4745.

0.99 sec

70.87%

Incorrect pool file content d2901f1f5f46134bd8cd767448c1da7daf9a41a2.

More information about this error

Stack trace:
  • line 1031 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 779 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
  • line 86 of /mod/assignment/db/upgrade.php: call to file_storage->create_file_from_pathname()
  • line 490 of /lib/upgradelib.php: call to xmldb_assignment_upgrade()
  • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 290 of /admin/index.php: call to upgrade_noncore()
 
Average of ratings: -
Picture of Chris Scurrah
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

p.s. I'm upgrading from 1.9.10 to 2.0

 
Average of ratings: -
Picture of David Mudrák
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Translators

Hi Chris,

please look into your moodledata directory after this error is thrown and locate the file

moodledata/filedir/d2/90/d2901f1f5f46134bd8cd767448c1da7daf9a41a2

Please copy the file and either attach it here in the forum of send it to my email david@moodle.com

Then connect to the Moodle 2.0 database (that is the one being upgraded) and run a query

SELECT * FROM mdl_files WHERE contenthash = 'd2901f1f5f46134bd8cd767448c1da7daf9a41a2';

and again, either publish the result here or send me it to email.

Thanks in advance

 
Average of ratings:Useful (1)
Picture of Chris Scurrah
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Thanks for your reply David

I think I've traced the error to a corrupt .pdf file in one of my courses, so am currently uploading my moodledata directory from scratch and will try to perform the upgrade again. I'll let you know if it clears the installation problem or not.

 
Average of ratings: -
Picture of Silvia Rojas
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi,

I am not very new, but please, I would like to know:

Why I can not upload a file , concretly in the front page, I receive this message every time I try to do it:

Incorrect pool file content a24d88d57cee10e7b9d3a59cc42a86ef7452bc52.

Thanks in advance for your attention,

Silvia Rojas

 
Average of ratings: -
Picture of Oleg Sychev
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Developers

I too have the same problem upgrading 1.9 site

Migrated course files - course 38/64.

0.01 sec

 59.38%

Incorrect pool file content c00f0660c07d9e91f685948573a6f35f34004967.

More information about this error

Stack trace:
  • line 1138 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 845 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
  • line 365 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()
  • line 388 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 98 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 593 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
  • line 1406 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 236 of /admin/index.php: call to upgrade_core()


Directory moodledata/filedir/c0/0f is empty.

 
Average of ratings: -
Picture of Oleg Sychev
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Developers

Well, for me it was big file and insufficient disk space to copy it. 

The error message really could be more helpful....

 
Average of ratings: -
Picture of John White
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi All,

We have had the same probblem, same nasty red block! But I wonder if the problem is with THE SIZE OF THE FILE rather than the file being corrupt?? We had our first such error on a 1.6GB backup zip file! If may of course be corrupt, but its SIZE was what made me ask the question.

Either way, too big or too corrupt, it's nice to know which file. Debug info doesn't say so I just added echo $pathname; in /lib/filestorage/file_storage.php at line 1062 as...

if (file_exists($hashfile)) {
if (filesize($hashfile) !== $filesize) {
echo $pathname;
throw new file_pool_content_exception($contenthash);
}

etc etc

...to tell me. And then deleted the backup file (in this case)

Regards, John

 
Average of ratings: -
Picture of Chris Carman
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Thank you, this helped me track down the pool problem we were having as well when we were updating from 1.9.5 to 2.2.4.  It turned out that the first part of the upgrade process used up huge amounts of disk space and kept filling up our poor /var partition, which needs to be moved to a new disk (someday!).  The line number was different in 2.2.4, but adding that line just above the 'throw' line helped me to figure out what was going on.  Thanks again!

 
Average of ratings: -
Picture of Roy Anciso
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I tried upgrading from the command line and received the following output:

[root@moodle cli]# php upgrade.phpYour Moodle files have been changed, and you are about to automaticallyupgrade your server to this version: 
2.0 (BUILD: 20101125) (2010112400) 
Once you do this you can not go back again. 
Please note that this process can take a long time. 
Are you sure you want to upgrade this server to this version?type y (means yes) or n (means no): y-->SystemDefault exception handler: Incorrect pool file content 8613efbb71690aca613b9498dae2f3dfa15c23b1. Debug: * line 1031 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown* line 779 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()* line 336 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()* line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()* line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()* line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()* line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()* line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()* line 106 of /admin/cli/upgrade.php: call to upgrade_core()
!!! Incorrect pool file content 8613efbb71690aca613b9498dae2f3dfa15c23b1. !!!!! Stack trace: * line 1031 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown* line 779 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()* line 336 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()* line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()* line 359 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()* line 100 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()* line 592 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()* line 1309 of /lib/upgradelib.php: call to xmldb_main_upgrade()* line 106 of /admin/cli/upgrade.php: call to upgrade_core() !!

 
Average of ratings: -
Picture of David Mudrák
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Translators

Shawn, Roy, Chris,

thanks again for the reports. I am currently trying (together with Petr Škoda who is the main author of the new File API) to track down the source of your issues. We would need to know more about your environment - especially if you are using a shared web provider or are using own server. One possible reason for the described buggy behaviour is that there is some resident anti-virus program running at the server that checks the files on the write-time into moodledata. If the file is infected with a virus and the AV program heals it automatically after it is saved in the file pool, you would experience the described situation.

Can you please make sure that no such anti-virus program is running at the server? And if it is, can you manage to run it and heal all eventually infected files in 1.9 moodledata before the upgrade starts?

 
Average of ratings: -
Picture of Chris Scurrah
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi David / Petr

I'm on a dedicated server running MySQL 5.0.67, PHP 5.2.10 with Moodle 1.9.10 installed before upgrading to Moodle 2.0. There are 1505 users on the system and the moodledata directory is 11.2Gb in size with 135,000 files (course, scorm, user files etc). I have also got ClamAV installed.

I had two corrupt files, one was a .pdf and the other was a . rtf which I managed to fix by resaving them and then by uploading the fixed versions back onto the server.

I am currently trying to install Moodle 2.0 again on copy of my production server (with the files fixed) and will update you about any more errors I encounter.

I've had to refresh my browser to continue the upgrade (I'm using Firefox 3.6.12). I also got the message 'Site is being upgraded, please retry later' but if I waited for about 5 minutes and tried again it continued the upgrade

I'm guessing the faulty corrupt files were causing the initial problem

Hope that helps a little

 
Average of ratings:Useful (1)
Picture of David Mudrák
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Translators

Hi Chris,

I am afraid re-saving the file and uploading it manually to filepool is definitely wrong. The files in moodledata/filedir/ must not be touched by anything but Moodle Files API. By re-saving the file, you probably changed its content and therefore its content SHA1 hash is different and the file must not be saved in the same location. Or did I misunderstand you and you resaved the file in 1.9 before you start the upgrade?

Note the upgrade procedure does not actually open the files, it just copies them. So the upgrade does not bother if the file is corrupted or not... It considers them all as plain binary data.

 
Average of ratings: -
Picture of Chris Scurrah
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I resaved them on 1.9 before upgrading to 2.0 again

 
Average of ratings: -
Picture of Martin Dyer
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi,

I am getting the same problem at the 'Migrating assignment submissions' stage.  How did you go about establishing whihc files were causing the problems?

Thanks

 
Average of ratings: -
Picture of Melissa Benson
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Particularly helpful MoodlersGroup Testers

I'm getting the same error. 1.9.11 -> 2.0.2

Here's my blog post on it

The last debugging message I get before the red box saying Incorrect Pool Fiel Content..

 

INSERT INTO mdl_upgrade_log (type,plugin,version,targetversion,info,details,backtrace,userid,timemodified) VALUES(?,?,?,?,?,?,?,?,?) [array ( 0 => 2, 1 => 'core', 2 => '2008073112', 3 => 2011033002.01, 4 => 'Exception: file_pool_content_exception', 5 => 'Incorrect pool file content 17f65e7276dd4895c5fc8970e2aa834622a3696b.', 6 => '* line 1061 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown * line 809 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool() * line 337 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname() * line 360 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course() * line 98 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course() * line 593 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses() * line 1382 of /lib/upgradelib.php: call to xmldb_main_upgrade() * line 273 of /admin/index.php: call to upgrade_core() ', 7 => 0, 8 => 1302

 

And then I get

 

Stack trace:

  • line 1061 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 809 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
  • line 337 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()
  • line 360 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 98 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 593 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
  • line 1382 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 273 of /admin/index.php: call to upgrade_core()
 
Average of ratings: -
Picture of Website Designer
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi guys I get the same error when uploading a SCORM package. Doesn't seem to happen to all scorm packages, I have uploaded my test one fine. Any suggestions? I've tried giving it a new name, creating a new course for it nothing works. This is using Moodle 2.0.I see there is a bug mentioning a similar error in the bugs list but I'm not sure it's the same thing. I get the red error shown a few posts above saying Incorrect pool file content 29a8bd8479fa741890cb2177bf931629ae385568

Thanks

Dan

 
Average of ratings: -
Picture of Website Designer
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi guys my issue turned out to be a problem with not enough disk space on the server.

 
Average of ratings: -
Sketch...
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Particularly helpful Moodlers

The Tracker issue for this (or similar) problem is: MDL-27137.

 
Average of ratings: -
Picture of harshal mundiwale
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I get this error but i am not upgrading.

I traced a file (an html file) in the filedir that i wanted to change. The reason for doing this i did not wanted to upload the SCORM package once again as it was a small change.

When editing the same scorm from moodle i get this error when i save the scorm edit page.

is this manual edit to the package file causing the error?

 
Average of ratings: -
Picture of Pedro Alburquerque
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hello to all.

I get the same error upgrading from 1.9.10+ to 2.0.3+

Here is an image of the error:

What can I do?

Anybody has solved this error?

Thanks.

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi everyone, we are receiving the same error message but on a restore of a backup file.  We are running 2.1.1.  I did a very simple course, 1 topic, 1 file uploaded, and backed it up and restored it to a new course and it throws the same error message.  

Here are the backup details:

 

and here is the actual error message on restore:

 

When I go into the new "restored" course, I do see the file under topic 1:

But when I click on the file I get the following message:  "File not found, sorry."

I have tried this with a couple of courses.  One had lessons with questions in it using a question bank.  The question bank showed the questions but when you went to preview they were all blank and the restored class only showed topic one's lesson.  

Attached is the result of "SELECT * FROM mdl_files WHERE contenthash = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';"  

That file under the moodledata/filedir/da/39/da39a3ee5e6b4b0d3255bfef95601890afd80709 is there but it is empty.

If there is anything else you want or would like me try, please let me know and I'll get it to you asap.  I'm also going to try to narrow it down some more myself.  Hopefully we can find a solution quickly since our teachers are coming back and starting to build their courses in a dev environment to restore to prod.

Thanks in advance,

WaltDjr

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

As a follow up in my findings, the file mentioned above in my test is actually showing up in my backup file in the files folder.  However, when I look at my files.xml file in the backup, it shows the following:

<?xml version="1.0" encoding="UTF-8"?>
<files>
<file id="9857">
<contenthash></contenthash>
<contextid>24301</contextid>
<component>mod_resource</component>
<filearea>content</filearea>
<itemid>0</itemid>
<filepath>/</filepath>
<filename>Pre_Post Test Brief.rtf</filename>
<userid>5</userid>
<filesize>109502</filesize>
<mimetype>text/rtf</mimetype>
<status>0</status>
<timecreated>1314217050</timecreated>
<timemodified>1314217050</timemodified>
<source>$@NULL@$</source>
<author>Jonathan Newman</author>
<license>allrightsreserved</license>
<sortorder>1</sortorder>
</file>
<file id="9858">
<contenthash></contenthash>
<contextid>24301</contextid>
<component>mod_resource</component>
<filearea>content</filearea>
<itemid>0</itemid>
<filepath>/</filepath>
<filename>.</filename>
<userid>5</userid>
<filesize>0</filesize>
<mimetype>$@NULL@$</mimetype>
<status>0</status>
<timecreated>1314217050</timecreated>
<timemodified>1314217050</timemodified>
<source>$@NULL@$</source>
<author>$@NULL@$</author>
<license>$@NULL@$</license>
<sortorder>0</sortorder>
</file>
</files>
 

Is the second file ID normal in a backup with all the null attributes?  If this is normal, my opinion is it's something definitely in the restore process that's having problems.

 
Average of ratings: -
Lemon Tree
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I also have the Incorrect pool file error... upgrading from 1.9.13+ to 2.04+

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

After further investigation, we think it has something to do with our backups.

If I backup a course from demo.moodle.net, it restores fine on our system.
If I then backup that new course on our system and try to restore in on either our system as a new course or back on the demo site, we get the incorrect pool file content error.  We even updated to 2.1.1+ since that's what the demo site is running. 

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

One other thing I just noticed.   Every backup, doesn't matter which course, all have the same contenthash on the restore error message.  

I did a search on the hash and this is what I got back.

sha1("") = da39a3ee5e6b4b0d3255bfef95601890afd80709

So does that mean it's not passing a variable in correctly?

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Another update:

We get the same results when trying to import courses as well.

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

One more thing I just thought of too.  We were running 2.0.3 and the backups worked fine.  However, we upgraded to 2.1 and then 2.1.1 and now are having the backup problems.   I do not think we tested backups at 2.1 so I do not know if they work then or not.

 
Average of ratings: -
Picture of Jar Hielt
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I have been having this problem since 2.1.X i belive this is when the re-write to the backup and restore system started as pre 2.1.X the backup and restore worked fine 2.0.x to 2.0.x

Obviously something broke when trying to implement courese restorations from a 1.9 moodle to 2.0+ system.

Which is really frustrating as i had come to terms with not being able to restore 1.9 courses into 2.0 and started to get our users to build courses in 2.0 on the test system ready for the 2.0 live system i was developing. Now that it's 2.1 i'm screwed as all the 2.0 courses won't move across, yet my really old outdated 1.9 courses do. why break something that was working?

 
Average of ratings: -
Picture of Walter Draffin
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I fixed our installation.   I was using the BigBlueButton plugin and it was causing the problem.  I deleted that plugin and removed the folder from the mod folder, and all issues are fixed.  

BigBlueButton plugin was our problem but it may be other plugins for other installations.  

 
Average of ratings: -
Picture of German Valero
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Documentation writersGroup Particularly helpful MoodlersGroup Translators

Hi,

I am also getting a similar error when restoring a course from a 2.1 to a 2.1+ server, with the following info:

error screen

We are trying to move courses from an experimental developing server to a production server in my University.

We would really appreciatte any suggestions, as this looks as if Moodle 2.1 might become "Moodle Vista".

 
Average of ratings: -
Picture of John Leonard
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi I had exactly the same error as above (incorrect pool file content....).

I am upgrading from 1.9.15 to 2.2


I too am running firefox and had to refresh the screen during the upgrade. It seemed to be stuck on the first bit (increasing the size of the user id field).
The first time I refreshed, the progress bar jumped to upgrading courses but then threw the incorrect pool file content error when I refreshed some time later.
So after reading the above posts I deleted every zip file in my data folder.
Used the following to do that
cd /moodle/data/folder
Then
find . -type f -name \*.zip -print
This finds all of the zip files in the hundreds of sub folders in the data directory
Then
find . -type f -name \*.zip -print | xargs rm This deletes all of those zip folders
Then ran the upgrade again.
As I type the upgrade is still proceeding in another tab and is 54% done without a refresh. Previously it crashed on about 13%. Hope this helps someone. cheers.

 

Update All courses upgraded fine but then go an error to do with database connectivity and illegal mix of collations. Next forum!

 
Average of ratings: -
Picture of KT Fav
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I am having the same problem. I found the contenthash file but could not find any records in the database.

I echo'ed the pathname and found the file that was having a problem. It was an .html file that was only 2K (so not large) and not missing from the new server.

We are migrating from 1.91+ to 2.0 (to eventually be moving to 2.2). I am upgrading on a second server so as not to mess up the original.

Please advise. I cannot get past this error.

 
Average of ratings: -
Picture of Simon Phipps
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi, Does anyone have any more progress on this?

I've just moved to a new host and upgraded the moodle at the same time from 2.1.1+ to the current stable build 2.2.1+.  When I tried the updated site my scorm object wouldn't load, so I tried uploading it again and got the : incorrect pool file error.  I turned on developer debugging and got the following:

 


Incorrect pool file content ac1c260262e8011a1766eda642dfbf4804303112.

More information about this error

Stack trace:
  • line 1163 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 959 of /lib/filestorage/file_storage.php: call to file_storage->add_string_to_pool()
  • line 353 of /lib/filestorage/zip_packer.php: call to file_storage->create_file_from_string()
  • line 217 of /lib/filestorage/stored_file.php: call to zip_packer->extract_to_storage()
  • line 229 of /mod/scorm/locallib.php: call to stored_file->extract_to_storage()
  • line 126 of /mod/scorm/lib.php: call to scorm_parse()
  • line 443 of /course/modedit.php: call to scorm_add_instance()

Hope that helps and I'm happy to provide any more information I can.

Thanks

Simon

 
Average of ratings: -
Picture of Paul Tosney
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Testers

Same is happening to me in a 1.9.10 to 2.2.2 upgrade test.

I get this...

• line 1120 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
• line 845 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
• line 365 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()
• line 388 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
• line 98 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
• line 593 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
• line 1406 of /lib/upgradelib.php: call to xmldb_main_upgrade()
• line 236 of /admin/index.php: call to upgrade_core()

When I track down the file in filedir/ it is usually pretty big...100 to 650Mb

Anything I can do to get around this or am I stuck with 1.9.10 until this bug is resolved?????

 
Average of ratings: -
Picture of Matt Smith
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I have the same issue, i just located the file and renamed it. 

The course was skipped but my installation continued.

 
Average of ratings: -
Picture of Zak Fleming
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I have got the same error i did 5 test upgrades with no issues and when i did the production one i got this. Typical!

I have tracked down the problem file, how can i find out what its from please?

 
Average of ratings: -
Picture of Rick Pruitt
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I have the same error and I see the file referred to is related to the FLV plug in that is not current in 2.2 (upgrading from 1.8, now 1.9 to 2.2). It was to simply play a video that had a quiz related to it.

How can I tell it to skip that course and finish?

 
Average of ratings: -
Picture of Rick Pruitt
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

I changed the directory name for the file and it has completed the upgrade. I also had to remove some other outdated MOD directories to allow it to finish, like the certificate, flv, lams and hotspot.

 
Average of ratings: -
Paul
Scorm AICC Error
 

Am I right in thinking that the developers have noted that there is a bug in the Version 2.2 of Moodle with regard to the Uploading of SCORM and AICC packages.

I have version 2.2 of moodle and tried yesterday to uplaod a SCORM 1.2, then a SCORM 2004, and finally an AICC file and each time received the following message: Incorrect pool file content a9c4f4b78fc566ee3b5257e7a2c03024d60d3701.

Does anyone know how I can solve this problem, or have the developers resolved this issue in later versions of Moodle?

Thanks in advance for any input.

Best wishes,


Paul

 
Average of ratings: -
Picture of Marcio Antunes
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Obtive o mesmo erro, porém o tutorial de instalação pede para carregar os arquivos do 2.0 sobre os do 1.9, fiz isto em uma pasta de copia para testar antes de fazer valendo, dai claro os arquivos não foram carregados, nenhum se encontrava na pasta, carreguei eles e deu certo.

 

Att M. Antunes

 
Average of ratings: -
Picture of Rafa Gutierrez
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

diff --git a/lib/db/upgradelib.php b/lib/db/upgradelib.php

index 6f1455f..b2e7ec1 100644
--- a/lib/db/upgradelib.php
+++ b/lib/db/upgradelib.php
@@ -385,6 +385,7 @@ function upgrade_migrate_files_course($context, $path, $delete) {
}

//migrate recursively all subdirectories
+ echo "\n migrate file.. ".$path.$item->getFilename();
upgrade_migrate_files_course($context, $path.$item->getFilename().'/', $delete_this);
if ($delete_this) {
// delete dir if empty
diff --git a/lib/filestorage/file_storage.php b/lib/filestorage/file_storage.php
index d61e10f..ffc4b92 100644
--- a/lib/filestorage/file_storage.php
+++ b/lib/filestorage/file_storage.php
@@ -1114,7 +1114,7 @@ class file_storage {

$hashpath = $this->path_from_hash($contenthash);
$hashfile = "$hashpath/$contenthash";
-
+ echo "\n filesize ".$filesize."path hashfile: ".$hashfile." ".filesize($hashfile);
if (file_exists($hashfile)) {
if (filesize($hashfile) !== $filesize) {
throw new file_pool_content_exception($contenthash);

SOLUTION:

delete file $hashfile  (mdl_files table does not contain that file)

 
Average of ratings: -
Picture of Andrei Catalyst
Re: Error during upgrade to 2.0 - Incorrect pool file content
 

Hi all,

 

We have experienced the same problem when updating Moodle 1.9 to 2.2.6.

The upgrade fails with the following error.

Migrated course files - course 219/258.

0.07 sec

 84.88%

file name: /var/lib/sitedata/335/sai_gab_multi_v500_Generic_OCCAM.zip

file size: 1136109318

hashfile: /var/lib/sitedata/filedir/4d/c1/4dc19675afcac46f8233ead91aa88a45f3d70f62

http://dev.andrei.toll.local/theme/image.php?theme=standardtotara&image=error&rev=5&component=theme");font-family:Arial, Helvetica, sans-serif;font-size:13px;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:18.200000762939453px;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-position:8px 11px;">

Incorrect pool file content 4dc19675afcac46f8233ead91aa88a45f3d70f62.

More information about this error

Stack trace:
  • line 1125 of /lib/filestorage/file_storage.php: file_pool_content_exception thrown
  • line 845 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
  • line 365 of /lib/db/upgradelib.php: call to file_storage->create_file_from_pathname()
  • line 98 of /lib/db/upgradelib.php: call to upgrade_migrate_files_course()
  • line 607 of /lib/db/upgrade.php: call to upgrade_migrate_files_courses()
  • line 1418 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 300 of /admin/index.php: call to upgrade_core()

 

 

File /var/lib/sitedata/335/sai_gab_multi_v500_Generic_OCCAM.zip file

exists and is about 1.3 Gb in size.

Temporary mdl_files table exists but is empty:

select count(*) from mdl_files;
+----------+
| count(*) |
+----------+
|        0    |
+----------+
1 row in set (0.00 sec)

Reading this thread and related Moodle bug I have not found clear solution what to do in this case.

I restored the database several times and rerun the update but alway ended up with the same error.

Can anybody suggest a solution how to fix/workaround this?

 

 
Average of ratings: -
Picture of Ken Task
Re: Error during upgrade to 2.0 - Incorrect pool file content
Group Particularly helpful Moodlers

Well, it is a hickup on the code of 2.2.x and don't think it will be fixed.   That version no longer supported for fixes or updates.

Hope you were working with a copy of the 1.9 data directory (as recommended).

Here's what you could check ... if you have any 1.9 course backups they are in datafolder/courseidnumber/backupdata/ then backup...blah.zip.

Move all of those backup...blah.zip's  out of of the data directory to a place for archiving.

Here's what you could try with the problem course/file ...

The course ID folder is 335.  Jot down the name of that course so you can find it later.  Make an archive of that folder - zip will do.

Go into that folder (leave the folder intact) and *move* out into an archive space that large 1.3 Gig file.

Using a new DB, do the migration.   It might complain about a file missing, but it's been recorded in the DB mdl_files table.  After successfully migrating to the 2. turn on file system repositories.

In your converted moodledata folder (it has now been changed drastically), create a folder called 'repository'.  Make sure ownership/permissions are set so that apache user/group can read/write on it.

Inside the repository directory unzip the 335 course ID folder you archived earlier.   It should unzip creating a '335' folder.   Then go to the course that had that ID in the 1.9 and create a file system instance for that course.   Call it 'old files' and point to the 335 folder.   Your 1.3 Gig zip will be in there and accessible to Moodle 2 to relink.   *Must relink*.

It's work but one can eventually get through the migration.

Might check all the 1.9 course ID folders for other large files like that in advance of attempting the migration again.  If you find others, same process.

Good luck!

'spirit of sharing', Ken

 
Average of ratings: -