sqlmapproject/sqlmap · error · SqlmapConnectionException

unable to retrieve page content

Error message

unable to retrieve page content

What it means

checkConnection was unable to fetch the target URL's content during the pre-flight check (requestException set, empty/failed response), so the page-comparison baseline cannot be built. Since every later injection comparison depends on this baseline, sqlmap aborts the run with this connection exception.

Solutions

  1. Confirm the target URL is reachable from this machine (curl/wget the URL).
  2. Check proxy/Tor configuration and credentials.
  3. Retry — the target may have been temporarily down or rate-limiting.
  4. Use --force-ssl or fix the scheme if a TLS issue blocked the request; adjust timeouts with --timeout.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at lib/controller/checks.py:1810 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/c55ee32525cfca93. Report an issue: GitHub.

Appendix: source

Thrown at lib/controller/checks.py:1810

            infoMsg += "the target URL page content"
            logger.info(infoMsg)

            if not re.search(conf.regexp, rawResponse, re.I | re.M):
                warnMsg = "you provided '%s' as the regular expression " % conf.regexp
                warnMsg += "which does not have any match within the target URL raw response. sqlmap "
                warnMsg += "will carry on anyway"
                logger.warning(warnMsg)

        kb.errorIsNone = False

        if any(_ in (kb.serverHeader or "") for _ in PRECONNECT_INCOMPATIBLE_SERVERS):
            singleTimeWarnMessage("turning off pre-connect mechanism because of incompatible server ('%s')" % kb.serverHeader)
            conf.disablePrecon = True

        if not kb.originalPage and wasLastResponseHTTPError():
            if getLastRequestHTTPError() not in (conf.ignoreCode or []):
                errMsg = "unable to retrieve page content"
                raise SqlmapConnectionException(errMsg)
        elif wasLastResponseDBMSError():
            warnMsg = "there is a DBMS error found in the HTTP response body "
            warnMsg += "which could interfere with the results of the tests"
            logger.warning(warnMsg)
        elif wasLastResponseHTTPError():
            if getLastRequestHTTPError() not in (conf.ignoreCode or []):
                warnMsg = "the web server responded with an HTTP error code (%d) " % getLastRequestHTTPError()
                warnMsg += "which could interfere with the results of the tests"
                logger.warning(warnMsg)
        else:
            kb.errorIsNone = True

        if kb.choices.redirect == REDIRECTION.YES and threadData.lastRedirectURL and threadData.lastRedirectURL[0] == threadData.lastRequestUID:
            if (threadData.lastRedirectURL[1] or "").startswith("https://") and conf.hostname in getUnicode(threadData.lastRedirectURL[1]):
                conf.url = re.sub(r"https?://", "https://", conf.url)
                match = re.search(r":(\d+)", threadData.lastRedirectURL[1])
                port = match.group(1) if match else 443
                conf.url = re.sub(r":\d+(/|\Z)", r":%s\g<1>" % port, conf.url)

View on GitHub (pinned to 0a35b20e39)