アップデートに失敗する

2021年3月20日 at 23:38

こちらと全く同じ状態で、アップデートに失敗します。
http://concrete5-japan.org/community/forums/install/post-19107/#msg19683

読んでは見たものの…恥ずかしながら理解できませんでした。
理解するために参考になるページなどはないでしょうか。

とりあえず、update.phpの内容を削除してエラーを回避しています。

タグ:

Re: アップデートに失敗する

2021年3月20日 at 23:44
8.5.2から8.5.5へのアップデートに失敗し、バックアップから復旧。
その後、順番にアップデートするのか?と思い、8.5.3にしようとしたところでエラーが。

環境情報は

# concrete5 Version
Core Version - 8.5.2
Version Installed - 8.5.2
Database Version - 20190925072210

# Database Information
Version: 5.7.30
SQL Mode:

# concrete5 Packages
Cloneamental (0.9.3), Manual Nav (2.3.3), Open Graph Tags Lite (2.1.5), Social Share Lite (2.1.3), Stucco (2.1.6)

# concrete5 Overrides
blocks/express_entry_detail/templates/spot.php, blocks/express_entry_detail/templates, blocks/express_entry_detail, js/ckeditor4/vendor/plugins/templates/plugin.js, js/ckeditor4/vendor/plugins/templates/register.js, js/ckeditor4/vendor/plugins/templates/dialogs/templates.css, js/ckeditor4/vendor/plugins/templates/dialogs/templates.js, js/ckeditor4/vendor/plugins/templates/dialogs, js/ckeditor4/vendor/plugins/templates/icons/templates-rtl.png, js/ckeditor4/vendor/plugins/templates/icons/templates.png, js/ckeditor4/vendor/plugins/templates/icons/hidpi/templates-rtl.png, js/ckeditor4/vendor/plugins/templates/icons/hidpi/templates.png, js/ckeditor4/vendor/plugins/templates/icons/hidpi, js/ckeditor4/vendor/plugins/templates/icons, js/ckeditor4/vendor/plugins/templates/lang/af.js, js/ckeditor4/vendor/plugins/templates/lang/ar.js, js/ckeditor4/vendor/plugins/templates/lang/az.js, js/ckeditor4/vendor/plugins/templates/lang/bg.js, js/ckeditor4/vendor/plugins/templates/lang/bn.js, js/ckeditor4/vendor/plugins/templates/lang/bs.js, js/ckeditor4/vendor/plugins/templates/lang/ca.js, js/ckeditor4/vendor/plugins/templates/lang/cs.js, js/ckeditor4/vendor/plugins/templates/lang/cy.js, js/ckeditor4/vendor/plugins/templates/lang/da.js, js/ckeditor4/vendor/plugins/templates/lang/de-ch.js, js/ckeditor4/vendor/plugins/templates/lang/de.js, js/ckeditor4/vendor/plugins/templates/lang/el.js, js/ckeditor4/vendor/plugins/templates/lang/en-au.js, js/ckeditor4/vendor/plugins/templates/lang/en-ca.js, js/ckeditor4/vendor/plugins/templates/lang/en-gb.js, js/ckeditor4/vendor/plugins/templates/lang/en.js, js/ckeditor4/vendor/plugins/templates/lang/eo.js, js/ckeditor4/vendor/plugins/templates/lang/es-mx.js, js/ckeditor4/vendor/plugins/templates/lang/es.js, js/ckeditor4/vendor/plugins/templates/lang/et.js, js/ckeditor4/vendor/plugins/templates/lang/eu.js, js/ckeditor4/vendor/plugins/templates/lang/fa.js, js/ckeditor4/vendor/plugins/templates/lang/fi.js, js/ckeditor4/vendor/plugins/templates/lang/fo.js, js/ckeditor4/vendor/plugins/templates/lang/fr-ca.js, js/ckeditor4/vendor/plugins/templates/lang/fr.js, js/ckeditor4/vendor/plugins/templates/lang/gl.js, js/ckeditor4/vendor/plugins/templates/lang/gu.js, js/ckeditor4/vendor/plugins/templates/lang/he.js, js/ckeditor4/vendor/plugins/templates/lang/hi.js, js/ckeditor4/vendor/plugins/templates/lang/hr.js, js/ckeditor4/vendor/plugins/templates/lang/hu.js, js/ckeditor4/vendor/plugins/templates/lang/id.js, js/ckeditor4/vendor/plugins/templates/lang/is.js, js/ckeditor4/vendor/plugins/templates/lang/it.js, js/ckeditor4/vendor/plugins/templates/lang/ja.js, js/ckeditor4/vendor/plugins/templates/lang/ka.js, js/ckeditor4/vendor/plugins/templates/lang/km.js, js/ckeditor4/vendor/plugins/templates/lang/ko.js, js/ckeditor4/vendor/plugins/templates/lang/ku.js, js/ckeditor4/vendor/plugins/templates/lang/lt.js, js/ckeditor4/vendor/plugins/templates/lang/lv.js, js/ckeditor4/vendor/plugins/templates/lang/mk.js, js/ckeditor4/vendor/plugins/templates/lang/mn.js, js/ckeditor4/vendor/plugins/templates/lang/ms.js, js/ckeditor4/vendor/plugins/templates/lang/nb.js, js/ckeditor4/vendor/plugins/templates/lang/nl.js, js/ckeditor4/vendor/plugins/templates/lang/no.js, js/ckeditor4/vendor/plugins/templates/lang/oc.js, js/ckeditor4/vendor/plugins/templates/lang/pl.js, js/ckeditor4/vendor/plugins/templates/lang/pt-br.js, js/ckeditor4/vendor/plugins/templates/lang/pt.js, js/ckeditor4/vendor/plugins/templates/lang/ro.js, js/ckeditor4/vendor/plugins/templates/lang/ru.js, js/ckeditor4/vendor/plugins/templates/lang/si.js, js/ckeditor4/vendor/plugins/templates/lang/sk.js, js/ckeditor4/vendor/plugins/templates/lang/sl.js, js/ckeditor4/vendor/plugins/templates/lang/sq.js, js/ckeditor4/vendor/plugins/templates/lang/sr-latn.js, js/ckeditor4/vendor/plugins/templates/lang/sr.js, js/ckeditor4/vendor/plugins/templates/lang/sv.js, js/ckeditor4/vendor/plugins/templates/lang/th.js, js/ckeditor4/vendor/plugins/templates/lang/tr.js, js/ckeditor4/vendor/plugins/templates/lang/tt.js, js/ckeditor4/vendor/plugins/templates/lang/ug.js, js/ckeditor4/vendor/plugins/templates/lang/uk.js, js/ckeditor4/vendor/plugins/templates/lang/vi.js, js/ckeditor4/vendor/plugins/templates/lang/zh-cn.js, js/ckeditor4/vendor/plugins/templates/lang/zh.js, js/ckeditor4/vendor/plugins/templates/lang, js/ckeditor4/vendor/plugins/templates/templates/default.js, js/ckeditor4/vendor/plugins/templates/templates/images/template1.gif, js/ckeditor4/vendor/plugins/templates/templates/images/template2.gif, js/ckeditor4/vendor/plugins/templates/templates/images/template3.gif, js/ckeditor4/vendor/plugins/templates/templates/images, js/ckeditor4/vendor/plugins/templates/templates, js/ckeditor4/vendor/plugins/templates, js/ckeditor4/vendor/plugins, js/ckeditor4/vendor, js/ckeditor4

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
7.4.13

# PHP Extensions
apcu, bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 200M
post_max_size - 30M
upload_max_filesize - 30M
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
 

Re: アップデートに失敗する

2021年3月21日 at 11:05
もう一度見直して進めてます。

エラーの確認

Doctrine \ DBAL \ Exception \ TableNotFoundException
An exception occurred while executing 'SELECT * FROM TreeFileFolderNodes WHERE treeNodeID = ?' with params ["7"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'データベース名.TreeFileFolderNodes' doesn't exist
Previous exceptions
SQLSTATE[42S02]: Base table or view not found: 1146 Table データベース名.TreeFileFolderNodes' doesn't exist (42S02)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'データベース名.TreeFileFolderNodes' doesn't exist (42S02)


次に
SystemDatabaseMigrations テーブルに 20190309000000 にあるかの確認しましたがありませんでした。
一番近いところでは 20190301133300 と 20190225184524 でした。

なので、concrete/src/Updater/Migrations/Migrations/Version20190309000000.php の実行だとおもうのですが、concrete/src/Updater/Migrations/Migrations/ の中に Version20190309000000.php はありませんでした。

この後の「20190925072210 より大きな日付のレコードを全て削除した上で、 c5:update を再チャレンジ」にある c5:update の再チャレンジとは何でしょうか。
 

Re: アップデートに失敗する

2021年3月21日 at 11:31
さらに読み進めます。

SystemDatabaseMigrations テーブルに 20190309000000 がなくて

concrete/src/Updater/Migrations/Migrations/Version20190309000000.php ファイルがない場合は

「20190925072210 より大きな日付のレコードを全て削除した上で、 c5:update を再チャレンジしてください。」

となるのだと思いますが、20190925072210 より大きなレコードは存在しないので c5:update を再チャレンジでいいのでしょうか。
 

Re: アップデートに失敗する

2021年3月21日 at 18:33
何とかコマンドラインツールも使えるようになりました。
試しに 8.5.2で c5:update --rerun も実行できたので大丈夫だと思います。

次は

・8.5.2に8.5.3の Version20190309000000.php をコピーし、migration:execute 20190309000000 --up を行う
(これをやらないと8.5.3でCLIツールが起動できない)
・concrete ディレクトリを8.5.3に置き換えて、c5:update を行う
という手順で解決しました。

に進めばいいのでしょうか。

であれば、

特定のバージョンのマイグレーションのみ実行する方法をお伝えしましたが、20190309000000以降全て再実行した方が良いかもしれません。

concrete/bin/concrete5 c5:update --since=20190309000000 --rerun

は、どのタイミングで行えばいいのでしょうか。
Version20190309000000.php が存在する8.5.3にアップしてからでしょうか。
 

Re: アップデートに失敗する

2021年4月1日 at 16:14
やっと解決しました。

リンク先の書き込みにある

・8.5.2で c5:update --rerun を行う
・8.5.2に8.5.3の Version20190309000000.php をコピーし、migration:execute 20190309000000 --up を行う 


を実行。
その後。8.5.5にアップデートするも失敗。
あらためて、アップデートする前に戻し、同じく書き込みがあった


concrete/bin/concrete5 c5:update --since=20190309000000 --rerun


を実行。
その後、データベースを確認。
SystemDatabaseMigrationsテーブルに20190309000000があるのを確認。
さらに、TreeFileFolderNodes テーブルがあるかを確認。

両方とも存在したので、8.5.5にリモートでアップデート。
で、無事にアップデート完了しました。

コマンドツール実行中に不安な表示もあり心配もしましたが、今のところうまく動いているようです。

みなさま、ありがとうございました。