EspoCRM Upgrade 406 Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Waqar Alvi
    Member
    • May 2018
    • 35

    EspoCRM Upgrade 406 Error

    I have my EspoCRM current version 5.1.2. I bought the VOIP extension and now I want to integrate it into the CRM.
    And to do that, the VOIP extension support told me to upgrade my CRM version to the latest.

    Now I am trying to upgrade first from 5.1.2 to 5.2.5, but without any success. I get the 406 error.
    My PHP vesion is 5.6. I know for the latest EspoCRM version, I need the PHP version 7.1.

    So I have 2 questions:

    1) Uptil which EspoCRM version, PHP 5.6 will work?
    2) How can I fix this 406 error on upgrade?

    I am attaching an aimage of the upgrade error as well. Kindly see the image.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello.
    The PHP v.5.6 is supported until the EspoCRM v.5.6.0 https://forum.espocrm.com/forum/anno...5-6-0-released
    Check the log files. This can be helpful https://www.espocrm.com/documentatio...oubleshooting/

    Comment

    • Waqar Alvi
      Member
      • May 2018
      • 35

      #3
      I have checked the Log as well. There is nothing there.
      It just gives one error when I try to upgrade from EspoCRM below:
      Failed to load resource: the server responded with a status of 406 (Not Acceptable)
      Below is the resource which is not being loaded:
      http://site-global.com/crm/api/v1/Ad...UpgradePackage

      I checked for the path of this resource to check if the resource path is valid or not, but this path does not exist. It exists until http://site-global.com/crm/api/v1/.
      There is no Admin directory in crm/api/v1 folder.

      Could it be something for you to figure out the error?

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Please, read this https://forum.espocrm.com/forum/general/44314-error-406

        Comment

        • Waqar Alvi
          Member
          • May 2018
          • 35

          #5
          Thank you. I resolved the issue and started upgrading.
          It upgraded successfully from 5.1.2 to 5.3.6 but I am not able to upgrade further.

          I have created separate post for this and the link is given below:
          Hi, hope you are doing well. I was using EspoCRM version 5.1.2 and I purchased VOIP extension. To make the VOIP extension work, I tried to upgrade my EspoCRM version. I faced the 406 Not Acceptable issue first, but I resolved it. So I started upgrading and I reached to my current EspoCRM version 5.3.6. But I am not able to


          Kindly help me resolve this issue. I will really appreciate it.

          Comment

          • Maximus
            Senior Member
            • Nov 2018
            • 2731

            #6
            It seems that it is the same an error 406. How you have solved this issue and have made the previous upgrade? Try to do the same action.

            Comment

            • Waqar Alvi
              Member
              • May 2018
              • 35

              #7
              Are you sure this is the same error? Because it says 500 internal error.
              Kindly check the image attached.

              To remove 406 error previously, I contacted my hosting provider and disabled mod_security for my espocrm domain. That is how I resolved the 406 error before.

              Comment

              • Maximus
                Senior Member
                • Nov 2018
                • 2731

                #8
                This error should be described in the EspoCRM error log or web server error log. Firstly check the EspoCRM error log.

                Comment

                • Waqar Alvi
                  Member
                  • May 2018
                  • 35

                  #9
                  These are the following errors that I had in espo log when tried to upgrade from 5.3.6 to 5.4.5

                  1) [2019-05-22 05:26:05] Espo.ERROR: Route: Method [options] does not exist. Please check your route [/LeadCapture/:apiKey] [] []

                  2) [2019-05-22 05:24:02] Espo.ALERT: Rebuild database fault: exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home2/e9r6t6d1/public_html/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699 Stack trace: #0 /home2/e9r6t6d1/public_html/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(699): PDO->query('ALTER TABLE `ac...') #1 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Utils/Database/Schema/Schema.php(196): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `ac...') #2 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/DataManager.php(95): Espo\Core\Utils\Database\Schema\Schema->rebuild(NULL) #3 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/DataManager.php(62): Espo\Core\DataManager->rebuildDatabase(NULL) #4 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/Actions/Base.php(635): Espo\Core\DataManager->rebuild() #5 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/Actions/Base/Install.php(95): Espo\Core\Upgrades\Actions\Base->systemRebuild() #6 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/ActionManager.php(84): Espo\Core\Upgrades\Actions\Base\Install->run(Array) #7 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/Base.php(85): Espo\Core\Upgrades\ActionManager->run(Array) #8 /home2/e9r6t6d1/public_html/crm/application/Espo/Controllers/Admin.php(96): Espo\Core\Upgrades\Base->install(Array) #9 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/ControllerManager.php(118): Espo\Controllers\Admin->postActionRunUpgrade(Array, Object(stdClass), Object(Slim\Http\Request)) #10 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Application.php(227): Espo\Core\ControllerManager->process('Admin', 'runUpgrade', Array, '{"id":"5ce4dc9e...', Object(Slim\Http\Request)) #11 [internal function]: Espo\Core\Application->Espo\Core\{closure}() #12 /home2/e9r6t6d1/public_html/crm/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array) #13 /home2/e9r6t6d1/public_html/crm/vendor/slim/slim/Slim/Slim.php(1356): Slim\Slim->applyHook('slim.before.dis...') #14 /home2/e9r6t6d1/public_html/crm/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #15 /home2/e9r6t6d1/public_html/crm/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #16 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Utils/Api/Auth.php(121): Slim\Middleware\MethodOverride->call() #17 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Utils/Api/Slim.php(125): Espo\Core\Utils\Api\Auth->call() #18 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Application.php(88): Espo\Core\Utils\Api\Slim->run() #19 /home2/e9r6t6d1/public_html/crm/api/v1/index.php(33): Espo\Core\Application->run() #20 {main} Next exception 'Doctrine\DBAL\DBALException' with message 'An exception occurred while executing 'ALTER TABLE `account_contact` CHANGE `role` role VARCHAR(100) DEFAULT NULL COLLATE utf8mb4_unicode_ci': SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home2/e9r6t6d1/public_html/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91 Stack trace: #0 /home2/e9r6t6d1/public_html/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(702): Doctrine\DBAL\DBALException::driverExceptionDuring Query(Object(PDOException), 'ALTER TABLE `ac...', Array) #1 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Utils/Database/Schema/Schema.php(196): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `ac...') #2 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/DataManager.php(95): Espo\Core\Utils\Database\Schema\Schema->rebuild(NULL) #3 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/DataManager.php(62): Espo\Core\DataManager->rebuildDatabase(NULL) #4 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/Actions/Base.php(635): Espo\Core\DataManager->rebuild() #5 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/Actions/Base/Install.php(95): Espo\Core\Upgrades\Actions\Base->systemRebuild() #6 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/ActionManager.php(84): Espo\Core\Upgrades\Actions\Base\Install->run(Array) #7 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Upgrades/Base.php(85): Espo\Core\Upgrades\ActionManager->run(Array) #8 /home2/e9r6t6d1/public_html/crm/application/Espo/Controllers/Admin.php(96): Espo\Core\Upgrades\Base->install(Array) #9 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/ControllerManager.php(118): Espo\Controllers\Admin->postActionRunUpgrade(Array, Object(stdClass), Object(Slim\Http\Request)) #10 /home2/e9r6t6d1/public_html/crm/application/Espo/Core/Application.php(227): Espo\Core\ControllerManager->process('Admin', 'runUpgrade', Array, '{"id":"5ce4dc9e...', Object(Slim\Http\Request)) #11 [internal function]: Espo\Core\Application->Espo\Core\{closure}() #12 /home2/e9r6t6d1/public_html/crm/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array) #13 /hom... [] []

                  Comment

                  • Waqar Alvi
                    Member
                    • May 2018
                    • 35

                    #10
                    3) [2019-05-22 05:22:45] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/home2/e9r6t6d1/public_html/crm/application/Espo/Core/Utils/Database/Schema/Converter.php","line":316,"context":{"entityName": "User","relationParams":{"type":"manyMany","entity ":"Task","foreignKey":"id","foreign":null,"relatio nName":"taskUser"},"tables":{"ActionHistoryRecord" :"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","ArrayValue":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Attachment":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","AuthLogRecord":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","AuthToken":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Currency":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Email":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailAccount":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailAddress":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailFilter":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailFolder":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailTemplate":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailTemplateCategory ":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Extension":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","ExternalAccount":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Import":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","InboundEmail":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Integration":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Job":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","LeadCapture":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","LeadCaptureLogRecord" :"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","NextNumber":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Note":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Notification":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","PasswordChangeRequest ":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","PhoneNumber":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Portal":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","PortalRole":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Role":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","ScheduledJob":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","ScheduledJobLogRecord ":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Team":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Template":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","UniqueId":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","User":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Account":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Call":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Campaign":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","CampaignLogRecord":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","CampaignTrackingUrl": "[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Case":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Contact":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Document":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","DocumentFolder":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailQueueItem":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","KnowledgeBaseArticle" :"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","KnowledgeBaseCategory ":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Lead":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","MassEmail":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Meeting":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Opportunity":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Reminder":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Target":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","TargetList":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Task":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Agency":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Booking1":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Brand":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Order":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","PotentialClients":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Report":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Autofollow":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","ImportEntity":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Subscription":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","EmailTemplateCategoryPat h":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","DocumentFolderPath":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","KnowledgeBaseCategoryPat h":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","Preferences":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","emailEmailAccount":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","emailInboundEmail":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","emailEmailAddress":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","emailUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","entityUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","entityTeam":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","inboundEmailTeam":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","noteUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","notePortal":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","noteTeam":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","knowledgeBaseArticlePort al":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","portalPortalRole":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","portalUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","portalRoleUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","roleTeam":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","roleUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","teamUser":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","entityEmailAddress":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","entityPhoneNumber":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})"},"tableName":"task_user", "table":"[object] (Espo\\Core\\Utils\\Database\\DBAL\\Schema\\Table: {"_idGeneratorType":0})","uniqueIndex":[]}} []

                    Comment

                    • Waqar Alvi
                      Member
                      • May 2018
                      • 35

                      #11
                      4) POST http://site-global.com/crm/api/v1/Ad...ion/runUpgrade 405 (Not Allowed)

                      5) Server side error 500: Error occurred while EspoCRM rebuild.

                      Above 5 are the errors that I get when I try to upgrade.
                      What could be wrong and how could I fix these errors?
                      Last edited by Waqar Alvi; 05-22-2019, 05:41 AM.

                      Comment

                      • Maximus
                        Senior Member
                        • Nov 2018
                        • 2731

                        #12
                        Well, here you have a few main issues.
                        1. Espo.ALERT: Rebuild database fault: exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away'.
                        Read this to understand why this issue has appeared https://dev.mysql.com/doc/refman/8.0/en/gone-away.html.
                        2. POST http://site-global.com/crm/api/v1/Ad...ion/runUpgrade 405 (Not Allowed)

                        To solve both of these issues you should contact your hosting provider support service and tell them to fix this.

                        Comment

                        • Waqar Alvi
                          Member
                          • May 2018
                          • 35

                          #13
                          I will contact my hosting provider.

                          But currently I am facing the following issue and I want to fix this immediately because our company is unable to use the crm because of this:
                          I have EspoCRM version 5.3.6 and I tried to install VOIP extension 1.8.8. But it did not install and gave me Server Side Error 500 SQLSTATE Column not found 'user.voip_user' in field list. I have attached the screenshot of the errors. The Log error says: [2019-05-22 06:11:49] Espo.ERROR: Uncaught Exception PDOException:


                          Kindly reply on the above mentioned post.

                          Comment

                          Working...