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 i run into docker/sdk up problem with permission issue: Copy and merge schema files UnexpectedVal

U015AQKSZJ7
U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi i run into docker/sdk up problem with permission issue:
Copy and merge schema files
UnexpectedValueException - Exception: There is no existing directory at "/var/log/spryker/DE/ZED" and its not buildable: Permission denied
in /data/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php (172)
any idea to solve that quickly?

Β«134

Comments

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hello.

    Try this:

    docker/sdk clean-data && docker/sdk up

    That will delete all volumes along with logs volume.

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok i try but this happens on different stages during build up

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    nope doesnt help. now it dies during propel schema copy

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    OS?

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ubuntu 20.04 latest docker

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    docker/sdk cli ls -al /var/log/spryker

    Is it possible to run?

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is it possible to reproduce the error locally?

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    The folder inside the cli container exists but is owned by 1000:spryker and not writeable

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    I will investigate it later it looks like a overlay2 issue ...

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is that latest docker/sdk version?

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes 1.15.0

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    I not tested version bevor, i will do that ..

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    What is the mode? deploy.yml:docker:mount:?

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok will check ..

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
    # Create log directory
    ARG SPRYKER_LOG_DIRECTORY
    ENV SPRYKER_LOG_DIRECTORY=${SPRYKER_LOG_DIRECTORY}
    RUN mkdir -p ${SPRYKER_LOG_DIRECTORY} && \
    chown spryker:spryker ${SPRYKER_LOG_DIRECTORY}
    

    We have this to initialize.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    In baked mode user is always spryker.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited July 2020

    In dev (mount) mode we have the following:

    ARG USER_UID
    RUN usermod -u ${USER_UID} spryker && find / -user 1000 -exec chown -h spryker {} \ || true;
    

    So I wonder why chown does not work for it.

    OR volume is mounted weirdly…

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Can you inspect cli container?

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes, but not right now. Have to put kids into suspend mode :)

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Try to find right button :)))

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok mike im now on my notebook

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet
    mount:
        native:
            platforms:
                - linux
    
  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    hmm the logs: is mounted rw .. strange .. any idea where to look for logs?

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok tested docker/sdk:1.14.3 other error due startup of jenkins which could not find the templates

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    docker/sdk cli ls -la /var/log
    *** DEVELOPMENT MODE
    total 24
    drwxr-xr-x 1 root root 4096 Jul 3 19:39 .
    drwxr-xr-x 1 root root 4096 May 29 12:12 ..
    drwxrwxrwx 2 root root 4096 May 29 12:13 newrelic
    drwxr-xr-x 4 spryker spryker 4096 Jul 3 19:44 spryker

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    mount looks better

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    [2020-07-03T19:46:50.274013+00:00] Zed.CRITICAL: Twig\Error\LoaderError - Unable to find template "jenkins.docker.xml.twig" (looked into: /data/config/Zed/cronjobs, /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/TemplateGenerator/Template). in "/data/vendor/twig/twig/src/Loader/FilesystemLoader.php::265" {"exception":"[object] (Twig\Error\LoaderError(code: 0): Unable to find template \"jenkins.docker.xml.twig\" (looked into: /data/config/Zed/cronjobs, /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/TemplateGenerator/Template). at /data/vendor/twig/twig/src/Loader/FilesystemLoader.php:265)
    [stacktrace]

    0 /data/vendor/twig/twig/src/Loader/FilesystemLoader.php(161): Twig\Loader\FilesystemLoader->findTemplate('jenkins.docker....')

    1 /data/vendor/twig/twig/src/Environment.php(351): Twig\Loader\FilesystemLoader->getCacheKey('jenkins.docker....')

    2 /data/vendor/twig/twig/src/Environment.php(445): Twig\Environment->getTemplateClass('jenkins.docker....')

    3 /data/vendor/twig/twig/src/Environment.php(423): Twig\Environment->loadTemplate('jenkins.docker....')

    4 /data/vendor/twig/twig/src/Environment.php(384): Twig\Environment->load('jenkins.docker....')

    5 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Dependency/TwigEnvironment/SchedulerJenkinsToTwigEnvironmentBridge.php(33): Twig\Environment->render('jenkins.docker....', Array)

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    docker/sdk cli ls /data/config/Zed/cronjobs/
    *** DEVELOPMENT MODE
    README jenkins.php

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    file exists ... strange

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    I assume I know the reason of your primal issue.