Is port 8080 blocked or something?
Asked by Dittmar_ Dirk:

Hello,

in my pipeline I'm just calling \`nc\` now (I've already stripped everything):

\`nc -w 1 -z 10.xxx.xxx.xxx 8080\`

... and the pipeline breaks immediately ...

Is it because of the port? I've checked another port (Postgres:5432) and that works.


Answers:
author: Ben
body: Hi Dittmar,

Are you using self-hosted runners or regular Pipelines? I notice the IP address you're alluding to is a private IP address so would not be accessible over Atlassian pipelines infrastructure.

I would suggest opening port 8080 on your firewall/whitelist anyhow with reference to these pipelines ip addresses:

* <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/>

If you're still encountering issues, you'll need to raise a support ticket with our support team as we'll need access to your workspace/build logs and this information would not be appropriate to share on a public forum such as Community, you can do so by using your company workspace URL (it's on a Standard plan):

* <https://support.atlassian.com/contact/#/>

If you encounter issues raising a ticket, please let me know what your timezone is so I may raise it on your behalf and ensure it's assigned to the appropriate geo.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Dittmar_ Dirk
body: The port is open at the firewall but the skript dies immititly when one command has an exit code not equal to 0 ... like as you start bash with -e ... \`nc\` could not open the port so the return code was != 0 and the script died ...


author: Ben
body: Hi Dittmar,

This documentation may be helpful for you as it covers exit codes and avoiding build failures due to exit codes:

* <https://confluence.atlassian.com/bbkb/pipelines-builds-succeeds-even-on-command-failure-1142437808.html>

If you are still unable to have successful builds - you'll need to raise a support ticket with us for further troubleshooting (see above instructions).

Cheers!

- Ben (Bitbucket Cloud Support)


author: Dittmar_ Dirk
body: \`set +e\` in the script does it ... so I can write skript blocks (where I need the skript not to die) like:

```
set +e

...

set -e
```

This is just a follow up problem of this one: <https://community.atlassian.com/t5/Bitbucket-questions/I-need-something-like-a-teardown-step/qaq-p/2753388>

If there where Finally-Steps in a Stage (or something like that) I don't had the need to write such long scripts.


author: Ben
body: Hi [@Dittmar_ Dirk](/t5/user/viewprofilepage/user-id/5542640)

Okay, so if I'm understanding correctly - at this stage using the set +e is preventing the build from failing, but you would not need to implement such workarounds if we had a customisable teardown phase?

Cheers!

- Ben (Bitbucket Cloud Support)


author: Dittmar_ Dirk
body: yes, exactly ... I'm implementing a lot of shell script at the moment because there is no "customisable teardown phase" after a stage... tear down after a stage would be useful in my case.

plus: I have to develop a custom docker-image to have all the tools for the shell script in one single step so I can use the "after-script". At the moment I'm installing all the tools with "apt-get install ..." but that's quite time consuming.


author: Ben
body: Thank you for the clarification [@Dittmar_ Dirk](/t5/user/viewprofilepage/user-id/5542640) :)

I'm glad to hear you have a workable solution despite the issues faced by this feature gap.

Both myself and my colleague have included your community posts as private comments to our developers on our existing feature request ticket, however, I would strongly encourage you to add your own feedback/use case as a comment as these are regularly reviewed by our development team:

* <https://jira.atlassian.com/browse/BCLOUD-18012>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud