-
Notifications
You must be signed in to change notification settings - Fork 7
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
Migration Remote to local (Docker) - Step 8 - Structure Migration: SQLSTATE[HY000] [2002] No such file or directory #62
Comments
Hi @eheuje, Thanks for raising this issue! Sorry, but we do not support Docker concerning the Destination PIM in Transporteo, we tried and we encountered some issues (folder differences between host and docker, mysql client on the host connecting to the docker one...) and we decided to not support it for now. If you want, you can contributing by following this guideline and we will be happy to help you :-) https://github.com/akeneo/transporteo/blob/master/.github/CONTRIBUTING.md Thanks! Anaël |
I have just found the trouble. Akeneo\PimMigration\Infrastructure\Cli\LocalMySqlQueryExecutor:45 protected function getConnection(Pim $pim): \PDO
{
$dsn = sprintf(
'mysql: host=%s;dbname=%s;port=%s',
$pim->getMysqlHost(),
$pim->getDatabaseName(),
strval($pim->getMysqlPort())
);
$pdo = new \PDO(
$dsn,
$pim->getDatabaseUser(),
$pim->getDatabasePassword()
);
$pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
return $pdo;
} If I remove the space in your connection string, it works... protected function getConnection(Pim $pim): \PDO
{
$dsn = sprintf(
'mysql:host=%s;dbname=%s;port=%s',
...
);
} Now, I have another one : Migrating files data...
Migrating structure data...
Migrating families data...
Migrating system data...
Migrating jobs data...
Migrating groups data...
Migrating extra data...
Migrating reference data...
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Akeneo\PimMigration\Domain\Command\CommandResult::__construct() must be of the type integer, boolean given, called in /srv/pim/transporteo/src/Infrastructure/Cli/SshConsole.php on line 105 and defined in /srv/pim/transporteo/src/Domain/Command/CommandResult.php:21
Stack trace:
#0 /srv/pim/transporteo/src/Infrastructure/Cli/SshConsole.php(105): Akeneo\PimMigration\Domain\Command\CommandResult->__construct(false, 'Cannot load Zen...')
#1 /srv/pim/transporteo/src/Domain/Command/ChainedConsole.php(23): Akeneo\PimMigration\Infrastructure\Cli\SshConsole->execute('/home/deploy/pi...', Object(Akeneo\PimMigration\Domain\Pim\SourcePim))
#2 /srv/pim/transporteo/src/Domain/DataMigration/BundleConfigFetcher.php(32): Akeneo\PimMigration\Domain\Command\ChainedConsole->execute(Object(Akeneo\PimMigration\Domain\Command\SymfonyCommand), Object(Akeneo\PimMigration\Domain\Pim\SourcePim))
#3 /srv/pim/transporteo/src/Domain/MigrationStep/s130_ReferenceDataMigration/ReferenceDataMigrator.php in /srv/pim/transporteo/src/Domain/Command/CommandResult.php on line 21 |
Thanks again ! :), I will have a deeper look into it and let you informed :) |
Any news about this error? I've this one also. |
I have done some dirty fixe. <?php
class CommandResult
{
/** @var int */
private $resultCode;
/** @var mixed */
private $output;
public function __construct(int $resultCode, $output)
{
$this->resultCode = $resultCode;
$this->output = $output;
} First argument must be an integer... <?php
return new CommandResult($ssh->getExitStatus(), $results); So the method getExitStatus must return an integer... /**
* Returns the exit status of an SSH command or false.
*
* @return false|int
* @access public
*/
public function getExitStatus()
{
if (is_null($this->exit_status)) {
return false;
}
return $this->exit_status;
} So, my dirty fix is : In SshConsole.php <?php
return new CommandResult((int) $ssh->getExitStatus(), $results); |
With the official docker-compose, I have installed :
So after a minimal fresh install, I try to execute a migration between an Akeneo 1.7 EE and a Akeneo 2.0 EE.
Nevermind the exception, all my attributes are migrated.
The text was updated successfully, but these errors were encountered: