Version 7.x - Backup and restore causes 404 error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • murugappan
    Active Community Member
    • Aug 2017
    • 467

    Version 7.x - Backup and restore causes 404 error

    Hi,

    Currently, we use 2 additional instances for espocrmXXX, where tst=testing, dev=development during our development phase. Initial we install under the dev and customize. When it is ready for user testing we clone the dev to tst, change config setting and load the instance. We had no problem doing this until version 7.4.3. Now with version 7.4.3 when we load the tst instance we get a 404 error with the details as below in the log. I found that after i perform a php rebuild using the CLI we are able load the tst instance normally. I am not sure if this is a bug or if it is a new mandatory step to do a CLI rebuild whenever we clone. Please advise/help



    2023-04-27 03:05:38] WARNING: E_WARNING: mkdir(): File exists {"code":2,"message":"mkdir(): File exists","file":"/home/sysdev/public_html/newemascrmdev/application/Espo/Core/Utils/File/Manager.php","line":562}
    [2023-04-27 03:05:38] ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Not found. File: /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php Line: 76 Trace: #0 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(44): Slim\Middleware\RoutingMiddleware->performRouting(Object(Slim\Psr7\Request)) EspoCRM Forum /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) Forum /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #3 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@ano nymous)) #4 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #5 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #6 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Slim\Psr7\Request)) Special /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Api/Starter.php(76): Slim\App->run() Visitor Messages /home/sysdev/public_html/newemascrmdev/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() Private Messages /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Application/RunnerRunner.php(87): Espo\Core\ApplicationRunners\Api->run() Albums /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) #11 /home/sysdev/public_html/newemascrmdev/public/api/v1/index.php(37): Espo\Core\Application->run('Espo\\Core\\Appli...') #12 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.
    [2023-04-27 03:05:38] ERROR: Uncaught Exception RuntimeException: "Could not write file `/home/sysdev/public_html/newemascrmdev/data/logs/espo-2023-04-27.log`. Error message: Permission denied: unable to create a folder on the server /home/sysdev/public_html/newemascrmdev/data/logs" at /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Log/Handler/EspoFileHandler.php line 94 {"exception":"[object] (RuntimeException(code: 0): Could not write file `/home/sysdev/public_html/newemascrmdev/data/logs/espo-2023-04-27.log`. Error message: Permission denied: unable to create a folder on the server /home/sysdev/public_html/newemascrmdev/data/logs at /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Log/Handler/EspoFileHandler.php:94)"}
    [2023-04-27 03:06:02] ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Not found. File: /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php Line: 76 Trace: #0 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(44): Slim\Middleware\RoutingMiddleware->performRouting(Object(Slim\Psr7\Request)) EspoCRM Forum /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) Forum /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #3 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@ano nymous)) #4 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #5 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #6 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Slim\Psr7\Request)) Special /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Api/Starter.php(76): Slim\App->run() Visitor Messages /home/sysdev/public_html/newemascrmdev/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() Private Messages /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Application/RunnerRunner.php(87): Espo\Core\ApplicationRunners\Api->run() Albums /home/sysdev/public_html/newemascrmdev/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) #11 /home/sysdev/public_html/newemascrmdev/public/api/v1/index.php(37): Espo\Core\Application->run('Espo\\Core\\Appli...') #12 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.
    [2023-04-27 03:06:02] ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Not found. File: /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php Line: 76 Trace: #0 /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(44): Slim\Middleware\RoutingMiddleware->performRouting(Object(Slim\Psr7\Request)) EspoCRM Forum /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) Forum /home/sysdev/public_html/newemascrmdev/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76):
  • Gius3ppe
    Junior Member
    • Jan 2023
    • 3

    #2
    Hi,

    I have the same problem since 7.4.3.

    I have 2 instances of my Espo (CRM and SandBox) and when everything is ok on my Sandbox like test on upgrade for example, I duplicate it on my CRM instance.
    But since 7.4.3 everything was broken (error 404) ans some others problems.

    For some reasons ??? php rebuild.php don't helps me.

    After a lot of search, I have notice a file /data/cache/application/slim-routes.php when rebuild.php don't do the job.

    Correcting this file (take a look into it) everything seems ok but I'm not satisfied of this update regression... wait and see..

    Hope it helps you.

    Best wishes frome France.
    Last edited by Gius3ppe; 04-29-2023, 08:14 AM.

    Comment


    • murugappan
      murugappan commented
      Editing a comment
      Somehow, in my case, when i do the rebuild using the CLI it seems to work. In my case it happens when i clone the instance or update just using the custom->espo folder. So far everything seems to be in order. Need to test further.

      However, in the back of my mind, it worries me as well. I am afraid things may break when i do the next upgrades. Espocrm developers may need to fix this problem.
      Last edited by murugappan; 05-09-2023, 01:52 AM.
Working...