google_api_connection_fail when activating plugin
-
Re: I am a amateur at this!
The message I get when I try to activate sitekit is:
“Your site may not be ready for Site Kit
Looks like your site is having a technical issue with requesting data from Google services.
To get more help, ask a question on our support forum and include the text of the original error message:
google_api_connection_fail”When I click signin “https://staging.therockiestours.ca/therockiestours.ca/wp-admin/index.php?action=googlesitekit_proxy_setup_start&nonce=bbb3592ead” I get:
“The request to the authentication proxy has failed with an error: request_failed Get help.”
When check curl I get
[root@vps197 ~]# curl -I https://sitekit.withgoogle.com
HTTP/2 403
alt-svc: h3=”:443″; ma=2592000,h3-29=”:443″; ma=2592000The page I need help with: [log in to see the link]
-
Please note this was working on my other sites on the server previously, but now I am getting json errors on those other sites now, not sure if related
“Unknown Error (code: Invalid JSON response). Get help“
“Data error in Analytics Invalid JSON response”
“Data error in Search Console Invalid JSON response”
Also I have tried already resetting site kit in Tool/Available Tools
-
This reply was modified 2 years, 6 months ago by
ochoppee.
I have submitted my health information here
https://docs.google.com/forms/d/1lhjns2K7c0Ny7ME4gxTcsnYtNUtcMr8BvFpPQi23Y1E/
Please note: https://staging.therockiestours.ca/therockiestours.ca/ and https://therockiestours.ca/ are having the same issue
Thanks for reaching out, and sharing your Site Health information along with your cURL checks. Based on the information provided, I suspect there is something at host level blocking communication between your site and the Site Kit service (sitekit.withgoogle.com). This could be only if communicated over IPv6 as per other users experience. To determine more on this, please share the following:
- Do you see any warnings or errors when checking your Site Health status (Tools > Site Health > Status), which differs from your Site Health information previously shared?
- If you perform the following command – which will ensure communication is over IPv4 only, do you encounter a successful 200 response?
curl -4 -I https://sitekit.withgoogle.com - Does the same occur if you temporary disable any Web Application Firewall?
Let me know if you have any questions with the above. Note also you can rule out the issue being anything local or with your browser by checking does the same occur on this demo WordPress site. I suspect you will be able to complete set up without issue.
Hi
Regarding Site Health
No the only warning I have is below, I have eliminated the rest of the errors previously, and this occurred after I moved the site off cloudflare nameservers to my domain and hosting provider Canspace
“Unable to detect the presence of page cache Performance
Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received (Code: http_request_failed)
Page cache enhances the speed and performance of your site by saving and serving static pages instead of calling for a page every time a user visits.
Page cache is detected by looking for an active page cache plugin as well as making three requests to the homepage and looking for one or more of the following HTTP client caching response headers:
cache-control,expires,age,last-modified,etag,x-cache-enabled,x-cache-disabled,x-srcache-store-status,x-srcache-fetch-status.Re: Demo Site and Web Application Firewall and curl
The Demo site works for me with my chrome browser! I might note that I use Immunify360, does this info help, and I am checking on curl
Re: Curl ipv4
[root@vps197 ~]# curl -4 -I https://sitekit.withgoogle.com
HTTP/2 200
content-type: text/html
vary: Accept-Encoding
x-cloud-trace-context: f040e5ffe9635f82a4d6deccf648c78b
date: Tue, 31 Oct 2023 18:39:15 GMT
server: Google Frontend
alt-svc: h3=”:443″; ma=2592000,h3-29=”:443″; ma=2592000Additional Info Curl
In regard to the response you posted, while the server does have an assigned IPV6 address it uses IPV4 for it’s main connection. The curl command defaults to IPV6 without the -4 flag they mention in the response. The output of the updated command is pasted for you below and does give a successful 200 connection code.
Your server does have a WAF in place (mod security) which can be disabled for testing (or completely) within cPanel in the security section under Mod Security. You can disable this for any specific site within the account.
[root@vps197 ~]# curl -4 -I https://sitekit.withgoogle.com
HTTP/2 200
content-type: text/html
vary: Accept-Encoding
x-cloud-trace-context: f040e5ffe9635f82a4d6deccf648c78b
date: Tue, 31 Oct 2023 18:39:15 GMT
server: Google Frontend
alt-svc: h3=”:443″; ma=2592000,h3-29=”:443″; ma=2592000-Guy H.
Support, CanSpaceRe: Immunify360
I have disabled immunify360 for the site right now, and still have the issue as stated in the topic
Thanks for the troubleshooting updates @ochoppee, which confirm that the issue is specific to IPv6. I’m happy to request a check for any blocks if you can share the following:
- Your IPv6 address for the impacted sites. I suspect they are all within the same range.
- Are you using a shared hosting solution? If not have you tried restarting your server? I ask as I noticed some cURL errors reported in your Site Health status. With that may also wish to temporarily switch PHP version.
- Did you have Site Kit successfully running on any of these sites before?
Let me know if you have any questions with the above.
Hello,
- Your IPv6 address for the impacted sites. I suspect they are all within the same range.
Yes, I believe they are as they are hosted on a VPS, which has 2 IP’s assigned to it.
- Are you using a shared hosting solution? If not have you tried restarting your server? I ask as I noticed some cURL errors reported in your Site Health status. With that may also wish to temporarily switch PHP version.
No I have not tried restarting the server, I can ask my hosting provider to do so. Due to complex issues, switch PHP versions is not an easy task, as it may affect each site differently that is hosted on the server, I can do this as a last resort?
- Did you have Site Kit successfully running on any of these sites before?
Yes I did on all my sites on the server, the other sites are either still connected and experiencing json error when trying to retrieve data or having issues connecting.
So if IPv4 works and IPv6 is forbidden, what might be a solution?
If you want to share the IPv6 addresses for your site/sites then I can check if there is a block.
No I have not tried restarting the server, I can ask my hosting provider to do so. Due to complex issues, switch PHP versions is not an easy task, as it may affect each site differently that is hosted on the server, I can do this as a last resort?
There is no guarantee that a restart will address the issue. If it’s related to an IPv6 block then it likely won’t correct the issue, so don’t worry about restarting if it’s not a straightforward task. I’ll request a check of your IPv6 address first.
So if IPv4 works and IPv6 is forbidden, what might be a solution?
Great question. If we can determine an IPv6 block based on the range, then this can be addressed at host level. One workaround is to temporarily disable IPv6 when setting up Site Kit. If you have web terminal access I can provide you with the steps to do so. Otherwise, let me know of the IPv6 address of your host server and I’ll request a check for any block.
Here is my hosting provider response, and I had them restart the server.
Posted by CanSpace Solutions G1 on 1st Nov 2023 (09:26)Operator
Hello Peter,
The IPV6 address assigned to your server is noted below. If you’d like a restart of the server we can take care of that for you as it is your private VPS as opposed to a shared host.
inet6 2607:5300:201:3100::82c1 prefixlen 64 scopeid 0x0<global>
-Guy H.
Support, CanSpace“One workaround is to temporarily disable IPv6 when setting up Site Kit. If you have web terminal access I can provide you with the steps to do so.”
Let me know if I need this after you check my IPv6 for a block! If so I can work with my hosting provider on this.
-
This reply was modified 2 years, 6 months ago by
ochoppee.
-
This reply was modified 2 years, 6 months ago by
The topic ‘google_api_connection_fail when activating plugin’ is closed to new replies.