after 2-3 years, no change, suddenly "php_network_getaddresses: getaddrinfo failed"
Asked by fthiele-bm:

Hey folks,

I am kinda lost here. My Company has a php project that is running since a couple of years in its current microservice architecture.

lately the company was sold and a lot of people got laid off, now im kinda on my own to maintain everything for the next remaining 2 months.

all of this wouldnt be an issue, if i hadnt these pipeline errors.

my problem is not the error itself, but the reproducability of it.

because, "it works on my machine", i can not reproduce the issue that the pipeline is having with the same docker commands locally.

the other reason is, because of this special situation, there hasnt been a release of the project since dezember last year, when the pipeline was having no problems.

this year in february, i ran the usual update procedure for dependencys.

my code change shows that in 2 unrelated services the aws-php-sdk has been updated and that trivy changed its "config" parameter to "misconfig".

there have been no changes made to how the projects docker network is set up, urlchanges, really nothing.

the only moving parts of this project, shared between me and bitbucket seems to be docker and maybe some bitbucket configuration.

i tried looking for open issues, but everything regarding this specific php error seems to be a misconfiguration at some point.  
but this does not apply to my situation, the project was in a state of code freeze, it was working for years (i mean, this error has never come up, not randomly/suddenly or otherwise), nothing changed there, so what is causing it?  

if this would be a new configuration, i would provide my setup details directly, but i try to figure out what changed, because nothing that was working changed thats why i dont think changing it for the sake of changing will improve the situation without knowing a possible cause.

im grateful for every idea that may help solve this issue :)


Answers:
author: Theodora Boudale
body: Hi [@fthiele-bm](/t5/user/viewprofilepage/user-id/5427748) and welcome to the community!

The most recent infrastructure change in Bitbucket Pipelines is the Docker in Docker service upgrade:

* <https://confluence.atlassian.com/bbkb/infrastructure-changes-in-bitbucket-pipelines-1142431176.html>

This has affected some builds that run either on Atlassian's infrastructure or with a Linux Docker self-hosted runner, and use a Docker service. The errors were specific to Docker though, so I'm not sure if your builds were affected by that. Our development team has published a community article with some limitations this change introduced and actions required to make the builds work. You can take a look here:

* <https://community.atlassian.com/t5/Bitbucket-articles/Recent-docker-service-upgrade-in-Bitbucket-Pipelines/ba-p/2603987>

Do your builds run on Atlassian's infrastructure or are you using one of our [self-hosted runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/)?

If you are using a self-hosted runner, which one is it? Linux Docker (x86_64), Linux Docker (arm64), Linux Shell, MacOS, or Windows?

If you rerun the last successful build, is the rerun successful, or is it also failing?

Kind regards,  
Theodora

comments: author: fthiele-bm
body: Thank you for your detailed reply.

the second link sounds to me more like something that may be related to this behavior.

i will take a deeper look into it, but this points to some things i wasnt aware of.

to answer your follow up questions:

\> Do your builds run on Atlassian's infrastructure or are you using one of our [self-hosted runners](https://support.atlassian.com/bitbucket-cloud/docs/runners/)?

My Company does not use the self hosted, but the subscription version of bitbucket.

\> If you rerun the last successful build, is the rerun successful, or is it also failing?

kinda hard to achieve, there is a lot of coupling in the whole system.

rerunning the old builds would end in errors before i would have to disable almost every but the current step with the issue.

i dont think i want to throw myself into that if the solution later is that i have to adapt some single keyword in a yml file, which may be hinted somewhere in some readme.

let me first go through the new informations i have available to see if i have to go down that road.

Kind regards,

fthiele :)


author: Theodora Boudale
body: Hi fthiele,

Sure, take the time you need to check the info in the article. Please feel free to let me know if that doesn't help with the issue you're facing.

Kind regards,  
Theodora


author: fthiele-bm
body: base setup here is.

a dockerized microservice will call a local url.

then there is a local dockerized nginx listening to the base url.

both are in the same network, nginx is exposed, the base domain is linked to the nginx container.

so 1 service does "file_get_contents" on "local-data.mysetup.com" which should be resolved to the nginx.  

this works locally, i havent been able to reproduce this except from purposefully breaking my own code.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

docker

php