-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] Tornado UnicodeDecodeError behind proxy #64104
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
Can you intercept and show the response headers that the proxy is returning? |
Intercepting any traffic and checking wont help here. A tornado update will. If you go and patch the file /opt/saltstack/salt/lib/python3.10/site-packages/salt/ext/tornado/curl_httpclient.py manually to the latest version from tornado 6.4.0 like this: Old code:
New code (latest tornado lib):
The error disappears after replacing the block. I suppose this is because of different handling on the DEBUGMESSAGE callback from pycurl since version 7.19.5.2: The second argument to a DEBUGFUNCTION callback is now of type bytes on Python 3. Previously the argument was of type str. (Source) However, in my use-cases, the message did not prevent the function. It was merely an annoying bunch of tracebacks on each saltstate-call. Tornado lib in salt is scheduled to be updated in 3007.x as I have read in #64305. So from that release on the error should not appear anymore. |
Description
Downloading some files behind a proxy causes the below error:
This is only for some files. This URL (On the same server) does not error.
http://archive.ubuntu.com/ubuntu/dists/focal-updates/Release
Setup
Salt minion config:
State file
Squid proxy config
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
Debug Logs
Debug
Expected behavior
The file should download without errors.
Screenshots
N/A
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: