Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerErrorHttpException (500) #138

Open
bengrol opened this issue May 30, 2018 · 7 comments
Open

ServerErrorHttpException (500) #138

bengrol opened this issue May 30, 2018 · 7 comments

Comments

@bengrol
Copy link

bengrol commented May 30, 2018

I have an exception during a 1.7 => 2.0 migration.
The exception occurs at the time of the "Migrating products data".
The previous steps are running correctly.
the operation takes place locally.
I use the inner variation Bundle and all our custom code is commented
The API is working properly.

Any idea ?

Destination PIM database initialization...
Migrating files data...
Migrating structure data...
Migrating families data...
Migrating system data...
Migrating jobs data...
Migrating groups data...
Migrating extra data...
Migrating enterprise edition data...
Migrating reference data...
Migrating products data...

                                                             
  [Akeneo\Pim\ApiClient\Exception\ServerErrorHttpException]  
  Internal Server Error                                      
                                                             



[2018-05-30 09:22:42] app.DEBUG: S130FromDestinationPimEnterpriseEditionDataMigratedToDestinationPimReferenceDataMigrated: onDestinationPimReferenceDataMigration finished [] []
[2018-05-30 09:22:42] app.DEBUG: STATE MACHINE: apply destination_pim_product_migration transition [] []
Migrating products data...
[2018-05-30 09:22:42] app.DEBUG: LocalConsole: executing ApiCommand -> List all products [] []
[2018-05-30 09:22:43] app.DEBUG: LocalConsole: executing ApiCommand -> Upsert products [] []

                                                                   
  [Akeneo\Pim\ApiClient\Exception\ServerErrorHttpException (500)]  
  Internal Server Error                                            
                                                                   

Exception trace:
 () at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Client/HttpExceptionHandler.php:61
 Akeneo\Pim\ApiClient\Client\HttpExceptionHandler->transformResponseToException() at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Client/HttpClient.php:46
 Akeneo\Pim\ApiClient\Client\HttpClient->sendRequest() at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Api/AuthenticationApi.php:80
 Akeneo\Pim\ApiClient\Api\AuthenticationApi->authenticate() at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Api/AuthenticationApi.php:46
 Akeneo\Pim\ApiClient\Api\AuthenticationApi->authenticateByPassword() at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Client/AuthenticatedHttpClient.php:57
 Akeneo\Pim\ApiClient\Client\AuthenticatedHttpClient->sendRequest() at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Client/ResourceClient.php:179
 Akeneo\Pim\ApiClient\Client\ResourceClient->upsertResourceList() at /srv/www/pim/transporteo/vendor/akeneo/api-php-client/src/Api/ProductApi.php:111
 Akeneo\Pim\ApiClient\Api\ProductApi->upsertList() at /srv/www/pim/transporteo/src/Infrastructure/Cli/ApiCommandExecutor.php:63
 Akeneo\PimMigration\Infrastructure\Cli\ApiCommandExecutor->executeCommandFromApiClient() at /srv/www/pim/transporteo/src/Infrastructure/Cli/ApiCommandExecutor.php:44
 Akeneo\PimMigration\Infrastructure\Cli\ApiCommandExecutor->execute() at /srv/www/pim/transporteo/src/Infrastructure/Cli/LocalConsole.php:62
 Akeneo\PimMigration\Infrastructure\Cli\LocalConsole->execute() at /srv/www/pim/transporteo/src/Domain/Command/ChainedConsole.php:23
 Akeneo\PimMigration\Domain\Command\ChainedConsole->execute() at /srv/www/pim/transporteo/src/Domain/MigrationStep/s140_ProductMigration/ProductMigrator.php:86
 Akeneo\PimMigration\Domain\MigrationStep\s140_ProductMigration\ProductMigrator->upsertProducts() at /srv/www/pim/transporteo/src/Domain/MigrationStep/s140_ProductMigration/ProductMigrator.php:71
 Akeneo\PimMigration\Domain\MigrationStep\s140_ProductMigration\ProductMigrator->migrateProducts() at /srv/www/pim/transporteo/src/Domain/MigrationStep/s140_ProductMigration/ProductMigrator.php:56
 Akeneo\PimMigration\Domain\MigrationStep\s140_ProductMigration\ProductMigrator->migrate() at /srv/www/pim/transporteo/src/Infrastructure/MigrationStep/S140FromDestinationPimReferenceDataMigratedToDestinationPimProductMigrated.php:45
 Akeneo\PimMigration\Infrastructure\MigrationStep\S140FromDestinationPimReferenceDataMigratedToDestinationPimProductMigrated->onDestinationPimProductMigration() at n/a:n/a
 call_user_func() at /srv/www/pim/transporteo/vendor/symfony/event-dispatcher/EventDispatcher.php:212
 Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /srv/www/pim/transporteo/vendor/symfony/event-dispatcher/EventDispatcher.php:44
 Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /srv/www/pim/transporteo/vendor/symfony/workflow/Workflow.php:256
 Symfony\Component\Workflow\Workflow->transition() at /srv/www/pim/transporteo/vendor/symfony/workflow/Workflow.php:137
 Symfony\Component\Workflow\Workflow->apply() at /srv/www/pim/transporteo/src/Infrastructure/TransporteoStateMachine.php:97
 Akeneo\PimMigration\Infrastructure\TransporteoStateMachine->start() at /srv/www/pim/transporteo/src/Infrastructure/UserInterface/Cli/Transporteo.php:54
 Akeneo\PimMigration\Infrastructure\UserInterface\Cli\Transporteo->execute() at /srv/www/pim/transporteo/vendor/symfony/console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at /srv/www/pim/transporteo/vendor/symfony/console/Application.php:887
 Symfony\Component\Console\Application->doRunCommand() at /srv/www/pim/transporteo/vendor/symfony/console/Application.php:223
 Symfony\Component\Console\Application->doRun() at /srv/www/pim/transporteo/vendor/symfony/console/Application.php:130
 Symfony\Component\Console\Application->run() at /srv/www/pim/transporteo/Transporteo.php:17
@shopstart
Copy link

It seems I have exactly the same error. All goes well, untill the Products Data is migrated. @bengrol dit you find a solution?

@shopstart
Copy link

Here is my debug output:


[2018-10-18 08:44:35] app.DEBUG: LocalConsole: executing ApiCommand -> List all products [] []

[2018-10-18 08:44:36] app.DEBUG: LocalConsole: executing ApiCommand -> Upsert products [] []



                                                                   

  [Akeneo\Pim\ApiClient\Exception\ServerErrorHttpException (500)]  

  Internal Server Error                                            

                                                                   



Exception trace:

 () at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Client/HttpExceptionHandler.php:66

 Akeneo\Pim\ApiClient\Client\HttpExceptionHandler->transformResponseToException() at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Client/HttpClient.php:46

 Akeneo\Pim\ApiClient\Client\HttpClient->sendRequest() at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Api/AuthenticationApi.php:80

 Akeneo\Pim\ApiClient\Api\AuthenticationApi->authenticate() at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Api/AuthenticationApi.php:46

 Akeneo\Pim\ApiClient\Api\AuthenticationApi->authenticateByPassword() at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Client/AuthenticatedHttpClient.php:57

 Akeneo\Pim\ApiClient\Client\AuthenticatedHttpClient->sendRequest() at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Client/ResourceClient.php:179

 Akeneo\Pim\ApiClient\Client\ResourceClient->upsertResourceList() at /home/admin/transporteo/vendor/akeneo/api-php-client/src/Api/ProductApi.php:111

 Akeneo\Pim\ApiClient\Api\ProductApi->upsertList() at /home/admin/transporteo/src/Infrastructure/Cli/ApiCommandExecutor.php:63

 Akeneo\PimMigration\Infrastructure\Cli\ApiCommandExecutor->executeCommandFromApiClient() at /home/admin/transporteo/src/Infrastructure/Cli/ApiCommandExecutor.php:44

 Akeneo\PimMigration\Infrastructure\Cli\ApiCommandExecutor->execute() at /home/admin/transporteo/src/Infrastructure/Cli/LocalConsole.php:62

 Akeneo\PimMigration\Infrastructure\Cli\LocalConsole->execute() at /home/admin/transporteo/src/Domain/Command/ChainedConsole.php:23

 Akeneo\PimMigration\Domain\Command\ChainedConsole->execute() at /home/admin/transporteo/src/Domain/MigrationStep/s140_ProductMigration/ProductMigrator.php:86

 Akeneo\PimMigration\Domain\MigrationStep\s140_ProductMigration\ProductMigrator->upsertProducts() at /home/admin/transporteo/src/Domain/MigrationStep/s140_ProductMigration/ProductMigrator.php:71

 Akeneo\PimMigration\Domain\MigrationStep\s140_ProductMigration\ProductMigrator->migrateProducts() at /home/admin/transporteo/src/Domain/MigrationStep/s140_ProductMigration/ProductMigrator.php:56

 Akeneo\PimMigration\Domain\MigrationStep\s140_ProductMigration\ProductMigrator->migrate() at /home/admin/transporteo/src/Infrastructure/MigrationStep/S140FromDestinationPimReferenceDataMigratedToDestinationPimProductMigrated.php:45

 Akeneo\PimMigration\Infrastructure\MigrationStep\S140FromDestinationPimReferenceDataMigratedToDestinationPimProductMigrated->onDestinationPimProductMigration() at n/a:n/a

 call_user_func() at /home/admin/transporteo/vendor/symfony/event-dispatcher/EventDispatcher.php:212

 Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /home/admin/transporteo/vendor/symfony/event-dispatcher/EventDispatcher.php:44

 Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /home/admin/transporteo/vendor/symfony/workflow/Workflow.php:256

 Symfony\Component\Workflow\Workflow->transition() at /home/admin/transporteo/vendor/symfony/workflow/Workflow.php:137

 Symfony\Component\Workflow\Workflow->apply() at /home/admin/transporteo/src/Infrastructure/TransporteoStateMachine.php:97

 Akeneo\PimMigration\Infrastructure\TransporteoStateMachine->start() at /home/admin/transporteo/src/Infrastructure/UserInterface/Cli/Transporteo.php:54

 Akeneo\PimMigration\Infrastructure\UserInterface\Cli\Transporteo->execute() at /home/admin/transporteo/vendor/symfony/console/Command/Command.php:264

 Symfony\Component\Console\Command\Command->run() at /home/admin/transporteo/vendor/symfony/console/Application.php:887

 Symfony\Component\Console\Application->doRunCommand() at /home/admin/transporteo/vendor/symfony/console/Application.php:223

 Symfony\Component\Console\Application->doRun() at /home/admin/transporteo/vendor/symfony/console/Application.php:130

 Symfony\Component\Console\Application->run() at /home/admin/transporteo/Transporteo.php:17

