So I’ve been trying to use the twitter module for ages, and I am getting an error code in the logs that says ‘Error contacting Twitter API: SSL certificate problem: unable to get local issuer certificate’. Any suggestions for a resolution??
Thanks
So I’ve been trying to use the twitter module for ages, and I am getting an error code in the logs that says ‘Error contacting Twitter API: SSL certificate problem: unable to get local issuer certificate’. Any suggestions for a resolution??
Thanks
Looks like a curl cert issue I think, perhaps have a look here Using Tickers, Forecast, Twitter and other external resources that make use of HTTPS connections
Thanks I tried that, I installed the CMS using docker and I’m unable to find the php.ini file so where would I direct the ca cert file in this case? (Or install curl in the first place and get it working with docker)
If you’re using docker, then that should not be a problem, is it 1.8.2 CMS?
Have you also connected your twitter account as described here (with API key/secret) - http://xibo.org.uk/manual/en/media_module_twitter.html
Is that fresh 1.8 series installation or upgrade from earlier series?
If the module is configured correctly, then perhaps run ‘verify all’ on Modules page.
As Peter says, the SSL certificate file is built in to the container so there’s no need to do that on a Docker based installation.
The only other reasons that you’d get that error are if the date/time on the server are wrong, or if you’re using a proxy server that issues its own SSL certificates for the purposes of content filtering or monitoring. In that case, you’d need to add the proxy servers certificates in to the certificates that the container uses to validate SSL connections, or make an exception in the proxy such that SSL connections from the CMS aren’t intercepted.
Yes I’m using docker + CMS 1.8.2 - I have tried and checked both of the suggestions but I’m still getting the error
I’ll look into this further and keep trying, thanks for the suggestions
Get a shell in the web container, and then try calling curl directly against twitter.com
That might give a better idea what the error is:
docker ps
Find the container with cms-web_1
in the name, then, if it’s for example xibodocker_cms-web_1
docker exec -ti xibodocker_cms-web_1 bash
curl -iv https://twitter.com > /dev/null
exit
What does that output? It should basically try and connect to Twitter and dump out the headers and hopefully a more verbose error.
Thanks I’ve done that & below is the output from PowerShell - all I can think the issue might be is that it says ‘CAfile: none’ - if this is the issue how is this rectified?
PS X:> docker exec -ti xibo_cms-web_1 bash
root@9f5a773a86fa:/# cur -iv https://twitter.com > /dev/null
bash: cur: command not found
root@9f5a773a86fa:/# curl -iv https://twitter.com > /dev/null
subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware;
serialNumber=4337446; street=Suite 900; street=1355 Market St; postalCode=94103; C=US; ST=California; L=San Francisco;
O=Twitter, Inc.; OU=tsa_f Point of Presence; CN=twitter.com
start date: 2017-01-12 00:00:00 GMT
expire date: 2019-01-17 12:00:00 GMT
subjectAltName: twitter.com matched
issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
SSL certificate verify ok.
GET / HTTP/1.1
User-Agent: curl/7.35.0
Host: twitter.com
Accept: /
< HTTP/1.1 200 OK
< cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
< content-length: 113928
< content-type: text/html;charset=utf-8
< date: Mon, 18 Sep 2017 08:23:26 GMT
< expires: Tue, 31 Mar 1981 05:00:00 GMT
< last-modified: Mon, 18 Sep 2017 08:23:26 GMT
< pragma: no-cache
That’s working fine then, so I don’t think the issue you’re seeing is a certificate issue.
Perhaps it was originally, and you’ve resolved that already, and now it’s something else?
Got this all working now thank you
On a side note, is it possible to increase the text size in the twitter metro module? I need it quite small and can’t see a way to increase the size in override layout or anything