What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi, when I run `docker/sdk demo-data` (i want just reset db and service and import fresh everything)

giovanni.piemontese
giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
edited March 2020 in Docker

Hi, when I run docker/sdk demo-data (i want just reset db and service and import fresh everything) sdk run loadDemoData with at end of this function `

execSpryker "vendor/bin/install -r docker -s init-storages-per-region -s ${demoDataSection}"

But i get following error:

Dropping all database tables.
 Error happened during dropping database tables.                                                                                                                                                         
 SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  must be a superuser to terminate superuser process
CONTEXT:  SQL statement "SELECT pg_terminate_backend(pid)
                        FROM pg_stat_activity
                        WHERE pg_stat_activity.datname = current_database() AND pid <> pg_backend_pid()"
PL/pgSQL function inline_code_block line 6 at PERFORM

In CommandLineExecutable.php line 107:

  Aborted install...  

Anyone idea why so? sdk up works in the case IF_NOT_PERFORMED!

Comments

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    sdk reset works.. sdk demo not due permission for db

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    Do you connect to the database from host machine?

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    yes... without problems..

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    With what credentials? spryker or root

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    root

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    That’s the point. You have rootopened connection and script that works with spryker cannot close it to remove all the tables during demo data import.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    Ok.... now it s me clear...

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    So this problem won’t have place if you connect only with spryker user

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    thank u very much..

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    yes.. of course

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    np