0013508: Update from 2017.02.05 to 2017.08.06 #6682

Closed
Gloirin opened this Issue Jun 9, 2018 · 8 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by bernhard on 1 Oct 2017 20:03

Version: 2017.08.6 Community Edition

CentOS 7; php 5.6, postgresql; Update of tinebase:

SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "tine20_config_customfields" does not exist, query was: ALTER TABLE "tine20_config_customfields" RENAME TO "tine20_customfield_config"

.../vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute()
.../vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()
.../vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()
.../Setup/Backend/Abstract.php(207): Zend_Db_Adapter_Pdo_Abstract->query()
.../Setup/Backend/Abstract.php(325): Setup_Backend_Abstract->execQueryVoid()
.../Setup/Update/Abstract.php(226): Setup_Backend_Abstract->renameTable()
.../Tinebase/Setup/Update/Release2.php(27): Setup_Update_Abstract->renameTable()
.../Setup/Controller.php(576): Tinebase_Setup_Update_Release2->update_0()
.../Setup/Controller.php(461): Setup_Controller->updateApplication()
.../Setup/Frontend/Json.php(120): Setup_Controller->updateApplications()
[internal function]: Setup_Frontend_Json->updateApplications()
.../vendor/zendframework/zendframework1/library/Zend/Server/Abstract.php(232): call_user_func_array()
.../vendor/zendframework/zendframework1/library/Zend/Json/Server.php(590): Zend_Server_Abstract->_dispatch()
.../vendor/zendframework/zendframework1/library/Zend/Json/Server.php(197): Zend_Json_Server->_handle()
.../Setup/Server/Json.php(90): Zend_Json_Server->handle()
.../Setup/Core.php(115): Setup_Server_Json->handle()
.../setup.php(14): Setup_Core::dispatchRequest()

Additional information: Fehler tritt nur unter PostgreSQL auf; nicht unter MariaDB oder MySQL

@Gloirin

This comment has been minimized.

Show comment
Hide comment

Gloirin commented Jun 10, 2018

Related to #6686

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pmehrer on 2 Oct 2017 09:19

Hello,

it seems your tine20_application table got corrupted. The "version" column of your installed applications should be around 10.xx

Please restore the correct application versions from a backup and the update will work. It is a got idea not to alter that data.

best regards
Paul

Gloirin commented Jun 11, 2018

Comment posted by pmehrer on 2 Oct 2017 09:19

Hello,

it seems your tine20_application table got corrupted. The "version" column of your installed applications should be around 10.xx

Please restore the correct application versions from a backup and the update will work. It is a got idea not to alter that data.

best regards
Paul

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by bernhard on 2 Oct 2017 12:03

I am sorry, but the version numbers in the table tine20_applications seem to be correct:

tine20=# select * from tine20_applications;
id | name | status | order | version | state
------------------------------------------+----------------+----------+-------+---------+-------
f92bc9ff2a26a672e7ddb7e292c8c1a89baa9938 | Tinebase | enabled | 99 | 10.28 |
99cfe519de6577d3e7ffc29ff3867e306d1a3854 | Addressbook | enabled | 10 | 10.5 |
682eff8695af4655ca757b12fbeda030d047e9e6 | Calendar | enabled | 15 | 10.7 |
ce4fdee9fb6632223c34d17687db89db2d3b76dd | MailFiler | enabled | 12 | 10.0 |
8282fd962c9f855827364e420c0b2f50892d2f9a | Sales | enabled | 50 | 10.8 |
8ace8cc1748a58d22211ba7e47d32b55c2d8e13a | Tasks | enabled | 30 | 10.1 |
14b13c5df6c8bf6347efb830cd4a9bf54eb7a36c | HumanResources | enabled | 51 | 10.2 |
6717f75c82be8248e27cb0a72e2a974aa1a1a56c | Events | enabled | 60 | 10.1 |
2363fdc86c1ba1cd613ff1691af515486ec2aafa | Inventory | enabled | 60 | 10.3 |
a08c7372bb0a4a8265bba3cc23fce0179958a919 | Felamimail | enabled | 30 | 10.5 |
e0dee42f0acf0ee75c508689ba8bef032ebe62df | Crm | enabled | 20 | 10.1 |
e6580b89fcefacc0e37712c8a019d4637c111219 | SimpleFAQ | enabled | 62 | 10.0 |
354a50be7f59fe44c8e3106a8d4e035fb0426973 | ActiveSync | enabled | 90 | 10.0 |
b045d3199201d5098f4da3559642c1097f6d71a8 | Timetracker | enabled | 60 | 10.5 |
173e2b2a8c42676d4c06e35c3d65a02ef2e75b16 | Admin | enabled | 1 | 10.0 |
86325791268b51da1953fb8c3ada738b20f4c60f | CoreData | enabled | 30 | 10.0 |
171b4f94264a880b0645d9f0d3cf64e3bc070f3f | Projects | disabled | 60 | 10.1 |
46e57256bbf09106bf4b9a9b6069391fee48e2bb | Filemanager | enabled | 11 | 10.0 |
(18 rows)

