# Can't get by "You are not connected to Discourse" message

**URL:** https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742
**Category:** WordPress
**Created:** [1 juni 2017 om 15:15 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742 "2017-06-01T15:15:46Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [1 juni 2017 om 15:15 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/1 "2017-06-01T15:15:46Z")

</div>

I’m trying to set this plugin up but all I ever get is:

> You are not connected to Discourse. If you are setting up the plugin, this notice should go away after completing the form on this page.

All the settings on the connection seem fine. The URL is there and the API key. I’ve tried looking through logs on both my wordpress server and Discourse but I’m not seeing anything. There’s a good chance I’m not looking at the right logs though.

Any suggestions of what to look for?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [1 juni 2017 om 17:19 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/2 "2017-06-01T17:19:17Z")

</div>

The first thing to check is that the settings are correct. Make sure you are using the master API Key and that the publishing username is set to either ‘system’, or the name of the system user if you have changed the ‘system’ username, or the name of an admin user on your forum.

If that’s not the problem, there are a few possible issues related to https. Are you using https on your forum?

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [1 juni 2017 om 18:46 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/3 "2017-06-01T18:46:35Z")

</div>

Yep, it’s the master API key. I tried resetting it once with no change. I haven’t changed the system username so that should be fine.

I am using https for the forum. I wasn’t using HTTPS for the wordpress site and I thought that was the issue so I converted the wordpress site to HTTPS. Both are using the same comodo wildcard cert for \*.domain.com.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [1 juni 2017 om 18:57 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/4 "2017-06-01T18:57:21Z")

</div>

It’s a long shot, but could you try installing this plugin on your WordPress site and running the test against the PayPal endpoint? When the plugin is activated, the test is available under Tools/TLS on the WordPress dashboard.

> **[TLS 1.2 Compatibility Test](https://wordpress.org/plugins/tls-1-2-compatibility-test/)**
>
> Verify TLS 1.2 support on your webserver for included API endpoints and diagnose a solution to enable compatibility.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [1 juni 2017 om 19:29 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/5 "2017-06-01T19:29:25Z")

</div>

Here’s another plugin that you can use to get some feedback about what’s going on when the initial request is made to Discourse. It adds an item to the admin toolbar. If you activate it, and then refresh the [WP Discourse](https://github.com/discourse/wp-discourse) Connection page, it should tell you what the response is from the request.

> **[Query Monitor](https://wordpress.org/plugins/query-monitor/)**
>
> Query Monitor is the developer tools panel for WordPress and WooCommerce.

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [1 juni 2017 om 20:22 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/6 "2017-06-01T20:22:19Z")

</div>

Top three tests were fine. Last one says:

> Make sure you are running OpenSSL/1.0.1 or higher, NSS/3.15.1 or higher, or the latest version of other cryptographic libraries.

 ![](https://global.discourse-cdn.com/meta/original/3X/d/6/d6d0ad238d2410fc85f8e8e9488cae3eb0e98aa0.png)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [1 juni 2017 om 20:30 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/7 "2017-06-01T20:30:02Z")

</div>

Do you have access to the command line for your WordPress installation?

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [1 juni 2017 om 20:32 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/8 "2017-06-01T20:32:08Z")

</div>

I do have command line access to the server.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [1 juni 2017 om 20:42 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/9 "2017-06-01T20:42:23Z")

</div>

Can you check it to see if `php-curl` is installed?

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [1 juni 2017 om 20:51 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/10 "2017-06-01T20:51:03Z")

</div>

This is the curl info on a phpinfo page:

> cURL support enabled  
> cURL Information 7.38.0  
> Age 3  
> Features  
> AsynchDNS Yes  
> CharConv No  
> Debug No  
> GSS-Negotiate No  
> IDN Yes  
> IPv6 Yes  
> krb4 No  
> Largefile Yes  
> libz Yes  
> NTLM Yes  
> NTLMWB Yes  
> SPNEGO Yes  
> SSL Yes  
> SSPI No  
> TLS-SRP Yes  
> Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, sftp, smtp, smtps, telnet, tftp  
> Host x86\_64-pc-linux-gnu  
> SSL Version OpenSSL/1.0.1t  
> ZLib Version 1.2.8  
> libSSH Version libssh2/1.4.3

Is that what you’re asking about?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [1 juni 2017 om 21:47 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/11 "2017-06-01T21:47:07Z")

</div>

Since you couldn’t get a connection even before HTTPS was enabled on your WordPress site, I’m not sure what the problem is. I can look at this some more later.

Possibly, looking at the access log for your forum can give some information about what’s going on. To get there, ssh into your forum’s server, then:

`$ cd /var/discourse`  
`$ ./launcher enter app`  
`$ cd /var/log/nginx`  
`$ tail -f access.log`

On your WordPress site, click the save options button on the [WP Discourse](https://github.com/discourse/wp-discourse) Connection tab. You should see some sort of response in the Discourse access log.

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [2 juni 2017 om 00:47 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/12 "2017-06-02T00:47:21Z")

</div>

Well now this is interesting. Access log has absolutely nothing when I put the address as [https://discourse.domain.com](https://discourse.domain.com). When I do [http://discourse.domain.com](http://discourse.domain.com), it looks like it tries to process the API call but gets what I’m guessing is redirect to https (301).

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2 juni 2017 om 02:26 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/13 "2017-06-02T02:26:26Z")

</div>

Do you get any kind of response if you enter  
`curl https://forum.yourdomain.com/site.json`  
from the command line?

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [2 juni 2017 om 13:19 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/14 "2017-06-02T13:19:26Z")

</div>

So close!

```
curl https://discourse.domain.com/site.json -v

```

=

```
* Hostname was NOT found in DNS cache
* Trying 10.0.0.X...
* Connected to discourse.domain.com (10.0.0.X) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS alert, Server hello (2):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection 0
* SSLv3, TLS alert, Client hello (1):
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

```

If I do

```
    curl https://discourse.domain.com/site.json -v --cacert /etc/ssl/certs/cacert.pem

```

Then it works after adding the CA bundle for my cert to the end of the cacert file. I’m not sure why it doesn’t work without the --cacert flag because `CApath: /etc/ssl/certs` should parse the cacert.pem file that’s in that path, no?

I can curl [https://google.com](https://google.com) without specifying a cacert so I know it’s reading some authorities without problems.

I also added

```
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo = /etc/ssl/certs/cacert.pem

```

to the apache php.ini file and restarted apache. Still not working in wordpress.

---

<div class="post-metadata">

### Author: ![JB205](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jb205/32/120962_2.png) [@JB205](https://meta.discourse.org/u/JB205)
#### Post date: [2 juni 2017 om 13:53 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/15 "2017-06-02T13:53:11Z")

</div>

I did some odd stuff but it’s working now.

I ran `openssl s_client -host discourse.server.com -port 443 -CApath /etc/ssl/certs` and it errored out

```
depth=0 OU = Domain Control Validated, OU = PositiveSSL Wildcard, CN = *.domain.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 OU = Domain Control Validated, OU = PositiveSSL Wildcard, CN = *.domain.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 OU = Domain Control Validated, OU = PositiveSSL Wildcard, CN = *.domain.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.domain.com
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA
---

```

The cert chain got me thinking…  
I googled **Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA** and the first link was:

> **[CONTACT US - Comodo: Cloud Native Cyber Security Platform](https://www.comodo.com/contact-us/)**
>
> Please fill in the form if you wish to speak with your region's representative regarding sales, products, services or solutions.

I downloaded that CA to /etc/ssl/certs on the wordpress server and everything came to life. curl works, WP-Discourse is connected, yadda yadda yadda.

Still need to test some more and make sure it’s all working but I was able to post to discourse from WP on a test post.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [8 juni 2024 om 12:44 UTC](https://meta.discourse.org/t/cant-get-by-you-are-not-connected-to-discourse-message/63742/16 "2024-06-08T12:44:41Z")

</div>

This topic was automatically closed after 2563 days. New replies are no longer allowed.
