sqlmapproject/sqlmap · error · SqlmapConnectionException
unable to connect to the target URL
Error message
unable to connect to the target URL
What it means
SqlmapConnectionException raised from Connect._getPageProxy after repeated failed attempts to reach the target URL - the HTTP request could not be completed at all (unreachable host, blocked connection, or transport failure).
Solutions
- Verify the target URL is correct and reachable (curl/browser)
- Check proxy settings (--proxy, --proxy-cred)
- Disable VPN/firewall interference or try a different network
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at lib/request/connect.py:168 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/e78867bdfd15088a.
Report an issue: GitHub.
Appendix: source
Thrown at lib/request/connect.py:168
from lib.utils.sqllint import checkSanity
from thirdparty import six
from collections import OrderedDict
from thirdparty.six import unichr as _unichr
from thirdparty.six.moves import http_client as _http_client
from thirdparty.six.moves import urllib as _urllib
from thirdparty.socks.socks import ProxyError
class Connect(object):
"""
This class defines methods used to perform HTTP requests
"""
@staticmethod
def _getPageProxy(**kwargs):
try:
if (len(inspect.stack()) > sys.getrecursionlimit() // 2): # Note: https://github.com/sqlmapproject/sqlmap/issues/4525
warnMsg = "unable to connect to the target URL"
raise SqlmapConnectionException(warnMsg)
except (TypeError, UnicodeError):
pass
try:
return Connect.getPage(**kwargs)
except RuntimeError:
return None, None, None
@staticmethod
def _retryProxy(**kwargs):
threadData = getCurrentThreadData()
threadData.retriesCount += 1
if conf.proxyList and threadData.retriesCount >= conf.retries and not kb.locks.handlers.locked():
warnMsg = "changing proxy"
logger.warning(warnMsg)
conf.proxy = NoneView on GitHub (pinned to 0a35b20e39)