tine20=#

Gloirin commented Jun 11, 2018

Comment posted by bernhard on 2 Oct 2017 12:03

I am sorry, but the version numbers in the table tine20_applications seem to be correct:

tine20=# select * from tine20_applications;
id | name | status | order | version | state
------------------------------------------+----------------+----------+-------+---------+-------
f92bc9ff2a26a672e7ddb7e292c8c1a89baa9938 | Tinebase | enabled | 99 | 10.28 |
99cfe519de6577d3e7ffc29ff3867e306d1a3854 | Addressbook | enabled | 10 | 10.5 |
682eff8695af4655ca757b12fbeda030d047e9e6 | Calendar | enabled | 15 | 10.7 |
ce4fdee9fb6632223c34d17687db89db2d3b76dd | MailFiler | enabled | 12 | 10.0 |
8282fd962c9f855827364e420c0b2f50892d2f9a | Sales | enabled | 50 | 10.8 |
8ace8cc1748a58d22211ba7e47d32b55c2d8e13a | Tasks | enabled | 30 | 10.1 |
14b13c5df6c8bf6347efb830cd4a9bf54eb7a36c | HumanResources | enabled | 51 | 10.2 |
6717f75c82be8248e27cb0a72e2a974aa1a1a56c | Events | enabled | 60 | 10.1 |
2363fdc86c1ba1cd613ff1691af515486ec2aafa | Inventory | enabled | 60 | 10.3 |
a08c7372bb0a4a8265bba3cc23fce0179958a919 | Felamimail | enabled | 30 | 10.5 |
e0dee42f0acf0ee75c508689ba8bef032ebe62df | Crm | enabled | 20 | 10.1 |
e6580b89fcefacc0e37712c8a019d4637c111219 | SimpleFAQ | enabled | 62 | 10.0 |
354a50be7f59fe44c8e3106a8d4e035fb0426973 | ActiveSync | enabled | 90 | 10.0 |
b045d3199201d5098f4da3559642c1097f6d71a8 | Timetracker | enabled | 60 | 10.5 |
173e2b2a8c42676d4c06e35c3d65a02ef2e75b16 | Admin | enabled | 1 | 10.0 |
86325791268b51da1953fb8c3ada738b20f4c60f | CoreData | enabled | 30 | 10.0 |
171b4f94264a880b0645d9f0d3cf64e3bc070f3f | Projects | disabled | 60 | 10.1 |
46e57256bbf09106bf4b9a9b6069391fee48e2bb | Filemanager | enabled | 11 | 10.0 |
(18 rows)

tine20=#

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by bernhard on 3 Oct 2017 15:12

is there any solution for this installation bug? The suggested solution does not work, because the version numbers in the database are correct as you can see above. Every time a user logon, he gets the hint to update tine20. But the update does not work!

Gloirin commented Jun 11, 2018

Comment posted by bernhard on 3 Oct 2017 15:12

is there any solution for this installation bug? The suggested solution does not work, because the version numbers in the database are correct as you can see above. Every time a user logon, he gets the hint to update tine20. But the update does not work!

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by lukasz on 4 Oct 2017 07:52

I am not sure if it is related but while trying to update tinebase and other apps from 2017.02.05 to 2017.08.6 I receive:

2da43 setupuser - 2017-10-04T07:40:55+00:00 ERR (3): Setup_Controller::updateApplication::582 SQLSTATE[HY000]: General error: 1025 Error on rename of './noboCrmdb/#sql-1d2b_11d' to './noboCrmdb/noboCrm_container' (errno: 150), query was: ALTER TABLE noboCrm_container CHANGE COLUMN id id varchar(40) NOT NULL
2da43 setupuser - 2017-10-04T07:40:55+00:00 ERR (3): Setup_Controller::updateApplication::583 #0 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE no...', Array) #3 /usr/share/tine20/Setup/Backend/Abstract.php(207): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLEno...', Array)
#4 /usr/share/tine20/Setup/Backend/Mysql.php(258): Setup_Backend_Abstract->execQueryVoid('ALTER TABLE no...') #5 /usr/share/tine20/Tinebase/Setup/Update/Release10.php(1353): Setup_Backend_Mysql->alterCol('container', Object(Setup_Backend_Schema_Field_Xml)) #6 /usr/share/tine20/Setup/Controller.php(576): Tinebase_Setup_Update_Release10->update_31() #7 /usr/share/tine20/Setup/Controller.php(461): Setup_Controller->updateApplication(Object(Tinebase_Model_Application), '10') #8 /usr/share/tine20/Setup/Frontend/Json.php(120): Setup_Controller->updateApplications(Object(Tinebase_Record_RecordSet)) #9 [internal function]: Setup_Frontend_Json->updateApplications(Array) #10 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Server/Abstract.php(232): call_user_func_array(Array, Array) #11 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Json/Server.php(590): Zend_Server_Abstract->_dispatch(Object(Zend_Server_Method_Definition), Array) #12 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Json/Server.php(197): Zend_Json_Server->_handle() #13 /usr/share/tine20/Setup/Server/Json.php(90): Zend_Json_Server->handle(Object(Zend_Json_Server_Request_Http)) #14 /usr/share/tine20/Setup/Core.php(115): Setup_Server_Json->handle() #15 /usr/share/tine20/setup.php(14): Setup_Core::dispatchRequest() #16 {main} 2da43 setupuser - 2017-10-04T07:40:55+00:00 ERR (3): Tinebase_Exception::log::104 Zend_Db_Statement_Exception -> SQLSTATE[HY000]: General error: 1025 Error on rename of './noboCrmdb/#sql-1d2b_11d' to './noboCrmdb/noboCrm_container' (errno: 150), query was: ALTER TABLEnoboCrm_containerCHANGE COLUMNidid` varchar(40) NOT NULL

After login in as a regular user in About Tine20 version 2017.08.6 is reported.

Gloirin commented Jun 11, 2018

Comment posted by lukasz on 4 Oct 2017 07:52

I am not sure if it is related but while trying to update tinebase and other apps from 2017.02.05 to 2017.08.6 I receive:

2da43 setupuser - 2017-10-04T07:40:55+00:00 ERR (3): Setup_Controller::updateApplication::582 SQLSTATE[HY000]: General error: 1025 Error on rename of './noboCrmdb/#sql-1d2b_11d' to './noboCrmdb/noboCrm_container' (errno: 150), query was: ALTER TABLE noboCrm_container CHANGE COLUMN id id varchar(40) NOT NULL
2da43 setupuser - 2017-10-04T07:40:55+00:00 ERR (3): Setup_Controller::updateApplication::583 #0 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE no...', Array) #3 /usr/share/tine20/Setup/Backend/Abstract.php(207): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLEno...', Array)
#4 /usr/share/tine20/Setup/Backend/Mysql.php(258): Setup_Backend_Abstract->execQueryVoid('ALTER TABLE no...') #5 /usr/share/tine20/Tinebase/Setup/Update/Release10.php(1353): Setup_Backend_Mysql->alterCol('container', Object(Setup_Backend_Schema_Field_Xml)) #6 /usr/share/tine20/Setup/Controller.php(576): Tinebase_Setup_Update_Release10->update_31() #7 /usr/share/tine20/Setup/Controller.php(461): Setup_Controller->updateApplication(Object(Tinebase_Model_Application), '10') #8 /usr/share/tine20/Setup/Frontend/Json.php(120): Setup_Controller->updateApplications(Object(Tinebase_Record_RecordSet)) #9 [internal function]: Setup_Frontend_Json->updateApplications(Array) #10 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Server/Abstract.php(232): call_user_func_array(Array, Array) #11 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Json/Server.php(590): Zend_Server_Abstract->_dispatch(Object(Zend_Server_Method_Definition), Array) #12 /usr/share/tine20/vendor/zendframework/zendframework1/library/Zend/Json/Server.php(197): Zend_Json_Server->_handle() #13 /usr/share/tine20/Setup/Server/Json.php(90): Zend_Json_Server->handle(Object(Zend_Json_Server_Request_Http)) #14 /usr/share/tine20/Setup/Core.php(115): Setup_Server_Json->handle() #15 /usr/share/tine20/setup.php(14): Setup_Core::dispatchRequest() #16 {main} 2da43 setupuser - 2017-10-04T07:40:55+00:00 ERR (3): Tinebase_Exception::log::104 Zend_Db_Statement_Exception -> SQLSTATE[HY000]: General error: 1025 Error on rename of './noboCrmdb/#sql-1d2b_11d' to './noboCrmdb/noboCrm_container' (errno: 150), query was: ALTER TABLEnoboCrm_containerCHANGE COLUMNidid` varchar(40) NOT NULL

After login in as a regular user in About Tine20 version 2017.08.6 is reported.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by lukasz on 4 Oct 2017 08:19

After trying to upgrade there is another issue. Application version of tinebase has been changed to 2 (!)

mysql> select * from noboCrm_applications;
+------------------------------------------+----------------+---------+-------+---------+-------+
| id | name | status | order | version | state |
+------------------------------------------+----------------+---------+-------+---------+-------+
| 24edebe626b578419cfe913ad54f57428059ccc3 | Events | enabled | 60 | 10.1 | NULL |
| 32e44a5150415eb01153b8128445115637704791 | Admin | enabled | 1 | 10.0 | NULL |
| 3f33de930643ab3b0f1013d9e702fda9a4e7ab90 | Tinebase | enabled | 99 | 2 | NULL |
| 50174126b4b33b39c09798d1bf955e8a749a7718 | Addressbook | enabled | 10 | 10.5 | NULL |
| 587a129d991a36c61262c94a7db5bcaf8a1a9950 | ActiveSync | enabled | 90 | 10.0 | NULL |
| 7d3bf0e5e8c5c79e9da7f96220200e9b938feff8 | Sales | enabled | 50 | 10.8 | NULL |
| 7f1e9163d0def520bb84c4224275355d56decf11 | Tasks | enabled | 30 | 10.1 | NULL |
| 813f6655c441cfb554193904d2244943e60583e9 | Projects | enabled | 60 | 10.1 | NULL |
| 884501b775cf0f76003e170bc1e9c319a5132888 | Timetracker | enabled | 60 | 10.5 | NULL |
| 8d94accd645a068e58b35640deea1b91599cbb6c | MailFiler | enabled | 12 | 10.0 | NULL |
| a4ac6be0235ec49b2c3aeeab40063a0c350f0b64 | Felamimail | enabled | 30 | 10.5 | NULL |
| b97c69cd05c052f094a9ec3734b860da13c606e6 | Calendar | enabled | 15 | 10.7 | NULL |
| c0c6f2e98d24be1864a653b43e6f2f96f586b7a3 | Crm | enabled | 20 | 10.1 | NULL |
| d60f09b48a0c9ae254fc2491e44372d093e247d0 | CoreData | enabled | 30 | 10.0 | NULL |
| de40797c75ec8ebcc96d228f109e28d7f6d849b8 | Inventory | enabled | 60 | 10.3 | NULL |
| f0a21ba9aff33f0a74ef635f83750860129a5f7f | Filemanager | enabled | 11 | 10.0 | NULL |
| ff19f7aab1c942e21fc8349207c84e87b69b5390 | HumanResources | enabled | 51 | 10.2 | NULL |
+------------------------------------------+----------------+---------+-------+---------+-------+

