GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #668

New issue
Copy link
New issue
Copy link
Closed
Bug
Closed
Unexpected message type 'H' for message any while executing query from Python#668
Bug
Copy link
Assignees
lvca
Milestone
23.1.1

Description

@iborntolearn
iborntolearn
opened on Dec 12, 2022
Issue body actions

ArcadeDB 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>

Activity

Next
  1. lvca commented on Dec 22, 2022

    @lvca
    lvca
    on Dec 22, 2022
    Member
    More actions

    This issue looks old to me. Could you please try 22.11.1 or the latest snapshot (22.12.1-SNAPSHOT)?

  2. lvca
    self-assigned this
    on Dec 22, 2022
  3. lvca
    added
    bug
    on Dec 22, 2022
  4. lvca
    modified the milestones: 22.12.1, 23.1.1 on Dec 22, 2022
  5. lvca commented on Jan 16, 2023

    @lvca
    lvca
    on Jan 16, 2023
    Member
    More actions

    No response from the author for a while, closing the issue.

  6. lvca
    closed this as completedon Jan 16, 2023
  7. lvca
    added
    invalidThis doesn't seem right
    and removed
    bug
    on Jan 16, 2023
  8. LLuke commented on Nov 17, 2023

    @LLuke
    LLuke
    on Nov 17, 2023
    Contributor
    More actions

    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())
    
  9. LLuke commented on Nov 17, 2023

    @LLuke
    LLuke
    on Nov 17, 2023
    Contributor
    More actions

    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())
    
  10. lvca
    added a commit that references this issue on Nov 17, 2023

    fix: fixed postgres driver FLUSH command

    f37e818
  11. lvca commented on Nov 17, 2023

    @lvca
    lvca
    on Nov 17, 2023
    Member
    More actions

    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.

  12. lvca
    reopened this on Nov 17, 2023
  13. 46 remaining items

  14. robfrank
    added 2 commits that reference this issue on Jan 28, 2026

    test: migrate basic connection and query tests

    cbe969f

    docs: add asyncpg test documentation

    d9be4ec
  15. mergify
    added a commit that references this issue on Feb 8, 2026

    chore(deps-dev): bump org.codehaus.mojo:license-maven-plugin from 2.4…

    e83f28e
  16. reneleonhardt commented on Feb 8, 2026

    @reneleonhardt
    reneleonhardt
    on Feb 8, 2026
    Contributor
    More actions

    Thank you for adding unit tests!

    Is the new wire protocol 3.2 (introduced in Postgres 18) covered?
    https://www.postgresql.org/docs/current/protocol-overview.html#PROTOCOL-VERSIONS

  17. lvca commented on Feb 12, 2026

    @lvca
    lvca
    on Feb 12, 2026
    Member
    More actions

    Not yet. Which feature of the new protocol are you interested in?

  18. reneleonhardt commented on Feb 12, 2026

    @reneleonhardt
    reneleonhardt
    on Feb 12, 2026
    Contributor
    More actions

    As far as I understood, secret keys may be longer now, I always appreciate when security can be improved 🙂

  19. robfrank
    added 2 commits that reference this issue on Feb 17, 2026

    fi: postgres protocol

    dfe5666

    fix: more postgres protocol fixes

    5d4834b
  20. tae898
    added 7 commits that reference this issue on Jun 28, 2026

    fix: fixed postgres driver FLUSH command

    accae76

    fix: postgres -> fixed 'H' message and supported BEGIN TRANSACTION

    0acb56f

    fix: postgres driver -> supported begin transaction and set datestyle…

    ea3c487

    chore: added python requireements.txt

    bbdd714

    fi: postgres protocol

    c8141da

    fix: more postgres protocol fixes

    b933940

    chore(deps-dev): bump org.codehaus.mojo:license-maven-plugin from 2.4…

    5aeb5a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

Bug

Projects

No projects

    Milestone

    • 23.1.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.