setting https for the connector
(Edit: On Magento Connector Branch 8.0 in Debian and connecting with Magento 1.93) When specifying https rather than http in the connector I am getting the following error:
A network error caused the failure of the job: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
I have tried to put .crt/.pem files from the Magento Site into the Odoo Server in openssl findable directories but I still get the failure. Somehow in fact my attempts ended up causing problems with XMLRPC protocol so I have, for now, gone to a backup which is working again.
It seems that there are several references to Code like the following that can stop "verification" though I am not finding any way to control this behavior in Magento Connector. Perhaps some sort of a Python statement could implement it..
Example from https://stackoverflow.com/questions/19268548/python-ignore-certificate-validation-urllib2
import urllib2, ssl
request = urllib2.Request('https://somedomain.co/')
response = urllib2.urlopen(request, context=ssl._create_unverified_context())
I really need to get this working. Likely a way with the xmlrpc to get the cert (which is working normally on Magento) to work via putting .pem file into the Odoo system (Debian). That said, I tried that so far with no luck.
Any help here would be appreciated. Seems it would be something to build into the system as it appears to be a common issue in other parts of the Python world and some parts of the Odoo world.
So I was able to get http working again (without backup image). A space had entered in at the end of the Connector backend URL entry.
Not successful yet on https though.
In Branch 8:
I am back trying to work through this. If I am running Magento in https (for secure and unsecure), then in Odoo MagentoConnector, I have "http://magentourl..." defined I get :
ProtocolError: <ProtocolError for magentourl/index.php/api/xmlrpc: 500 Internal Server Error>
If I move the connector URL to "https://magentourl..." I get
A network error caused the failure of the job: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581) --
I have found: import urllib2
within magentoerpconnect/product.py testing but not really getting traction by adding
import ssl
directly below. Then lower in the file: I have tried to add (after) > request = urllib2.Request(url) (this line) response = urllib2.urlopen(request, context=ssl._create_unverified_context())
Not getting it done. I will work on this some more. Seems there should be a solution.
(I should generally get more formal here via Git pulls and modifications - I do have this pulled). Need to get back into practice.