Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionError: HTTPSConnectionPool(host='ipfs.infura.io', port=5001): Max retries exceeded with url: /api/v0/cat/QmXxkBASF92QvFFwChwZAECSRsjoMstMHJ2A9bwXuchXbA (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6791 #932

Closed
mbeacom opened this issue Apr 21, 2018 · 9 comments
Labels
backend This needs backend expertise.

Comments

@mbeacom
Copy link
Contributor

mbeacom commented Apr 21, 2018

View details in Rollbar: https://rollbar.com/gitcoin/gitcoin/items/826/

Traceback (most recent call last):
  File "/home/ubuntu/gitcoin/coin/app/dashboard/management/commands/sync_geth.py", line 61, in handle
    bounty = get_bounty(bounty_enum, network)
  File "/home/ubuntu/gitcoin/coin/app/dashboard/utils.py", line 197, in get_bounty
    bounty_data_str = ipfs_cat(bountydata)
  File "/home/ubuntu/gitcoin/coin/app/dashboard/utils.py", line 126, in ipfs_cat
    response = ipfs_cat_requests(key)
  File "/home/ubuntu/gitcoin/coin/app/dashboard/utils.py", line 144, in ipfs_cat_requests
    response = requests.get(url)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='ipfs.infura.io', port=5001): Max retries exceeded with url: /api/v0/cat/Qmd2zZ2P6HTeYszZXQvR44haPhy4paDopPgrkJfoVPExXq (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6790512da0>: Failed to establish a new connection: [Errno 111] Connection refused',))Traceback (most recent call last):
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
MaxRetryError: HTTPSConnectionPool(host='ipfs.infura.io', port=5001): Max retries exceeded with url: /api/v0/cat/Qmd2zZ2P6HTeYszZXQvR44haPhy4paDopPgrkJfoVPExXq (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6790512da0>: Failed to establish a new connection: [Errno 111] Connection refused',))Traceback (most recent call last):
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f6790512da0>: Failed to establish a new connection: [Errno 111] Connection refusedTraceback (most recent call last):
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/home/ubuntu/gitcoin/gitcoin-3/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
@mbeacom mbeacom added backend This needs backend expertise. rollbar labels Apr 21, 2018
@mbeacom mbeacom closed this as completed Apr 23, 2018
@Skyge
Copy link
Contributor

Skyge commented May 6, 2019

@mbeacom I meet a similar question now, so I come here for some tips, but I can not view that website, Access not allowed.

@owocki
Copy link
Contributor

owocki commented May 6, 2019

hey @Skyge heads up Mark left the team. Ill reopen this for you now tho

@owocki owocki reopened this May 6, 2019
@Skyge
Copy link
Contributor

Skyge commented May 7, 2019

@owocki OK, thanks for your help.

@Skyge
Copy link
Contributor

Skyge commented May 7, 2019

I am trying run commond

docker-compose exec web python3 app/manage.py sync_geth rinkeby -20 99999999999

to import data, but it throws out an error:
ipfsapi.exceptions.ConnectionError: ConnectionError: HTTPSConnectionPool(host='ipfs.infura.io', port=5001): Max retries exceeded with url: /api/v0/version?stream-channels=true (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff11f9b2860>: Failed to establish a new connection: [Errno 111] Connection refused'))

@Skyge
Copy link
Contributor

Skyge commented May 7, 2019

I use the newest version: e5525f1(05/04)

@Skyge
Copy link
Contributor

Skyge commented May 7, 2019

@owocki I really need to quickly solve this problem, so any idea?

@Skyge
Copy link
Contributor

Skyge commented May 10, 2019

Thanks for @SaptakS advice, there are some cases for this phenomenon:

this seems like a problem with the infura server being down
it's not a problem with the codebase
it's either your internet connection is weak so there is some gateway timeout 
(which can be fixed by trying it sometime later)
or ipfs server of infura was down
or some bad ssl in your terminal side
or try a different network without proxy
or  have https_proxy set in environment: 
    like export https_proxy=<proxy_address>:<proxy:port>

try rebuilding the code.
by doing `docker-compose down` and then `docker-compose up --build`

@Skyge
Copy link
Contributor

Skyge commented May 10, 2019

@owocki Although I have not solved it yet, you can close this issue now, maybe this only happens on my PC. Thanks!

@Skyge
Copy link
Contributor

Skyge commented May 11, 2019

@owocki ,I have solved this problem, I update the newest code 2bdfa63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This needs backend expertise.
Projects
None yet
Development

No branches or pull requests

4 participants