@bOnepain
Copy link
Contributor

Maybe you should have a look at the logs of the destination PIM. You'll certainly find the answer in there.

@buttash
Copy link

buttash commented Nov 30, 2018

I've got the same issue - the error log in my destination PIM is empty...The print_r of the response is:

GuzzleHttp\Psr7\Response Object

(
[reasonPhrase:GuzzleHttp\Psr7\Response:private] => Internal Server Error
[statusCode:GuzzleHttp\Psr7\Response:private] => 500
[headers:GuzzleHttp\Psr7\Response:private] => Array
(
[Date] => Array
(
[0] => Fri, 30 Nov 2018 15:47:41 GMT
)

        [Server] => Array
            (
                [0] => Apache/2.4.18 (Ubuntu)
            )

        [Cache-Control] => Array
            (
                [0] => max-age=0, private, must-revalidate, no-cache, private
            )

        [Connection] => Array
            (
                [0] => close
            )

        [Transfer-Encoding] => Array
            (
                [0] => chunked
            )

        [Content-Type] => Array
            (
                [0] => application/json
            )

    )

[headerNames:GuzzleHttp\Psr7\Response:private] => Array
    (
        [date] => Date
        [server] => Server
        [cache-control] => Cache-Control
        [connection] => Connection
        [transfer-encoding] => Transfer-Encoding
        [content-type] => Content-Type
    )

[protocol:GuzzleHttp\Psr7\Response:private] => 1.1
[stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
    (
        [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #1710
        [size:GuzzleHttp\Psr7\Stream:private] =>
        [seekable:GuzzleHttp\Psr7\Stream:private] => 1
        [readable:GuzzleHttp\Psr7\Stream:private] => 1
        [writable:GuzzleHttp\Psr7\Stream:private] => 1
        [uri:GuzzleHttp\Psr7\Stream:private] => php://temp
        [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
            (
            )

    )

)

@buttash
Copy link

buttash commented Nov 30, 2018

Ok - I think I've found the issue. The pim runs under www-data whereas I ran transporteo under a different user. I made sure that both users had permission to write to the var/cache. I found this out by re-installing a new version of v2 and saw this in the log:

[Fri Nov 30 16:20:57.188661 2018] [proxy_fcgi:error] [pid 2052:tid 140394025187072] [client 84.9.97.65:63810] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught InvalidArgumentException: The directory "/var/www/pim-community-standard/var/cache/prod/oro_acl_annotations" is not writable. in /var/www/pim-community-standard/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:92\nStack trace:\n#0 /var/www/pim-community-standard/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php(37): Doctrine\Common\Cache\FileCache->__construct('/var/www/pim-co...', '.doctrinecache....', 2)\n#1 /var/www/pim-community-standard/var/cache/prod/Container1uhk9xx/appProdProjectContainer.php(5486): Doctrine\Common\Cache\FilesystemCache->__construct('/var/www/pim-co...')\n#2 /var/www/pim-community-standard/var/cache/prod/Container1uhk9xx/appProdProjectContainer.php(5568): Container1uhk9xx\appProdProjectContainer->getOroSecurity_Acl_AnnotationProviderService()\n#3 /var/www/pim-community-standard/var/cache/prod/Container1uhk9xx/appProdProjectContainer.php(5558): Container1uhk9xx\appProdProjectContainer->getOroSecurity_SecurityFacadeSe...\n', referer:

Hope that helps.

@pushpender-sharma
Copy link

pushpender-sharma commented Feb 28, 2019

Any updates? I'm getting the same error for products to migrate from 1.7 to 2.0 using transporteo. Rest categories, families, users migrated.

@Lussier115
Copy link

Any updates? Same problem with products

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants