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

Confluence API TLS Issues

Jason Abergel April 3, 2018

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.
April 3, 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

Jason Abergel April 5, 2018

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!

alex flora March 23, 2023

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

0 votes
Jason Abergel April 4, 2018

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.
April 4, 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