-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
EOF occurred in violation of protocol #1302
Comments
This is an issue with SSL certificates between your host system and the Exchange server, and not a problem with exchangelib as such. You would most likely get the same error if you did just: import requests
requests.get("https://hosy/ews/exchange.asmx") The reason curl works is because you connected to port 80, not 443, so there was no SSL certificate to validate. Try |
Hey @ecederstrand, is there any way to pass this? I tried to follow #455 but the retry policy hasn't work as well |
In your last stack trace it looks like the server is not accepting connections. It's not possible from the stack trace to see why - it could be network issues, firewall issues, connecting to the wrong server, or something else. Regarding the SSL certificate issue, I think you will get better help in a forum dedicated to SSL certificate validation. |
ok thank you! |
Describe the bug
I'm trying to connect to an account using self-signed certificate, by using NoVerifyHTTPAdapter in BaseProtocol.HTTP_ADAPTER_CLS .
When I access account.inbox.parent I get "EOF occurred in violation of protocol" locally (and "Connection reset by peer" from external server):
I managed to connect to the server with curl:
![image](https://private-user-images.githubusercontent.com/81917647/325248571-f443ebb6-2917-4355-a2f4-4e5bb5d0fb50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNjYzOTksIm5iZiI6MTcyMDM2NjA5OSwicGF0aCI6Ii84MTkxNzY0Ny8zMjUyNDg1NzEtZjQ0M2ViYjYtMjkxNy00MzU1LWEyZjQtNGU1YmI1ZDBmYjUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDE1MjgxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxMTE3NTFhNTI1MGM3ZmViMjg5YzkwNjJmNjFjYzNkODMzN2QyNmJmODJkNTUyN2FjZGU5MmQ3NDkwZTgyMTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jA-Nh0TnR9NbPeFnmBQyujExpB5uFFFe5WDNWM2HJ2I)
I didn't encountered this issue when using 5.0.3. another step I tried to add to the docker image the flag "SSL_OP_IGNORE_UNEXPECTED_EOF" it didn't help.
To Reproduce
Expected behavior
getting valid response
Additional context
For example, Python and exchangelib versions.
python 3.10
exchangelib- 5.2.1
The text was updated successfully, but these errors were encountered: