Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Pipelines: accessing redis-server via unix domain socket not working

I have a public docker image which has redis and maven. My Junit testcases access redis-server via unix domain socket. This image has been working fine on gitlab pipeline for more than 1 yr now. 

Today I started setting up a pipeline on bitbucket and for some reason my tests now fail with 
"Failed connecting to /var/run/redis/redis.sock"
Caused by: No such file or directory

The same docker image I can pull and check locally via redis-cli that it can connect to redis-server via the same UDS. 

So in a nutshell
-works on locally running docker
-works on gitlab pipeline
-does not work with bitbucket pipeline.

Does bitbucket pipeline launches these dockers in a special manner that applications do not see anything outside home directory ? 
Any known work arrounds... I guess I can test with localhost:6379 but that leaves a bad taste. 

1 answer

0 votes
Mark C Atlassian Team Aug 26, 2021

Hi @kumaakh

Thank you for reaching out to the community.

Would it be possible for you to confirm if you're running your public Docker image (with the redis and maven) as a service container on Pipelines?
Or you're using it as a base Docker image?

If you're using it as a service similar to the public documentation here, I'm afraid it will only be accessible on localhost:6379.

Mark C

Hello Mark, 

redis, maven etc. are all installed on my base docker image. I am running a single main container and no service containers.  If it helps here is the public image from


image: kumaakh/rockbuild:v1.3
Mark C Atlassian Team Aug 27, 2021

Hi @kumaakh

Thanks for the confirmation.

I've tried pulling your public Docker image locally and I did see redis is installed in your Docker image using the redis-cli command.

In this case, would it be possible for you to debug your Pipelines build locally using your public Docker image and perform the JUnit testcases?

Ideally, if it is working locally in a non-interactive shell, it should work as well on Pipelines.

Let me know how it goes.

Mark C

Mark thanks,
This was very useful... I could fix the issue by using the suggested debugging approach. I had to start the redis-server as a background process as part of the script and my tests pass now. 

Like Mark C likes this
Mark C Atlassian Team Aug 29, 2021

Hi @kumaakh

Great! Glad to know debugging your build locally helps.

Let me know if you have further questions that I can help with.

Mark C

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,170 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you