sqlmapproject/sqlmap · error · OperationalError

MonetDB login did not converge

Error message

MonetDB login did not converge

What it means

The MAPI login loop (merovingian proxy, redirect, mserver challenge) did not reach an empty acceptance block within 10 iterations — a redirect cycle or a server that keeps replying instead of accepting.

Solutions

  1. Check for a merovingian redirect loop (bad proxy config pointing back at itself)
  2. Raise the iteration bound only after confirming the sequence converges
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at extra/dbwire/monetdb.py:215 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/2bc2590146cdfcad. Report an issue: GitHub.

Appendix: source

Thrown at extra/dbwire/monetdb.py:215

    try:
        for _ in range(10):  # bounded: merovingian proxy stage + optional redirect + mserver challenge
            block = _getblock(sock)
            if block == "":  # login accepted
                break
            if block[0] == "^":  # redirect
                url = block[1:].strip()
                m = re.match(r"mapi:monetdb://([^:/]+):(\d+)/(\S*)", url)
                if m and (m.group(1) != host or int(m.group(2)) != port):
                    sock.close()
                    host, port, database = m.group(1), int(m.group(2)), m.group(3) or database
                    sock = socket.create_connection((host, port), timeout=connect_timeout)
                    keepalive(sock)
                continue  # merovingian proxy redirect: keep reading the next challenge on this socket
            if block[0] == "!":
                raise OperationalError("(remote) %s" % block[1:].strip())
            _putblock(sock, _challenge_response(block, user, password, database))
        else:
            raise OperationalError("MonetDB login did not converge")
    except (OperationalError, NotSupportedError, InterfaceError):
        try:
            sock.close()
        except Exception:
            pass
        raise
    except (socket.error, socket.timeout) as ex:  # I/O error during the login/redirect exchange
        try:
            sock.close()
        except Exception:
            pass
        raise OperationalError("connection error: %s" % ex)

    connection = Connection(sock)
    try:
        connection._command("Xreply_size -1\n")  # disable row paging so a whole result set is returned at once
    except (socket.error, socket.timeout) as ex:
        connection.close()

View on GitHub (pinned to 0a35b20e39)