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,551,723
Community Members
 
Community Events
184
Community Groups

Confluence API TLS Issues

Hi All,

 

We recently migrated to a new MS 2016 Server (from 2008R2) running Confluence 6.7.1 Server via IIS and since then, we have encountered an issue with the API.

We have a PS script that fetches attachments from Confluence and stores them to a local directory via the API. On the old server this worked fine but on the new server, no go.

Interestingly enough, if we enable TLS 1.0, 1.1 and 1.2, the script works, but with only TLS 1.2 enabled, we get the following error.

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.

I have tried adding the following to the Connector port in the server.xml, but this did not work either.

sslProtocol="TLSv1.2" sslEnabledProtocols="TLSv1.2" SSLEnabled="true"/>

Neither did uncommenting out the Connector port for 8443.

At this point I am fresh out of ideas and would love for your assistance.

 

Thank you for your time!

Jay

2 answers

1 accepted

0 votes
Answer accepted
Boris Berenberg - Atlas Authority
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 03, 2018

Are you terminating SSL at IIS or Confluence? Looks like this may be a PS script issue with .NET: https://stackoverflow.com/questions/36265534/invoke-webrequest-ssl-fails

That was it. I added the following variable to the script and it worked like a charm.

 

$AllProtocols = [System.Net.SecurityProtocolType]'Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols

 

Thank you so much for your time :)

 

Have a good day, Cheers!

I also needed to add the following line on my get requests when doing a lot of scripted additions:

# Reset current connection, resolves error "The underlying connection is closed"
[System.Net.ServicePointManager]::FindServicePoint($ConfluenceURL).ConnectionLimit = 1


Sometimes my script closed with the same error messages half-way running

So globally enable the tls12 protocol in the script and whenever i query for a pageid i run this line before runing the query

The variable $ConfluenceURL points to the url of our main confluence site

SSL is configured at the IIS level and not in Tomcat. The script runs fine as long as TLS 1.0 and 1.1 are enabled. Once removed the script no longer works.

Boris Berenberg - Atlas Authority
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 04, 2018

So then yeah it sounds like an issue with the script, not Confluence or IIS. See my other links.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events