Skip to content

ResourceWarning: unclosed <ssl.SSLSocket fd=x, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM  #93539

Closed as not planned
@eabase

Description

@eabase
  • Package Name/Version:
azure-core          1.24.1
azure-cosmos        4.3.0
  • Operating System: Win 10 Pro
  • Python Version: 3.10.3

Describe the bug
Connecting to Azure Cosmos DB using Win10 and py 3.10.3, we get the following errors:

Getting SSL error from demo/example code, pointing to ssl.py:

sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=424, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('xxxx', 29156), raddr=('yyyy', 443)>
Object allocated at (most recent call last):
  File "C:\python310\lib\ssl.py", lineno 1033
    self = cls.__new__(cls, **kwargs)
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=412, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('xxxx', 29157), raddr=('yyyy', 443)>
Object allocated at (most recent call last):
  File "C:\python310\lib\ssl.py", lineno 1033
    self = cls.__new__(cls, **kwargs)

To Reproduce

    client = CosmosClient(url, credential=key) 
    database  = client.get_database_client(database_name)
    container = database.get_container_client(container_name)

Expected behavior
No SSL close connection error.

Screenshots
N/A

Additional context
It might be useful to know that I'm also using VPN as the Azure resource is not accessible otherwise.


Original Azure Bug Post:
Azure/azure-sdk-for-python#23794

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions