Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro emitir nota sefaz GO DH_KEY_TOO_SMALL #324

Open
lucaslc7s opened this issue Jun 1, 2023 · 0 comments
Open

Erro emitir nota sefaz GO DH_KEY_TOO_SMALL #324

lucaslc7s opened this issue Jun 1, 2023 · 0 comments

Comments

@lucaslc7s
Copy link

lucaslc7s commented Jun 1, 2023

Erro acontece apenas no modo produção

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 598, in urlopen
httplib_response = self._make_request(conn, method, url,
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 850, in validate_conn
conn.connect()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 319, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/ssl
.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='nfe.sefaz.go.gov.br', port=443): Max retries exceeded with url: /nfe/services/NFeAutorizacao4?wsdl (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1131)')))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo/odoo/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/odoo/http.py", line 916, in call
return self.method(*args, **kw)
File "/opt/odoo/odoo/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 1346, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo-brasil/l10n_br_eletronic_document/models/nfe.py", line 824, in action_send_eletronic_invoice
resposta = autorizar_nfe(
File "/usr/local/lib/python3.8/dist-packages/pytrustnfe/nfe/init.py", line 243, in autorizar_nfe
return _send(certificado, "NfeAutorizacao", **kwargs)
File "/usr/local/lib/python3.8/dist-packages/pytrustnfe/nfe/init.py", line 212, in _send
first_op, client = _get_client(base_url, transport)
File "/usr/local/lib/python3.8/dist-packages/pytrustnfe/nfe/init.py", line 192, in _get_client
client = Client(base_url, transport=transport)
File "/usr/local/lib/python3.8/dist-packages/zeep/client.py", line 68, in init
self.wsdl = Document(wsdl, self.transport, settings=self.settings)
File "/usr/local/lib/python3.8/dist-packages/zeep/wsdl/wsdl.py", line 80, in init
document = self._get_xml_document(location)
File "/usr/local/lib/python3.8/dist-packages/zeep/wsdl/wsdl.py", line 142, in _get_xml_document
return load_external(
File "/usr/local/lib/python3.8/dist-packages/zeep/loader.py", line 78, in load_external
content = transport.load(url)
File "/usr/local/lib/python3.8/dist-packages/zeep/transports.py", line 110, in load
content = self._load_remote_data(url)
File "/usr/local/lib/python3.8/dist-packages/zeep/transports.py", line 126, in _load_remote_data
response = self.session.get(url, timeout=self.load_timeout)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
requests.exceptions.SSLError: HTTPSConnectionPool(host='nfe.sefaz.go.gov.br', port=443): Max retries exceeded with url: /nfe/services/NFeAutorizacao4?wsdl (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1131)')))

@lucaslc7s lucaslc7s changed the title Erro emitir nota sefaz GO Erro emitir nota sefaz GO DH_KEY_TOO_SMALL Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant