Trigger-Pipeline Docker Endpoint Failure
Asked by Andrew Klossner:

This step fails

```
- step:
          name: Run Tests
          script:
            - pipe: atlassian/trigger-pipeline:5.8.0
              variables:
                BITBUCKET_ACCESS_TOKEN: $BITBUCKET_ACCESS_TOKEN
                REPOSITORY: 'APPQuality'
                REF_TYPE: 'branch'
                REF_NAME: 'main'
                ACCOUNT: 'REMOVED'
                WAIT: 'true'
```

I get the following error and I can't find anything on Google relating to it. Any help is greatly appreciated  

     bitbucketpipelines/trigger-pipeline:5.8.0

    unable to resolve docker endpoint: open /root/.docker/ca.pem: no such file or directory

    Searching for files matching artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/**


Answers:
author: Igor Stoyanov
body: Hi [@Andrew Klossner](/t5/user/viewprofilepage/user-id/5590318) . Thanks for question. Do you still have this issue.   
If yes: provide us please with full pipelines config file and output logs.  

Regards, Igor

comments: author: Andrew Klossner
body: Here's the YAML

<br />

options:  
docker: true

pipelines:  
custom:  
dev-build-push: \&dev-build-push  
- step:  
name: build  
image: node:14.21.3  
caches:  
- node  
size: 2x  
script:  
- cd client  
- npm install  
- export NODE_OPTIONS=--max-old-space-size=6144  
- CI=false npm run build  
- cd ..  
- step:  
name: Deploy to AWS account  
image: 'REMOVED/node-build:14'  
deployment: REMOVED  
script:  
- source "$HOME/setup-docker.bash" local  
- $(aws ecr get-login --no-include-email --region us-east-2)  
- ./eb-deploy.bash dev

- step:  
name: Run Tests  
script:  
- pipe: atlassian/trigger-pipeline:5.8.0  
variables:  
BITBUCKET_ACCESS_TOKEN: $BITBUCKET_ACCESS_TOKEN  
REPOSITORY: 'AppQuality'  
REF_TYPE: 'branch'  
REF_NAME: 'main'  
ACCOUNT: 'REMOVED'  
WAIT: 'true'

branches:  
development: \*dev-build-push

Build Log

<br />

pipe: atlassian/trigger-pipeline:5.8.0\<1s  
+ docker container run \\  
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \\  
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \\  
--volume=/opt/atlassian/pipelines/bin/docker:/usr/local/bin/docker:ro \\  
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \\  
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/trigger-pipeline:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/trigger-pipeline \\  
--workdir=$(pwd) \\  
--label=org.bitbucket.pipelines.system=true \\  
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \\  
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \\  
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \\  
--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \\  
--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \\  
--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \\  
--env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \\  
--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \\  
--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \\  
--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \\  
--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \\  
--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \\  
--env=CI="$CI" \\  
--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \\  
--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \\  
--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \\  
--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \\  
--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \\  
--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \\  
--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \\  
--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \\  
--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \\  
--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \\  
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \\  
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \\  
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/trigger-pipeline" \\  
--env=ACCOUNT="REMOVED" \\  
--env=BITBUCKET_ACCESS_TOKEN="$BITBUCKET_ACCESS_TOKEN" \\  
--env=REF_NAME="main" \\  
--env=REF_TYPE="branch" \\  
--env=REPOSITORY="AppQuality" \\  
--env=WAIT="true" \\  
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \\  
bitbucketpipelines/trigger-pipeline:5.8.0  
unable to resolve docker endpoint: open /root/.docker/ca.pem: no such file or directory  

Docker Logs

cat: can't open '/proc/net/arp_tables_names': No such file or directory  
iptables v1.8.10 (nf_tables)

time="2024-09-12T21:44:29.680908175Z" level=info msg="Starting up"

time="2024-09-12T21:44:29.682273077Z" level=info msg="User namespaces: ID ranges will be mapped to subuid/subgid ranges of: dockremap"

time="2024-09-12T21:44:29.683373888Z" level=warning msg="Binding to IP address without --tlsverify is insecure and gives root access on this machine to everyone who has access to your network." host="tcp://0.0.0.0:2375"

time="2024-09-12T21:44:29.683557257Z" level=warning msg="Binding to an IP address, even on localhost, can also give access to scripts run in a browser. Be safe out there!" host="tcp://0.0.0.0:2375"

time="2024-09-12T21:44:30.683841321Z" level=warning msg="Binding to an IP address without --tlsverify is deprecated. Startup is intentionally being slowed down to show this message" host="tcp://0.0.0.0:2375"

time="2024-09-12T21:44:30.683906461Z" level=warning msg="Please consider generating tls certificates with client validation to prevent exposing unauthenticated root access to your network" host="tcp://0.0.0.0:2375"

time="2024-09-12T21:44:30.683922727Z" level=warning msg="You can override this by explicitly specifying '--tls=false' or '--tlsverify=false'" host="tcp://0.0.0.0:2375"

time="2024-09-12T21:44:30.683934593Z" level=warning msg="Support for listening on TCP without authentication or explicit intent to run without authentication will be removed in the next release" host="tcp://0.0.0.0:2375"

time="2024-09-12T21:44:45.686577733Z" level=info msg="containerd not running, starting managed containerd"

time="2024-09-12T21:44:45.687461812Z" level=info msg="started new containerd process" address=/var/run/docker/containerd/containerd.sock module=libcontainerd pid=39

time="2024-09-12T21:44:45.703510433Z" level=info msg="starting containerd" revision=7c3aca7a610df76212171d200ca3811ff6096eb8 version=v1.7.13

time="2024-09-12T21:44:45.728964652Z" level=info msg="loading plugin \\"io.containerd.event.v1.exchange\\"..." type=io.containerd.event.v1

time="2024-09-12T21:44:45.728997652Z" level=info msg="loading plugin \\"io.containerd.internal.v1.opt\\"..." type=io.containerd.internal.v1

time="2024-09-12T21:44:45.729042824Z" level=warning msg="failed to load plugin io.containerd.internal.v1.opt" error="mkdir /opt/containerd: read-only file system"

time="2024-09-12T21:44:45.729060470Z" level=info msg="loading plugin \\"io.containerd.warning.v1.deprecations\\"..." type=io.containerd.warning.v1

time="2024-09-12T21:44:45.729080720Z" level=info msg="loading plugin \\"io.containerd.snapshotter.v1.blockfile\\"..." type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.729157115Z" level=info msg="skip loading plugin \\"io.containerd.snapshotter.v1.blockfile\\"..." error="no scratch file generator: skip plugin" type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.729172265Z" level=info msg="loading plugin \\"io.containerd.snapshotter.v1.devmapper\\"..." type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.729182995Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"

time="2024-09-12T21:44:45.729190686Z" level=info msg="loading plugin \\"io.containerd.snapshotter.v1.native\\"..." type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.729242510Z" level=info msg="loading plugin \\"io.containerd.snapshotter.v1.overlayfs\\"..." type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.729445424Z" level=info msg="loading plugin \\"io.containerd.snapshotter.v1.aufs\\"..." type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.735075575Z" level=info msg="loading plugin \\"io.containerd.snapshotter.v1.zfs\\"..." type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.735460840Z" level=info msg="skip loading plugin \\"io.containerd.snapshotter.v1.zfs\\"..." error="path /var/lib/docker/165536.165536/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1

time="2024-09-12T21:44:45.735493061Z" level=info msg="loading plugin \\"io.containerd.content.v1.content\\"..." type=io.containerd.content.v1

time="2024-09-12T21:44:45.735593773Z" level=info msg="loading plugin \\"io.containerd.metadata.v1.bolt\\"..." type=io.containerd.metadata.v1

time="2024-09-12T21:44:45.735656318Z" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"

time="2024-09-12T21:44:45.735677279Z" level=info msg="metadata content store policy set" policy=shared

time="2024-09-12T21:44:45.739502747Z" level=info msg="loading plugin \\"io.containerd.gc.v1.scheduler\\"..." type=io.containerd.gc.v1

time="2024-09-12T21:44:45.739560096Z" level=info msg="loading plugin \\"io.containerd.differ.v1.walking\\"..." type=io.containerd.differ.v1

time="2024-09-12T21:44:45.739592951Z" level=info msg="loading plugin \\"io.containerd.lease.v1.manager\\"..." type=io.containerd.lease.v1

time="2024-09-12T21:44:45.739623762Z" level=info msg="loading plugin \\"io.containerd.streaming.v1.manager\\"..." type=io.containerd.streaming.v1

time="2024-09-12T21:44:45.739645220Z" level=info msg="loading plugin \\"io.containerd.runtime.v1.linux\\"..." type=io.containerd.runtime.v1

time="2024-09-12T21:44:45.739785010Z" level=info msg="loading plugin \\"io.containerd.monitor.v1.cgroups\\"..." type=io.containerd.monitor.v1

time="2024-09-12T21:44:45.740254267Z" level=info msg="loading plugin \\"io.containerd.runtime.v2.task\\"..." type=io.containerd.runtime.v2

time="2024-09-12T21:44:45.740407479Z" level=info msg="loading plugin \\"io.containerd.runtime.v2.shim\\"..." type=io.containerd.runtime.v2

time="2024-09-12T21:44:45.740434326Z" level=info msg="loading plugin \\"io.containerd.sandbox.store.v1.local\\"..." type=io.containerd.sandbox.store.v1

time="2024-09-12T21:44:45.740458570Z" level=info msg="loading plugin \\"io.containerd.sandbox.controller.v1.local\\"..." type=io.containerd.sandbox.controller.v1

time="2024-09-12T21:44:45.740481513Z" level=info msg="loading plugin \\"io.containerd.service.v1.containers-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740500068Z" level=info msg="loading plugin \\"io.containerd.service.v1.content-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740522415Z" level=info msg="loading plugin \\"io.containerd.service.v1.diff-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740543478Z" level=info msg="loading plugin \\"io.containerd.service.v1.images-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740573210Z" level=info msg="loading plugin \\"io.containerd.service.v1.introspection-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740597664Z" level=info msg="loading plugin \\"io.containerd.service.v1.namespaces-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740616134Z" level=info msg="loading plugin \\"io.containerd.service.v1.snapshots-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740634958Z" level=info msg="loading plugin \\"io.containerd.service.v1.tasks-service\\"..." type=io.containerd.service.v1

time="2024-09-12T21:44:45.740669736Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.containers\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740699434Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.content\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740719691Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.diff\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740738541Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.events\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740758655Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.images\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740777132Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.introspection\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740802359Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.leases\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740823012Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.namespaces\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740843854Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.sandbox-controllers\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740866320Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.sandboxes\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740883811Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.snapshots\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740900926Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.streaming\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740920469Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.tasks\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740944144Z" level=info msg="loading plugin \\"io.containerd.transfer.v1.local\\"..." type=io.containerd.transfer.v1

time="2024-09-12T21:44:45.740973357Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.transfer\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.740990845Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.version\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.741009069Z" level=info msg="loading plugin \\"io.containerd.internal.v1.restart\\"..." type=io.containerd.internal.v1

time="2024-09-12T21:44:45.741078328Z" level=info msg="loading plugin \\"io.containerd.tracing.processor.v1.otlp\\"..." type=io.containerd.tracing.processor.v1

time="2024-09-12T21:44:45.741101731Z" level=info msg="skip loading plugin \\"io.containerd.tracing.processor.v1.otlp\\"..." error="no OpenTelemetry endpoint: skip plugin" type=io.containerd.tracing.processor.v1

time="2024-09-12T21:44:45.741120634Z" level=info msg="loading plugin \\"io.containerd.internal.v1.tracing\\"..." type=io.containerd.internal.v1

time="2024-09-12T21:44:45.741137480Z" level=info msg="skipping tracing processor initialization (no tracing plugin)" error="no OpenTelemetry endpoint: skip plugin"

time="2024-09-12T21:44:45.741250637Z" level=info msg="loading plugin \\"io.containerd.grpc.v1.healthcheck\\"..." type=io.containerd.grpc.v1

time="2024-09-12T21:44:45.741270376Z" level=info msg="loading plugin \\"io.containerd.nri.v1.nri\\"..." type=io.containerd.nri.v1

time="2024-09-12T21:44:45.741288546Z" level=info msg="NRI interface is disabled by configuration."

time="2024-09-12T21:44:45.741573283Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock

time="2024-09-12T21:44:45.741649449Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc

time="2024-09-12T21:44:45.741719565Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock

time="2024-09-12T21:44:45.741741803Z" level=info msg="containerd successfully booted in 0.038974s"

time="2024-09-12T21:44:46.690696462Z" level=info msg="User namespaces: ID ranges will be mapped to subuid/subgid ranges of: dockremap"

time="2024-09-12T21:44:46.721044364Z" level=info msg="\[graphdriver\] trying configured driver: overlay2"

time="2024-09-12T21:44:46.747424362Z" level=info msg="Loading containers: start."

time="2024-09-12T21:44:46.877056225Z" level=info msg="Loading containers: done."

time="2024-09-12T21:44:46.891767784Z" level=warning msg="WARNING: API is accessible on <http://0.0.0.0:2375> without encryption.\\n Access to the remote API is equivalent to root access on the host. Refer to the 'Docker daemon attack surface' section in the documentation for\\n more information:"

time="2024-09-12T21:44:46.891824114Z" level=info msg="Docker daemon" commit=fce6e0c containerd-snapshotter=false storage-driver=overlay2 version=25.0.2

time="2024-09-12T21:44:46.892652842Z" level=info msg="Daemon has completed initialization"

time="2024-09-12T21:44:46.917898360Z" level=info msg="API listen on /var/run/docker.sock"  
time="2024-09-12T21:44:46.917911208Z" level=info msg="API listen on \[::\]:2375"  

I also want to confirm that I have recreated the BITBUCKET_ACCESS_TOKEN to ensure Repo read access and Pipeline write access.


author: Andrew Klossner
body: I apologize for the formatting, I couldn't get it to submit with proper formatting.


author: Andrew Klossner
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) any ideas? Thank you for your help.


author: Igor Stoyanov
body: Hi [@Andrew Klossner](/t5/user/viewprofilepage/user-id/5590318) .   

Try to add services docker to your script as described on this page:  
[run-docker-commands-in-bitbucket-pipelines](https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/)   

If you use self-hosted runners, check this [community question](https://community.atlassian.com/t5/Bitbucket-questions/Pipeline-broken-after-update-to-v25-0-2-multiarch-prod-stable/qaq-p/2597310#U2598724)  

Regards, Igor


author: Andrew Klossner
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) this didn't work. And we do not use self-hosted runners. Any other suggestions?


author: Igor Stoyanov
body: [@Andrew Klossner](/t5/user/viewprofilepage/user-id/5590318) . Try to run your trigger pipeline step without this step previously executed \`name: Deploy to AWS account\`. Maybe the reason is there because you changed docker infra here \`source "$HOME/setup-docker.bash" local\`  

Regards, Igor


Tags: bitbucket-cloud

cloud

pipes