Gloirin commented Jun 11, 2018

Comment posted by lukasz on 4 Oct 2017 08:19

After trying to upgrade there is another issue. Application version of tinebase has been changed to 2 (!)

mysql> select * from noboCrm_applications;
+------------------------------------------+----------------+---------+-------+---------+-------+
| id | name | status | order | version | state |
+------------------------------------------+----------------+---------+-------+---------+-------+
| 24edebe626b578419cfe913ad54f57428059ccc3 | Events | enabled | 60 | 10.1 | NULL |
| 32e44a5150415eb01153b8128445115637704791 | Admin | enabled | 1 | 10.0 | NULL |
| 3f33de930643ab3b0f1013d9e702fda9a4e7ab90 | Tinebase | enabled | 99 | 2 | NULL |
| 50174126b4b33b39c09798d1bf955e8a749a7718 | Addressbook | enabled | 10 | 10.5 | NULL |
| 587a129d991a36c61262c94a7db5bcaf8a1a9950 | ActiveSync | enabled | 90 | 10.0 | NULL |
| 7d3bf0e5e8c5c79e9da7f96220200e9b938feff8 | Sales | enabled | 50 | 10.8 | NULL |
| 7f1e9163d0def520bb84c4224275355d56decf11 | Tasks | enabled | 30 | 10.1 | NULL |
| 813f6655c441cfb554193904d2244943e60583e9 | Projects | enabled | 60 | 10.1 | NULL |
| 884501b775cf0f76003e170bc1e9c319a5132888 | Timetracker | enabled | 60 | 10.5 | NULL |
| 8d94accd645a068e58b35640deea1b91599cbb6c | MailFiler | enabled | 12 | 10.0 | NULL |
| a4ac6be0235ec49b2c3aeeab40063a0c350f0b64 | Felamimail | enabled | 30 | 10.5 | NULL |
| b97c69cd05c052f094a9ec3734b860da13c606e6 | Calendar | enabled | 15 | 10.7 | NULL |
| c0c6f2e98d24be1864a653b43e6f2f96f586b7a3 | Crm | enabled | 20 | 10.1 | NULL |
| d60f09b48a0c9ae254fc2491e44372d093e247d0 | CoreData | enabled | 30 | 10.0 | NULL |
| de40797c75ec8ebcc96d228f109e28d7f6d849b8 | Inventory | enabled | 60 | 10.3 | NULL |
| f0a21ba9aff33f0a74ef635f83750860129a5f7f | Filemanager | enabled | 11 | 10.0 | NULL |
| ff19f7aab1c942e21fc8349207c84e87b69b5390 | HumanResources | enabled | 51 | 10.2 | NULL |
+------------------------------------------+----------------+---------+-------+---------+-------+

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pmehrer on 10 Oct 2017 13:35

thank you for reporting this issue. I was able to reproduce the set back of Tinebase to Version 2 (it happens only if there occurs another error and you repeat the update process and it fails again a 2nd time) This is fixed and merged. But it will not help you, as your issue is the failing update.

As mentioned in other tickets we are not able to reproduce this. Most likely you have a concurrent process altering your data while the update runs and that is why it fails (or you have a corrupted database from the start, like a missing foreign key constraint)

Gloirin commented Jun 11, 2018

Comment posted by pmehrer on 10 Oct 2017 13:35

thank you for reporting this issue. I was able to reproduce the set back of Tinebase to Version 2 (it happens only if there occurs another error and you repeat the update process and it fails again a 2nd time) This is fixed and merged. But it will not help you, as your issue is the failing update.

As mentioned in other tickets we are not able to reproduce this. Most likely you have a concurrent process altering your data while the update runs and that is why it fails (or you have a corrupted database from the start, like a missing foreign key constraint)

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 18 Oct 2017 12:04

i could not reproduce this, too.

maybe the problem is already fixed. please try again with upcoming 2017.08.7 version.

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 18 Oct 2017 12:04

i could not reproduce this, too.

maybe the problem is already fixed. please try again with upcoming 2017.08.7 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment