Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,637,836
Community Members
 
Community Events
196
Community Groups

API response contains "* Connection #0 bamboo.<companyname>.com left intact."

Edited

I am testing some Bamboo APIs with the goal of writing a report requested by management. I am using cURL until I figure out what works and then will probably move to Ansible.

In all responses I get a string "* Connection #0 bamboo.<companyname>.com left intact." Usually, this is the last line before the json formatted payload and causes no problems.  But if the response is long, the string may get inserted into the middle of the json payload resulting in broken json.

Here is an example snippet (I added the bold)

. . . "plan":{"shortName":"Mod of HelloWorld","shortKey":"MH","type":"chain","enabled":true,"link":{"href":"https://bamboo.dev<companyname>com/rest/api/latest/plan/TABVTJP* Connection #0 to host bamboo.dev.<companyname>.com left intact

-MH","rel":"self"},"key":"TABXXJP-YY","name":"Test availability of BITBUCKET_BRANCH variable to java program - Mod of HelloWorld","planKey":{"key":"TABXXJP-YY"}}, . . .

Does anyone have any suggestions?

1 answer

1 accepted

0 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 14, 2022

Hello @james_mckean

 

Adding a header "Connection: close" to your cURL command line should solve the problem:

  • curl -v -H "Connection: close" https://bamboo.dev.<companyname>.com
    

 

From this page:

Why is the connection left intact:

The connection is left intact, because the server allowed it to stay open and CURL no need to close it after you receive the response for the request sent. That’s why the requests return ‘Connection: keep-alive‘ headers when you expect ‘Connection:close

If you wanted to close the connection, then you could send CURL request with ‘Connection: close‘ as shown below and you could see ‘* Closing connection 0‘ in the response.

Regards,

Eduardo Alvarenga
Atlassian Support APAC

Hmm. Not exactly. Now it drops the "closing connection " notification into the json response, again breaking the json.

BSR-PLAN"}},{"shortName":"build the specs demo plan","shortKey":"SDP","type":"chain","enabled* Closing connection 1
* TLSv1.2 (OUT), TLS alert, close notify (256):
":false,"link":{"href":"https://bamboo.dev.companyName.com/rest/api/

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 15, 2022

Hello @james_mckean

That message comes from the SSL library that cURL is linked to (usually OpenSSL/LibreSSL) and will show up when using curl with a "-v" flag. Those messages are sent to the standard error output and can be discarded by your script.

Try running it without the "-v" flag.

That did it.  Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events