Cannot enable plugin and "The Atlassian Marketplace server is not reachable"
Asked by Danny Cranmer:

We cannot enable plugins from the "Manage add-ons" page.

We receive the following message at the top of the page: "The Atlassian Marketplace server is not reachable. To avoid problems when loading this page, you can disable the connection to the Marketplace server. Click here for more information..."

Specifically trying to enable the Tracking Plugin:   
Version: 3.1.4  
Vendor: ServiceRocket  
Add-on key: net.customware.confluence.plugin.tracking

The same happens when trying to enable other plugins too, we see a dialog that says "Enabling Tracking Plugin. Please wait.", sometimes it returns an exception (org/ietf/jgss/GSSException), other times it just hangs. I notice the following in browser console:  
GET <http://confluence/rest/licensing/1.0/plugin/net.customware.confluence.plugin.tracking?_=1414068896989> 404 (Not Found)

We have configured proxy and settings are visible in the system information page:  
-Dhttp.proxyHost=my.proxy.address   
-Dhttp.proxyPort=8080   
-Dhttps.proxyHost=my.proxy.address  
-Dhttps.proxyPort=8080   
-Dhttp.nonProxyHosts=localhost


Answers:
author: William Zanchet [Atlassian]
body: Hey Danny,  

The Atlassian Marketplace needs to verify the SSL connection between Confluence and itself. This occurs because the certificate is missing or has been tampered with by the local Proxy.

To resolve this you need to manually add the certificates to your keystore. There are two ways to achieve this:

#### Use the SSL Plugin: {#toc-hId-1257097346}

1. [Install SSL Plugin](https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.ssl) in order to upload the Certificates into Confluence TrustStore
2. Add the following Certificates, it has to be in this specific order:
   1. marketplace.atlassian.[com:443](http://com:443)
   2. plugins.atlassian.[com:443](http://com:443)
   3. dq1dnt4af4eyy.cloudfront.[net:443](http://net:443)
3. Restart Confluence

**OR:**

Manually import the certificates using the steps below (note that you'll still need to fetch the cert files from above with openssl):

Download the following certificates with the commands below and remove everything but the certificates themselves:  

**Linux**

```
openssl s_client -connect marketplace.atlassian.com:443 &lt; /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' &gt; marketplace.atlassian.com.crtopenssl s_client -connect plugins.atlassian.com:443 &lt; /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' &gt; plugins.atlassian.com.crtopenssl s_client -connect dq1dnt4af4eyy.cloudfront.net:443 &lt; /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' &gt; dq1dnt4af4eyy.cloudfront.net.crt
```

Windows

```
openssl s_client -connect marketplace.atlassian.com:443 &lt; NUL &gt; marketplace.atlassian.com.crtopenssl s_client -connect plugins.atlassian.com:443 &lt; NUL &gt; plugins.atlassian.com.crtopenssl s_client -connect dq1dnt4af4eyy.cloudfront.net:443 &lt; NUL &gt; dq1dnt4af4eyy.cloudfront.net.crt
```

:warning: After saving the certificates in Windows, edit them and delete everything before the "BEGIN CERTIFICATE" line and everything after the "END CERTIFICATE" line. This step is not required for Linux.  

2. And then import them into your keystore *in this order*:

```
keytool -import -alias marketplace.atlassian.com:443 -keystore /path/to/keystore -file /path/to/marketplace.atlassian.com.crtkeytool -import -alias plugins.atlassian.com:443 -keystore /path/to/keystore -file /path/to/plugins.atlassian.com.crtkeytool -import -alias dq1dnt4af4eyy.cloudfront.net:443 -keystore /path/to/keystore -file /path/to/dq1dnt4af4eyy.cloudfront.net.crt
```

:warning: The trust store is located in the following directories:

* **Windows/Linux:** `$JAVA_HOME/jre/lib/security/cacerts`
* **Mac OS (not supported):** `$JAVA_HOME/lib/security/cacerts`

`If keytool prompts for a password, the default is ``'changeit``'.`  

`I hope this helps!`  
`Cheers`  
`WZ`  


Tags: confluence-administration