Error Encountered: Upgrade Process Stuck

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sapyantuk
    Senior Member
    • Oct 2020
    • 265

    Error Encountered: Upgrade Process Stuck

    Hello Espo Team,

    I hope this message finds you well. I am writing to report an error encountered during the upgrade process of my Espo CRM from version 8.1.5 to the latest version.

    The upgrade process became stuck at the "rebuilding" stage, and despite several attempts to resolve it, the issue persists. Notably, there have been no error logs recorded during these attempts.

    Could you please provide guidance on how to address this issue and successfully complete the upgrade process?

    Thank you for your prompt attention to this matter.
  • sapyantuk
    Senior Member
    • Oct 2020
    • 265

    #2
    yuri I was using v8.0.3 . till 8.1.5 upgrade process there is no any issue . but when i upgrade from 8.1.5 to latest upgrade process stuck .
    Click image for larger version

Name:	image.png
Views:	213
Size:	17.9 KB
ID:	105220

    Comment

    • sapyantuk
      Senior Member
      • Oct 2020
      • 265

      #3
      [2024-04-22 04:19:33] ALERT: Rebuild database error: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'IDX_PARENT_ID'
      [2024-04-22 04:19:33] INFO: Schema, query: CREATE INDEX IDX_PARENT_TYPE ON note (parent_type)
      [2024-04-22 04:21:03] DEBUG: API (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'role.audit_permission' in 'field list'; GET /Role; Route pattern: /{controller}; Route params: Array ( [controller] => Role [action] => index )
      [2024-04-22 04:21:03] ERROR: (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'role.audit_permission' in 'field list'; GET /Role; line: 77, file: /home/abc.com/eoffice.abc.com/application/Espo/ORM/Executor/DefaultSqlExecutor.php
      [2024-04-22 04:21:15] DEBUG: API (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'role.audit_permission' in 'field list'; GET /Role; Route pattern: /{controller}; Route params: Array ( [controller] => Role [action] => index )
      [2024-04-22 04:21:15] ERROR: (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'role.audit_permission' in 'field list'; GET /Role; line: 77, file: /home/abc.com/eoffice.abc.com/application/Espo/ORM/Executor/DefaultSqlExecutor.php

      Comment

      • sapyantuk
        Senior Member
        • Oct 2020
        • 265

        #4
        victor lazovic Please Help urgent

        Comment

        • lazovic
          Super Moderator
          • Jan 2022
          • 809

          #5
          Hi sapyantuk,

          Please try the following:
          1. Rebuild from CLI:
            Code:
            php rebuild.php
          2. Run upgrade again.​

          Comment

          • sapyantuk
            Senior Member
            • Oct 2020
            • 265

            #6
            lazovic when i rebuild it will stuck

            Comment

            • sapyantuk
              Senior Member
              • Oct 2020
              • 265

              #7
              already tried hard rebuild too . But it stuck

              Comment

              • lazovic
                Super Moderator
                • Jan 2022
                • 809

                #8
                sapyantuk,

                I was unable to reproduce this issue.

                Do I understand correctly that you get the same errors (Unknown column 'role.audit_permission') when you try to rebuild the instance? Do you have a backup of your instance?​

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8440

                  #9
                  Did you ever define additional indexes in metadata > entityDefs?
                  If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                  Comment

                  • sapyantuk
                    Senior Member
                    • Oct 2020
                    • 265

                    #10
                    No, not Yet

                    Comment

                    • yuri
                      Member
                      • Mar 2014
                      • 8440

                      #11
                      Download 8.1.5 package from GithHub releases.

                      1. Remove "application", "vendor" directories.
                      2. Replace all files with files from 8.1.5 package.
                      3. Run "php rebuild.php".

                      You will have v8.1.5.

                      Then you can copy your instance and try to upgrade the test instance first. We always recommend to make backups before upgrades. This was supposed to prevent "urgent, nothing work" issues that are quite stressful. Solving such problems comes with a decent price in other vendors, we try to help for free.
                      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                      Comment

                      • sapyantuk
                        Senior Member
                        • Oct 2020
                        • 265

                        #12
                        i have custom entity, modules , and uploads data too .

                        Comment

                        • sapyantuk
                          Senior Member
                          • Oct 2020
                          • 265

                          #13
                          I followed the above process but . The upgrade process stucks on rebuilding after copying files from 8.1.5 to latest .

                          Comment

                          • victor
                            Active Community Member
                            • Aug 2022
                            • 727

                            #14
                            The upgrade process stucks on rebuilding after copying files from 8.1.5 to latest.
                            - Maybe you didn't make a Rebuild after copying the files to a clean 8.1.5.
                            - It is also possible that you did not remove the installed extensions before the backup.

                            You can try the following steps:

                            1. Make a full backup of your current EspoCRM instance and keep it in a safe place: https://docs.espocrm.com/administrat...p-and-restore/.
                            2. Remove all extensions installed in your old instance.
                            3. Make a backup again, which will not have any extension installed.​
                            4. Install clean EspoCRM v8.1.5 instance. During installation, select your old database (you need to specify the base of your problem instance).
                            5. Delete /custom and /data folders from new instance and copy these folders from backup, which did not contain extensions to the new instance (backup from step 3).
                            6. Run Rebuild by CLI: https://docs.espocrm.com/administrat...mands/#rebuild. If it does not help, then run Hard Rebuild: https://docs.espocrm.com/administrat.../#hard-rebuild.
                            7. If the previous steps are successful, then don't forget to update Permissions: https://docs.espocrm.com/administrat...n/#permissions.
                            8. Upgrade your instance from v8.1.5 to actual v8.2.3 via CLI: https://docs.espocrm.com/administrat...grade-from-cli.
                            9. When everything is upgrated and working - install your extensions again.

                            This solution is tested and has helped many community members, for example here: https://forum.espocrm.com/forum/inst...7695#post97695.

                            It's recommended to follow the steps in this order. But you can try to install clean v8.2.3 immediately in step 4, and then you will not need step 8 (this is a non-recommended option).
                            Last edited by victor; 04-24-2024, 11:30 AM.

                            Comment

                            • sapyantuk
                              Senior Member
                              • Oct 2020
                              • 265

                              #15
                              victor yuri lazovic
                              tried the solution provided by Victor and Yuri too .
                              still stuck on Rebuilding .

                              My Database Size is Around 28 Gb

                              Click image for larger version

Name:	image.png
Views:	170
Size:	21.2 KB
ID:	105374

                              Comment

                              Working...