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

"Root cache could not be found. aborting." and "Error: The process '/usr/bin/docker' failed with exit code 1" #49

Open
valentijnscholten opened this issue Sep 25, 2020 · 18 comments
Labels
bug Something isn't working

Comments

@valentijnscholten
Copy link

valentijnscholten commented Sep 25, 2020

Describe the bug
creating the cache and filling it throwing errors

To Reproduce
Use example from README
Run action
Observe errors

Expected behavior
Working cache

Debug logs
https://github.com/valentijnscholten/django-DefectDojo/runs/1167379775?check_suite_focus=true

Run satackey/action-docker-layer-caching@v0.0.8
  with:
    key: docker-layer-caching-Docker Compose Actions Workflow-{hash}
    restore-keys: docker-layer-caching-Docker Compose Actions Workflow-
    concurrency: 4
    skip-save: false
Root cache could not be found. aborting.

and

1s
Post job cleanup.
Error: The process '/usr/bin/docker' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1300:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1283:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1183:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)
Error: Error: The process '/usr/bin/docker' failed with exit code 1

If applicable, add debug logs to help explain your problem.
Learn more about enabling the debug log at https://docs.github.com/en/actions/configuring-and-managing-workflows/managing-a-workflow-run#enabling-debug-logging

Runner Environment (please complete the following information):

  • OS: ubuntu-latest
  • Action version: 0.0.8

Additional context
workflow file: https://github.com/valentijnscholten/django-DefectDojo/actions/runs/272961568/workflow

@valentijnscholten valentijnscholten added the bug Something isn't working label Sep 25, 2020
@valentijnscholten
Copy link
Author

When trying master

Run satackey/action-docker-layer-caching@master
/home/runner/work/_actions/satackey/action-docker-layer-caching/master/main.ts:1
import * as core from '@actions/core'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Module._compile (internal/modules/cjs/loader.js:895:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11

@xenoterracide
Copy link

xenoterracide commented Sep 30, 2020

don't know that it helps, but 0.0.6 is outputting this for me

Post job cleanup.
mkdir -p /home/runner/work/services/services/.action-docker-layer-caching-docker_images/image
docker history -q e09701328653
docker history -q 4b80f68662ec
docker history -q ca5e106eb376
docker history -q 1ec9e8b6938d
docker history -q a24bb4013296
docker history -q ***.dkr.ecr.us-east-1.amazonaws.com/builder/liquibase:feature-RS2-1228-optimize-build
docker history -q ***.dkr.ecr.us-east-1.amazonaws.com/builder/liquibase:<none>
docker history -q liquibase/liquibase:latest
docker history -q alpine:latest





Error: The process '/usr/bin/docker' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.6/dist/ttsc-dist/post.js/index.js:1300:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.6/dist/ttsc-dist/post.js/index.js:1283:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.6/dist/ttsc-dist/post.js/index.js:1183:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Error: Error: The process '/usr/bin/docker' failed with exit code 1

@tyilo
Copy link

tyilo commented Oct 10, 2020

@derekssmith
Copy link

I am having a similar issue.

action step

      - uses: satackey/action-docker-layer-caching@v0.0.8
        # Ignore the failure of a step and avoid terminating the job.
        continue-on-error: true
Run satackey/action-docker-layer-caching@v0.0.8
  with:
    key: docker-layer-caching-build-{hash}
    restore-keys: docker-layer-caching-build-
    concurrency: 4
    skip-save: false
  env:
    BOSUN_CONFIG: /home/runner/work/_actions/naveego/bosun/master/***-action/dist/bosun/bosun.yaml
    pythonLocation: /opt/hostedtoolcache/Python/2.7.18/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/2.7.18/x64/lib
    DOTNET_ROOT: /home/runner/.dotnet
Root cache could not be found. aborting.

Post step:

Post job cleanup.
/bin/sh -c docker save '' | tar xf - -C .
Error response from daemon: invalid reference format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Error: The process '/bin/sh' failed with exit code 2
    at ExecState._setResult (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1300:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1283:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1183:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)
Error: Error: The process '/bin/sh' failed with exit code 2

@derekssmith
Copy link

Not sure if something changed on the v0.0.8 version, but it just started working on my builds.

@sherifnada
Copy link

debug logging output from my workflow:

##[debug]Evaluating condition for step: 'Post Run satackey/action-docker-layer-caching@v0.0.8'
##[debug]Evaluating: always()
##[debug]Evaluating always:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Post Run satackey/action-docker-layer-caching@v0.0.8
##[debug]Loading inputs
##[debug]Loading env
Post job cleanup.
##[debug]***"log":"getExistingImages","ids":["8bdb57071d85","f4f64f3d931e","29cd67a86407","394c925930cf","613632a0ab14","df3519fa4cb8","c3ef48204824","d50bd4b187b8","378dd12651fd","eac1e2b17b32","39b7b1552b75","602105ada0a5","3537a829554f","c58fb73dc3f4","b4d13dcd7f17","e71ac7366e27","cb4fd90214df","5f57c644dc6b","217e85391449","3eda611eadd1","858bcf22beaf","06e208522cad","56387899b840","1f560ce4ce7e","b39de549c36a","f3f98451c17d","c4ccba324c9c","091099bf65ad","d8b74300d554","bd53a8aa5ac9","57006130ce4b","f9dc9f9f4f4d","df043b4f0cf1","052664ad4351","a8007cad4069","8b286994f1a6","03cb4444a82d","78a2ce922f86","be4e4bea2c2e","c8bccc0af957","ed51199dbcc6","6d1ef012b567","b7c5ffe56db7","9a948d360778"],"repotags":["airbyte/source-stripe-abprotocol-singer:dev","airbyte/source-exchangeratesapi-singer-abprotocol:dev","airbyte/postgres-singer-source-abprotocol:dev","airbyte/source-template-singer:dev","airbyte/integration-base-singer:dev","airbyte/airbyte-postgres-destination-abprotocol:dev","airbyte/airbyte-csv-destination-abprotocol:dev","airbyte/airbyte-bigquery-destination-abprotocol:dev","airbyte/integration-base-python:dev","airbyte/integration-base-java:dev","airbyte/integration-base:dev","airbyte/scheduler:dev","airbyte/server:dev","airbyte/webapp:dev","airbyte/seed:dev","airbyte/db:dev","airbyte/code-generator:dev","airbyte/scheduler:<none>","python:3.7-slim","airbyte/airbyte-postgres-destination-abprotocol:0.1.0","airbyte/postgres-singer-source-abprotocol:0.1.0","openjdk:14.0.2-slim","node:10","node:12","buildpack-deps:stretch","buildpack-deps:buster","debian:9","debian:8","node:12-alpine","nginx:1.19-alpine","node:10-alpine","postgres:13-alpine","ubuntu:14.04","debian:10.5-slim","jekyll/builder:latest","rtcamp/action-slack-notify:v2.1.0","testcontainers/ryuk:0.3.0","alpine:3.9","alpine:3.10","alpine:3.8","postgres:9.6.12","alpine:3.7","alpine:3.4","mcr.microsoft.com/azure-pipelines/node8-typescript:latest"]***
##[debug]***"existingSet":***
##[debug]***"log":"getExistingImages","ids":["8bdb57071d85","f4f64f3d931e","29cd67a86407","394c925930cf","613632a0ab14","df3519fa4cb8","c3ef48204824","d50bd4b187b8","378dd12651fd","eac1e2b17b32","39b7b1552b75","602105ada0a5","3537a829554f","c58fb73dc3f4","b4d13dcd7f17","e71ac7366e27","cb4fd90214df","5f57c644dc6b","217e85391449","3eda611eadd1","858bcf22beaf","06e208522cad","56387899b840","1f560ce4ce7e","b39de549c36a","f3f98451c17d","c4ccba324c9c","091099bf65ad","d8b74300d554","bd53a8aa5ac9","57006130ce4b","f9dc9f9f4f4d","df043b4f0cf1","052664ad4351","a8007cad4069","8b286994f1a6","03cb4444a82d","78a2ce922f86","be4e4bea2c2e","c8bccc0af957","ed51199dbcc6","6d1ef012b567","b7c5ffe56db7","9a948d360778"],"repotags":["airbyte/source-stripe-abprotocol-singer:dev","airbyte/source-exchangeratesapi-singer-abprotocol:dev","airbyte/postgres-singer-source-abprotocol:dev","airbyte/source-template-singer:dev","airbyte/integration-base-singer:dev","airbyte/airbyte-postgres-destination-abprotocol:dev","airbyte/airbyte-csv-destination-abprotocol:dev","airbyte/airbyte-bigquery-destination-abprotocol:dev","airbyte/integration-base-python:dev","airbyte/integration-base-java:dev","airbyte/integration-base:dev","airbyte/scheduler:dev","airbyte/server:dev","airbyte/webapp:dev","airbyte/seed:dev","airbyte/db:dev","airbyte/code-generator:dev","airbyte/scheduler:<none>","python:3.7-slim","airbyte/airbyte-postgres-destination-abprotocol:0.1.0","airbyte/postgres-singer-source-abprotocol:0.1.0","openjdk:14.0.2-slim","node:10","node:12","buildpack-deps:stretch","buildpack-deps:buster","debian:9","debian:8","node:12-alpine","nginx:1.19-alpine","node:10-alpine","postgres:13-alpine","ubuntu:14.04","debian:10.5-slim","jekyll/builder:latest","rtcamp/action-slack-notify:v2.1.0","testcontainers/ryuk:0.3.0","alpine:3.9","alpine:3.10","alpine:3.8","postgres:9.6.12","alpine:3.7","alpine:3.4","mcr.microsoft.com/azure-pipelines/node8-typescript:latest"]***
##[debug]***"existingSet":***
Error: The process '/usr/bin/docker' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1300:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1283:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.8/dist/ttsc-dist/post.js/index.js:1183:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Error: Error: The process '/usr/bin/docker' failed with exit code 1
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Post Run satackey/action-docker-layer-caching@v0.0.8

@stephanvierkant
Copy link

Same problem on v0.0.7.

@roytouw7
Copy link

roytouw7 commented Nov 22, 2020

Using v.0.0.8 only encountering this the first run when nothing has been cached yet, second run it's working fine.

@rcowsill
Copy link
Contributor

rcowsill commented Dec 7, 2020

When trying master

Run satackey/action-docker-layer-caching@master

I think the version needs to be master-release (or maybe latest?) for that to work.

@valentijnscholten
Copy link
Author

Just tried again with v0.0.11 same result.

https://github.com/DefectDojo/django-DefectDojo/runs/1584256485?check_suite_focus=true

Slightly different error messages:

Run satackey/action-docker-layer-caching@v0.0.11
  with:
    key: docker-layer-caching-Unit tests-{hash}
    restore-keys: docker-layer-caching-Unit tests-
    concurrency: 4
    skip-save: false
Root cache could not be found. aborting.
Post job cleanup.
<Buffer 45 72 72 6f 72 20 72 65 73 70 6f 6e 73 65 20 66 72 6f 6d 20 64 61 65 6d 6f 6e 3a 20 69 6e 76 61 6c 69 64 20 72 65 66 65 72 65 6e 63 65 20 66 6f 72 6d ... 3 more bytes>
Error: The process '/usr/bin/docker' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.11/dist/ttsc-dist/post.js/index.js:1035:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.11/dist/ttsc-dist/post.js/index.js:1018:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/satackey/action-docker-layer-caching/v0.0.11/dist/ttsc-dist/post.js/index.js:912:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Error: Error: The process '/usr/bin/docker' failed with exit code 1
<Buffer 45 72 72 6f 72 20 72 65 73 70 6f 6e 73 65 20 66 72 6f 6d 20 64 61 65 6d 6f 6e 3a 20 69 6e 76 61 6c 69 64 20 72 65 66 65 72 65 6e 63 65 20 66 6f 72 6d ... 3 more bytes>

@valentijnscholten
Copy link
Author

Tried again with specifying a cache to avoid the space in the default cache. Same result. I'm giving up.

      - uses: satackey/action-docker-layer-caching@v0.0.11
        # Ignore the failure of a step and avoid terminating the job.
        continue-on-error: true
        with:
          key: docker-layer-caching-Unit-tests-{hash}
          restore-keys: docker-layer-caching-Unit-tests-

@rcowsill
Copy link
Contributor

rcowsill commented Dec 20, 2020

Just tried again with v0.0.11 same result.

https://github.com/DefectDojo/django-DefectDojo/runs/1584256485?check_suite_focus=true

Running this workflow with ACTIONS_STEP_DEBUG set to true shows the following:

##[debug]{"log":"getExistingImages", [...],"repotags":[[...],"mysql:<none>", [...],"rabbitmq:<none>", [...],"python:<none>", [...]]}

This specific case is hitting the issue described in #17: currently this action doesn't support images specified by sha256 hash. It looks like @sherifnada's workflow is hitting that too.

@andy-maier
Copy link

andy-maier commented Feb 4, 2021

The error also happens for us, using v0.0.11, see for example this Actions run:

Root cache could not be found. aborting.

The Actions step looks like this:

    - name: Set up Docker cache
      uses: satackey/action-docker-layer-caching@v0.0.11
      continue-on-error: true
      with:
        key: teste2e-docker-cache-{hash}
        restore-keys: |
          teste2e-docker-cache-

@andy-maier
Copy link

Has there been any progress on this issue in the last 4 months since it was opened?

@rcowsill
Copy link
Contributor

rcowsill commented Feb 4, 2021

The error also happens for us, using v0.0.11, see for example this Actions run:

In this case it looks like the cache really wasn't there. The previous run (teste2e#2) pulled images before the cache action ran, so no images were cached in the "post" step.

The teste2e#3 run did save a cache, so subsequent runs on the same PR should be able to pick that up, as long as the keys still match.

@himanshuupadhyay102
Copy link

Has there been any progress on this issue in the last 5 months since it was opened?

@rcowsill
Copy link
Contributor

rcowsill commented Apr 11, 2021

It looks like almost all of these cases turned out to be #17. That includes valentijnscholten, sherifnada, xenoterracide and possibly derekssmith too (though they reported it as fixed after an update).

In andy-maier's case the "no root cache" message was correct; the previous run had no new images to cache, so there was no cache present on the next run.

If anyone gets this message despite the previous run successfully saving a cache, please reply here with details. Include a link to your workflow run logs with ACTIONS_STEP_DEBUG enabled.

@nilampatel-engineer
Copy link

same problem with v0.0.11 I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests