GeezerVison is showing github.com — Unexpected message type 'H' for message any while executing query from Python · Issue #668 · ArcadeData/arcadedb
Unexpected message type 'H' for message any while executing query from Python #668DescriptionArcadeDB Version: 22.10.0
JDK Version: OpenJDK Runtime Environment 18.9
OS: RHEL
Expected behavior
Actual behavior
Unexpected message type 'H' for message any
com.arcadedb.postgres.PostgresProtocolException: Unexpected message type 'H' for message any
at com.arcadedb.postgres.PostgresNetworkExecutor.readMessage(PostgresNetworkExecutor.java:969)
at com.arcadedb.postgres.PostgresNetworkExecutor.run(PostgresNetworkExecutor.java:140)
Steps to reproduce
Step#1: Start the arcadedb server with postgres driver enabled as below:
bin/server.sh -Darcadedb.server.plugins="Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
Step#2:
Execute the following command:
import asyncio
import asyncpg
async def run():
conn = await asyncpg.connect(user='xxxx', password='xxxx',
database='OpenBeer', host='xxx.xxx.xxx.xx')
sql = "select from Beer limit 30"
values = await conn.fetch(sql)
await conn.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
<An SQL script to reproduce the problem or a JUnit test case will increase A LOT the chance to have a quick fix> Activitylvca commented on Dec 22, 2022 This issue looks old to me. Could you please try 22.11.1 or the latest snapshot (22.12.1-SNAPSHOT)? lvca commented on Jan 16, 2023 No response from the author for a while, closing the issue. LLuke commented on Nov 17, 2023 This still happens with 23.10.1. The following code works with postgresql but fail with arcadedb with error message "com.arcadedb.postgres.PostgresProtocolException: Unexpected message type 'H' for message any"
import asyncio
import asyncpg
import nest_asyncio
# Apply nest_asyncio to enable nested event loops in Jupyter-notebook if need
# nest_asyncio.apply()
async def run():
conn = await asyncpg.connect(host="192.168.20.157", port="3333", ssl=None, database="arcade_testdb", user="root", password="PlayWithData")
values = await conn.fetch(''' select * from schema:database ''')
# Print out the results
i = 1
for row in values:
print(i, row)
i = i + 1
await conn.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
LLuke commented on Nov 17, 2023 Stack trace
2023-11-16 17:17:02.088 INFO [PostgresNetworkExecutor] PSQL: received not supported SSL connection request. Sending back error message to the clientUnexpected message type 'H' for message any
com.arcadedb.postgres.PostgresProtocolException: Unexpected message type 'H' for message any
at com.arcadedb.postgres.PostgresNetworkExecutor.readMessage(PostgresNetworkExecutor.java:1006)
at com.arcadedb.postgres.PostgresNetworkExecutor.run(PostgresNetworkExecutor.java:131)
2023-11-16 17:17:03.072 SEVER [PostgresNetworkExecutor] PSQL: Closing connection with client
This still happens with 23.10.1. The following code works with postgresql but fail with arcadedb with error message "com.arcadedb.postgres.PostgresProtocolException: Unexpected message type 'H' for message any"
import asyncio
import asyncpg
import nest_asyncio
# Apply nest_asyncio to enable nested event loops in Jupyter-notebook if need
# nest_asyncio.apply()
async def run():
conn = await asyncpg.connect(host="192.168.20.157", port="3333", ssl=None, database="arcade_testdb", user="root", password="PlayWithData")
values = await conn.fetch(''' select * from schema:database ''')
# Print out the results
i = 1
for row in values:
print(i, row)
i = i + 1
await conn.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
lvca commented on Nov 17, 2023 Weird, I've never seen a message with H. From Postgres protocol (https://www.postgresql.org/docs/9.6/protocol-message-formats.html) the H is a flush message: "The Flush message does not cause any specific output to be generated, but forces the backend to deliver any data pending in its output buffers. A Flush must be sent after any extended-query command except Sync, if the frontend wishes to examine the results of that command before issuing more commands. Without Flush, messages returned by the backend will be combined into the minimum possible number of packets to minimize network overhead."
Basically, the Flush can be ignored in ArcadeDB. The Postgres docs don't mention the flow after the flush, if the server should send any message to the client. How can I test that? I'd like to write a test case in Java so it can be included in our regression suite.
If you can test it, please pull the latest main branch, compile a distro mvn clean install -DskipTests and try with a fresh server. reneleonhardt commented on Feb 8, 2026 lvca commented on Feb 12, 2026 Not yet. Which feature of the new protocol are you interested in? reneleonhardt commented on Feb 12, 2026 As far as I understood, secret keys may be longer now, I always appreciate when security can be improved 🙂
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|