Pipelines. No logs to display
Asked by spi4ka:

Hello. Pipelines stopped displaying logs. Some days ago it worked well, bitbucket-pipelines.yml has not been changed. But it cannot display any logs because of unknown reason

I saw this question but there was no answer (<https://community.atlassian.com/t5/Bitbucket-questions/Pipeline-fails-withou-log/qaq-p/681256>)  

What could be a reason and how can I fix it?


Answers:
author: Mark C
body: Hi [@spi4ka](/t5/user/viewprofilepage/user-id/1751465)

Thank you for reaching out to the community.

I believe there are few reasons why Pipelines is not showing logs:

* It could be about the base Docker image where it is not running as a root user (You can test this by running **whoami** command)
* If you're using **services** , it could be an issue with where a service is failing to load on Pipelines (You can check this on the tab next to the **Build** tab of your Pipelines build)
* Would you be able to confirm if you're using [Pipelines runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/)?

Let me know how it goes.

Regards,  
Mark C

comments: author: Nam Nguyen
body: [@Mark C](/t5/user/viewprofilepage/user-id/1210823)

Hi Mark C, I have similar error with Runner on Linux System.

It doesn't show log on bitbucket pipeline interface, only this thing

![Screenshot from 2022-01-24 22-22-48.png](https://community.atlassian.com/t5/image/serverpage/image-id/179461i56E37C7CA753C0B4/image-size/large?v=v2&px=999 "Screenshot from 2022-01-24 22-22-48.png")

I check on docker machine, it's still have logs, and i can view it by \`docker logs -f \<id-confirm\>\`


author: Mark C
body: Hi [@Nam Nguyen](/t5/user/viewprofilepage/user-id/4724782)

We may need to further check your runners environment about this one.

You can raise a support ticket with us on [this link](https://support.atlassian.com/contact/#/) and we'll investigate it further.  

Regards,  
Mark C


author: Florian Probst
body: In my case the problem was that we moved the /var/lib/docker directory to another path on the server. So we had to modify the runner commands:

\`\`\`  
docker container run -it -v /tmp:/tmp \\  
-v /var/run/docker.sock:/var/run/docker.sock \\  
-v {PATH_TO_DOCKERDIR}/containers:/var/lib/docker/containers:ro \\ \<---- Mind this line! From this path the bitbucket pipelines runner will get his logs!  
-e ACCOUNT_UUID={YOUR_ACCID} \\  
-e RUNNER_UUID={THE_RUNNERID} \\  
-e RUNTIME_PREREQUISITES_ENABLED=true \\  
-e OAUTH_CLIENT_ID={YOUR_OAUTH_CLIENT_ID} \\  
-e OAUTH_CLIENT_SECRET={YOUR_OAUTH_CLIENT_SECRET} \\  
-e WORKING_DIRECTORY=/tmp \\  
--name runner-{THE_RUNNERID} \\  
docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1  
\`\`\`

May you see something like that in your runner logs:  
\`\`\`

\[2022-02-18 15:29:00,982\] Container log not found: /var/lib/docker/containers/b8631c9781386004701e9358b5c4fe8ebfbfd5061a894d83f022503d35c51ea7/b8631c9781386004701e9358b5c4fe8ebfbfd5061a894d83f022503d35c51ea7-json.log  
\[2022-02-18 15:29:00,983\] Waiting on container to exit.  
\[2022-02-18 15:29:01,027\] Container log not found: /var/lib/docker/containers/9615a69e7f0cf4c11ff2e1627250bfacdea4b061d1a5b1189d3a3bd8fa19f672/9615a69e7f0cf4c11ff2e1627250bfacdea4b061d1a5b1189d3a3bd8fa19f672-json.log  
\[2022-02-18 15:29:01,029\] Waiting on container to exit.

\`\`\`

Let me know if this was helpful.

BR,

Florian


Tags: bitbucket-cloud

bitbucket-pipelines

cloud