danimaribeiro / PyTrustNFe

Módulo NF-e Python
GNU Affero General Public License v3.0
174 stars 141 forks source link

Mensagem: HTTPSConnectionPool(host='nfe-homologacao.svrs.rs.gov.br', port=443): #205

Closed enriquevago closed 5 years ago

enriquevago commented 5 years ago

Erro: Odoo Server Error

Traceback (most recent call last): File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "/opt/bitnami/python/lib/python3.6/site-packages/pyOpenSSL-17.5.0-py3.6.egg/OpenSSL/SSL.py", line 1806, in do_handshake self._raise_ssl_error(self._ssl, result) File "/opt/bitnami/python/lib/python3.6/site-packages/pyOpenSSL-17.5.0-py3.6.egg/OpenSSL/SSL.py", line 1546, in _raise_ssl_error _raise_current_error() File "/opt/bitnami/python/lib/python3.6/site-packages/pyOpenSSL-17.5.0-py3.6.egg/OpenSSL/_util.py", line 54, in exception_from_error_queue raise exception_type(errors) OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/connection.py", line 326, in connect sslcontext=context) File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/util/ssl.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/bitnami/python/lib/python3.6/site-packages/requests-2.18.4-py3.6.egg/requests/adapters.py", line 440, in send timeout=timeout File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/opt/bitnami/python/lib/python3.6/site-packages/urllib3-1.22-py3.6.egg/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='nfe-homologacao.svrs.rs.gov.br', port=443): Max retries exceeded with url: /ws/NfeAutorizacao/NFeAutorizacao4.asmx?wsdl (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 647, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 307, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/tools/pycompat.py", line 87, in reraise raise value File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 689, in dispatch result = self._call_function(self.params) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 339, in _call_function return checked_call(self.db, *args, *kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/service/model.py", line 97, in wrapper return f(dbname, args, kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 332, in checked_call result = self.endpoint(*a, kw) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 933, in call return self.method(*args, *kw) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/http.py", line 512, in response_wrap response = f(args, kw) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/addons/web/controllers/main.py", line 934, in call_button action = self._call_kw(model, method, args, {}) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/addons/web/controllers/main.py", line 922, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/opt/bitnami/apps/odoo/lib/odoo-11.0.post20180218-py3.6.egg/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, kwargs) File "/home/bitnami/addon/odoo-brasil/br_nfe/models/invoice_eletronic.py", line 910, in action_send_eletronic_invoice modelo=self.model) File "/opt/bitnami/python/lib/python3.6/site-packages/PyTrustNFe3-1.0.27-py3.6.egg/pytrustnfe/nfe/init.py", line 114, in autorizar_nfe return _send(certificado, 'NfeAutorizacao', kwargs) File "/opt/bitnami/python/lib/python3.6/site-packages/PyTrustNFe3-1.0.27-py3.6.egg/pytrustnfe/nfe/init.py", line 85, in _send client = Client(base_url, transport=transport) File "/opt/bitnami/python/lib/python3.6/site-packages/zeep-3.1.0-py3.6.egg/zeep/client.py", line 62, in init wsdl, self.transport, settings=self.settings) File "/opt/bitnami/python/lib/python3.6/site-packages/zeep-3.1.0-py3.6.egg/zeep/wsdl/wsdl.py", line 82, in init document = self._get_xml_document(location) File "/opt/bitnami/python/lib/python3.6/site-packages/zeep-3.1.0-py3.6.egg/zeep/wsdl/wsdl.py", line 143, in _get_xml_document location, self.transport, self.location, settings=self.settings) File "/opt/bitnami/python/lib/python3.6/site-packages/zeep-3.1.0-py3.6.egg/zeep/loader.py", line 74, in load_external content = transport.load(url) File "/opt/bitnami/python/lib/python3.6/site-packages/zeep-3.1.0-py3.6.egg/zeep/transports.py", line 110, in load content = self._load_remote_data(url) File "/opt/bitnami/python/lib/python3.6/site-packages/zeep-3.1.0-py3.6.egg/zeep/transports.py", line 126, in _load_remote_data response = self.session.get(url, timeout=self.load_timeout) File "/opt/bitnami/python/lib/python3.6/site-packages/requests-2.18.4-py3.6.egg/requests/sessions.py", line 521, in get return self.request('GET', url, kwargs) File "/opt/bitnami/python/lib/python3.6/site-packages/requests-2.18.4-py3.6.egg/requests/sessions.py", line 508, in request resp = self.send(prep, send_kwargs) File "/opt/bitnami/python/lib/python3.6/site-packages/requests-2.18.4-py3.6.egg/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/opt/bitnami/python/lib/python3.6/site-packages/requests-2.18.4-py3.6.egg/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='nfe-homologacao.svrs.rs.gov.br', port=443): Max retries exceeded with url: /ws/NfeAutorizacao/NFeAutorizacao4.asmx?wsdl (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))

Boa noite Danimar, via curl e pelo navegador o endereço está acessando, chequei a porta 443 pelo ping.eu e esta como fechada poderia ser isso ?

crsilveira commented 4 years ago

Olá, vc conseguiu resolver o problema acima ? Estou tentando criar a conexão com o MDFe, e recebo o mesmo erro :raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='mdfe-homologacao.svrs.rs.gov.br', port=443): Max retries exceeded with url: /ws/MDFeRecepcao/MDFeRecepcao.asmx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f49c397d790>: Failed to establish a new connection: [Errno -2] Nome ou serviço desconhecido'))