[Python] GremlinServerError 499: “The traversal source [g] for alias [g] is not configured on...

Discussão em 'Python' iniciado por Stack, Maio 5, 2025.

  1. Stack

    Stack Membro Participativo

    I’m trying to connect gremlin-python (v3.13.2) to a local Gremlin Server 3.7.3 on macOS 15.4.1 with Java 17, but every query fails with:

    GremlinServerError: The traversal source [g] for alias [g] is not configured on the server (status code 499)


    I’ve got gremlin-server.yaml set up exactly as in the docs, I unzipped the distribution into ~/Documents/NA/network_tool/apache-tinkerpop-gremlin-server-3.7.3, and I start it with:

    bin/gremlin-server.sh conf/gremlin-server.yaml


    But when I run:

    from gremlin_python.structure.graph import Graph
    from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
    g = Graph().traversal().withRemote(
    DriverRemoteConnection('ws://localhost:8182/gremlin','g')
    )
    print(g.V().count().next())


    I get that same 499 error. Environment:

    macOS 15.4.1 (Monterey)

    Conda env with Python 3.13.2

    Java: OpenJDK 17.0.15 via Homebrew

    gremlin-server.yaml (I’ve attached the full file at the bottom)


    What I’ve already tried:


    • Switching between the “classic” and “modern” sample YAMLs


    • Confirming tinkergraph-empty.properties is in conf/


    • Upgrading/downgrading JDK to 17, 11


    • Verifying the server logs show “Channel started at port 8182” without other errors

    Any pointers on what I’m missing, or how to properly configure the traversal source alias so that gremlin-python can see it?

    A running server that binds a traversal source called g so that g.V().count() returns 0 rather than an “alias not configured” error.

    Continue reading...

Compartilhe esta Página