-
Notifications
You must be signed in to change notification settings - Fork 419
authentication issue with md5 on postgres 11 #626
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
Comments
The error traceback you provided doesn't seem to be related to authentication. Looks like a network issue to me. What do server-side logs show? |
Here is the server log. It doesn't seem related either. Regardless, which code in the client is deciding to do MD5 or SHA256? 020-09-22 09:32:42.141 EDT [26229]: [26229-10] db=----,user=useridAAA,app=[unknown],client=---.comLOG: disconnection: session time: 0:00:03.012 user=useridAAA database=--- host=----.com port=61034 |
Authentication method is decided by the server based on configuration, asyncpg only reacts to what the server is asking it to do. See |
Trying to find out how the postgres server to instruct the client to hash, but didn't find much. What's the constant that the client is using from the server to do the hash? I doubt on that because we have the same server and the same client code.But the different hash was used by the same client code. It seems the client code is influenced by something else. Also, looking at code below from https://gemfury.com/agriconnect/python:asyncpg/0.18.2/content/protocol/coreproto.pyx. It doesn't seem it's handling the scram sha 256?
|
You are looking at a fairly old version of asyncpg. Why 0.18.2? |
look at the latest code. where is the PROTOCOL_AUTH value from?
|
google led me to this old open issue. I have a related problem with what I got is
which indicates that |
the issue with a local PostgreSQL install?:
uvloop?:
Below is the error message when couldn't be authenticated.
`DEBUG: Using selector: EpollSelector
DEBUG: Get address info edclpgsd320c.bcbsfl.com:5420, type=<SocketKind.SOCK_STREAM: 1>
DEBUG: Getting address info edclpgsd320c.bcbsfl.com:5420, type=<SocketKind.SOCK_STREAM: 1> took 2.792 ms: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('))]
DEBUG: poll 59997.326 ms took 1.820 ms: 1 events
DEBUG: connect <socket.socket fd=6, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('0.0.0.0', 0)> to ()
DEBUG: poll 59993.166 ms took 0.141 ms: 1 events
DEBUG: <socket.socket fd=6, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('), raddr=(')> connected to : (<_SelectorSocketTransport fd=6 read=polling write=<idle, bufsize=0>>, <asyncpg.protocol.protocol.Protocol object at 0x7fc691bc7858>)
DEBUG: poll 59990.760 ms took 0.014 ms: 1 events
INFO: poll 59990.568 ms took 60000.243 ms: 1 events
DEBUG: <_SelectorSocketTransport fd=6 read=polling write=<idle, bufsize=0>> received EOF
Traceback (most recent call last):
File "asyncdb3c.py", line 52, in
File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
File "asyncdb3c.py", line 34, in init_app
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/pool.py", line 398, in async__init_
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/pool.py", line 426, in _initialize
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/pool.py", line 125, in connect
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/pool.py", line 472, in _get_new_connection
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/connection.py", line 1727, in connect
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/connect_utils.py", line 666, in _connect
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 110, in next
File "/u/i3ye/ppx/lib64/python3.6/site-packages/asyncpg/connect_utils.py", line 642, in _connect_addr
File "/usr/lib64/python3.6/asyncio/tasks.py", line 358, in wait_for
asyncpg.exceptions.ConnectionDoesNotExistError: connection was closed in the middle of operation
`
The text was updated successfully, but these errors were encountered: