CLI Upgrade Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • windy
    Junior Member
    • May 2014
    • 10

    CLI Upgrade Error

    Hi

    I have an error (see attachment) when i try to upgrade espoCRM with CLI. Can somebody help me?

    Regards and Thanks
    Andreas
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    Hello
    wich version espocrm and php ?
    it’s certainly php , espocrm requirments, see doc
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • windy
      Junior Member
      • May 2014
      • 10

      #3
      Hi

      Thank you for helping me.

      I have EspcoCRM 5.9.4 and run PHP 7.4.27. Everyhing worked fine with the upgrades until i tried to update to 6.x. It is not possible to upgrade from UI so i tried it with CLI. Any Ideas?

      Regards
      Andreas

      Comment

      • item
        Active Community Member
        • Mar 2017
        • 1476

        #4
        Hello,
        have you any customisation ?
        try but do backup.
        php clear_cache.php
        php rebuild.php
        try upgrade from cli always (it's only the recommanded method)

        witch version he will upgrade ? 6.0.0 ?
        if so, go on github and download de corresponding version.
        rename your vendor directory
        put de vendor directory from downloaded
        verify permission
        php clear_cache.php
        php rebuild.php
        try upgrade

        v5.9.4 to v6 have a big changement.. it's not easy, you need maybe assistance.
        If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

        Comment

        • murugappan
          Active Community Member
          • Aug 2017
          • 467

          #5
          Hi windy

          Please read my other posts on this. My advise so far is:

          (1) First thing: Change php.ini to set "memory_limit" to at least 64M and change my.ini to set "max_allowed_packet = 512M".
          (2) Do not use the inbuilt upgrade. Use SSH and use the CLI to perform the upgrade to version 7.0.9

          This should work. I have tested this and everything works fine. I am now testing with PHP 8 and facing some problems. I am working with others here to solve this.

          I hope this helps. If you need any assistance please post here i will help. Please also tell what OS you are using.
          Last edited by murugappan; 03-02-2022, 09:50 PM.

          Comment

          • murugappan
            Active Community Member
            • Aug 2017
            • 467

            #6
            Hi windy ,

            How are you doing with your upgrade? Just an update after i did some testing with shalmaxb . Do not use Php 8.1. Use can use Php 7.3 to Php 8.0. All the upgrades work fine. Just check any code customization you have done.. You should be good to go. In case of any help, you can contact me and i will test it at my end too.

            Comment

            • sapyantuk
              Senior Member
              • Oct 2020
              • 265

              #7
              Hi
              I have a problem after upgrade to 7.0.9

              after upgrade to latest version i got error while upgrade
              Error :
              Error 500: Field 'category' has no type.


              i checked log file
              [2022-03-09 16:56:16] ERROR: (0) Field 'category' has no type.; POST /MassAction; line: 74, file: /home/companyn/public_html/best/application/Espo/ORM/Defs/FieldDefs.php [] []
              [2022-03-09 16:56:19] ERROR: (0) Field 'category' has no type.; POST /MassAction; line: 74, file: /home/companyn/public_html/best/application/Espo/ORM/Defs/FieldDefs.php [] []

              Comment

              • sapyantuk
                Senior Member
                • Oct 2020
                • 265

                #8
                [2022-03-09 17:37:13] DEBUG: API (0) Field 'category' has no type.; PUT /Lead/622826d5af40986be; Input data: {"citizenshipNumber":"aa"}; Route pattern: /{controller}/{id}; Route params: Array ( [controller] => Lead [action] => update [id] => 622826d5af40986be ) [] []
                [2022-03-09 17:37:13] ERROR: (0) Field 'category' has no type.; PUT /Lead/622826d5af40986be; line: 74, file: /home/companyn/public_html/best/application/Espo/ORM/Defs/FieldDefs.php :: #0 /home/companyn/public_html/best/application/Espo/Core/FieldProcessing/NextNumber/BeforeSaveProcessor.php(143): Espo\ORM\Defs\FieldDefs->getType() #1 /home/companyn/public_html/best/application/Espo/Core/FieldProcessing/NextNumber/BeforeSaveProcessor.php(58): Espo\Core\FieldProcessing\NextNumber\BeforeSavePro cessor->getFieldList('Note') #2 /home/companyn/public_html/best/application/Espo/Hooks/Common/NextNumber.php(49): Espo\Core\FieldProcessing\NextNumber\BeforeSavePro cessor->process(Object(Espo\Entities\Note), Array) #3 /home/companyn/public_html/best/application/Espo/Core/HookManager.php(129): Espo\Hooks\Common\NextNumber->beforeSave(Object(Espo\Entities\Note), Array, Array) #4 /home/companyn/public_html/best/application/Espo/Core/Repositories/Database.php(272): Espo\Core\HookManager->process('Note', 'beforeSave', Object(Espo\Entities\Note), Array) #5 /home/companyn/public_html/best/application/Espo/ORM/Repository/RDBRepository.php(165): Espo\Core\Repositories\Database->beforeSave(Object(Espo\Entities\Note), Array) #6 /home/companyn/public_html/best/application/Espo/Core/Repositories/Database.php(139): Espo\ORM\Repository\RDBRepository->save(Object(Espo\Entities\Note), Array) #7 /home/companyn/public_html/best/application/Espo/ORM/EntityManager.php(303): Espo\Core\Repositories\Database->save(Object(Espo\Entities\Note), Array) #8 /home/companyn/public_html/best/application/Espo/Services/Stream.php(1737): Espo\ORM\EntityManager->saveEntity(Object(Espo\Entities\Note), Array) #9 /home/companyn/public_html/best/application/Espo/Tools/Stream/HookProcessor.php(420): Espo\Services\Stream->handleAudited(Object(Espo\Modules\Crm\Entities\ Le ad), Array) #10 /home/companyn/public_html/best/application/Espo/Tools/Stream/HookProcessor.php(406): Espo\Tools\Stream\HookProcessor->afterSaveStreamNotNew1(Object(Espo\Modules\Crm\ En tities\Lead), Array) #11 /home/companyn/public_html/best/application/Espo/Tools/Stream/HookProcessor.php(337): Espo\Tools\Stream\HookProcessor->afterSaveStreamNotNew(Object(Espo\Modules\Crm\E nt ities\Lead), Array) #12 /home/companyn/public_html/best/application/Espo/Tools/Stream/HookProcessor.php(93): Espo\Tools\Stream\HookProcessor->afterSaveStream(Object(Espo\Modules\Crm\Entitie s\ Lead), Array) #13 /home/companyn/public_html/best/application/Espo/Hooks/Common/Stream.php(48): Espo\Tools\Stream\HookProcessor->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array) #14 /home/companyn/public_html/best/application/Espo/Core/HookManager.php(129): Espo\Hooks\Common\Stream->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array, Array) #15 /home/companyn/public_html/best/application/Espo/Core/Repositories/Database.php(290): Espo\Core\HookManager->process('Lead', 'afterSave', Object(Espo\Modules\Crm\Entities\Lead), Array) #16 /home/companyn/public_html/best/application/Espo/Modules/Crm/Repositories/Lead.php(48): Espo\Core\Repositories\Database->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array) #17 /home/companyn/public_html/best/application/Espo/ORM/Repository/RDBRepository.php(186): Espo\Modules\Crm\Repositories\Lead->afterSave(Object(Espo\Modules\Crm\Entities\Lead ), Array) #18 /home/companyn/public_html/best/application/Espo/Core/Repositories/Database.php(139): Espo\ORM\Repository\RDBRepository->save(Object(Espo\Modules\Crm\Entities\Lead), Array) #19 /home/companyn/public_html/best/application/Espo/ORM/EntityManager.php(303): Espo\Core\Repositories\Database->save(Object(Espo\Modules\Crm\Entities\Lead), Array) #20 /home/companyn/public_html/best/application/Espo/Core/Record/Service.php(714): Espo\ORM\EntityManager->saveEntity(Object(Espo\Modules\Crm\Entities\Lea d) ) #21 /home/companyn/public_html/best/application/Espo/Core/Controllers/RecordBase.php(224): Espo\Core\Record\Service->update('622826d5af40986...', Object(stdClass), Object(Espo\Core\Record\UpdateParams)) #22 /home/companyn/public_html/best/application/Espo/Core/Api/ActionProcessor.php(97): Espo\Core\Controllers\RecordBase->putActionUpdate(Object(Espo\Core\Api\RequestWra pp er), Object(Espo\Core\Api\ResponseWrapper)) #23 /home/companyn/public_html/best/application/Espo/Core/Api/RequestProcessor.php(136): Espo\Core\Api\ActionProcessor->process('Lead', 'update', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #24 /home/companyn/public_html/best/application/Espo/Core/Api/RequestProcessor.php(111): Espo\Core\Api\RequestProcessor->proceed(Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #25 /home/companyn/public_html/best/application/Espo/Core/Api/RequestProcessor.php(82): Espo\Core\Api\RequestProcessor->processInternal(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #26 /home/companyn/public_html/best/application/Espo/Core/Api/Starter.php(103): Espo\Core\Api\RequestProcessor->pr... [] []

                Comment

                • murugappan
                  Active Community Member
                  • Aug 2017
                  • 467

                  #9
                  Hi All,

                  Latest findings in the upgrade from 5.7.11 to 7.0.9: Just before you start the upgrade:

                  (1) If you have a large database, use the root id and password for the database and upgrade other wise you will get timeouts
                  (2) You need to change the the mysql config:

                  [mysqld]
                  innodb_buffer_pool_size=160M
                  max_allowed_packet=1024M

                  [mysqldump]
                  max_allowed_packet=1024M
                  net_read_timeout=3600
                  net_write_timeout=3600

                  (3) Make sure the tables are all set to "InnoDb" Engine otherwise the upgrade from 5.8.5 to 5.9 will crash. This step will take a very long time with any table has large number of rows.

                  My database is 10GB in size with email table at 7GB and 550,000 rows.

                  Will keep posting update here.

                  Comment

                  • murugappan
                    Active Community Member
                    • Aug 2017
                    • 467

                    #10
                    Hi sapyantuk ,

                    Was there any customised code done to Espocrm? What version of PHP?

                    Comment

                    Working...