Skip to content

Cannot refresh public IP randomly #30

@myoung34

Description

@myoung34

On occasion, on the first cold run:

DEBUG:root:Cache get disabled                                                                                       
DEBUG:root:Cache get disabled                                                                                                    
DEBUG:root:Getting current public IP                                                                                                                                                                                                          DEBUG:root:Could not refresh public IP from http://api.ipify.org                                                                                                                                                                              Traceback (most recent call last):                                                                                                                                                                                                              File "/home/marc/.blessclient/blessclient/user_ip.py", line 53, in _fetchIP                                                                                                                                                    
    with contextlib.closing(urlopen(url, timeout=2)) as f:                                                                                                                                                                                      File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 154, in urlopen                                                                                                                                                         return opener.open(url, data, timeout)                                                                                                                                                                                                      File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 429, in open                                                                                                                                                            response = self._open(req, data)                                                                                                                                                                                                            File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 447, in _open                                                                                                                                        
    '_open', req)                                                                                                                                                                                                                               File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 407, in _call_chain                                                                                                                                                     result = func(*args)                                                                                                                                                     
  File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1228, in http_open                                                                                                                                                      return self.do_open(httplib.HTTPConnection, req)                                                                                                                                                                                            File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1201, in do_open                                                                                                                                                        r = h.getresponse(buffering=True)                                                                                                                                                                                                           File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 1136, in getresponse                                                                                                                                                    response.begin()                                                                                                                                                                                                                            File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 453, in begin                                                                                                                                                           version, status, reason = self._read_status()                                                                                                                                                                                               File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 409, in _read_status                                           
    line = self.fp.readline(_MAXLINE + 1)                                                                                                                                  
  File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/socket.py", line 480, in readline                                                                                                                                                         data = self._sock.recv(self._rbufsize)                                                                                                                                                                                                    timeout: timed out                                                                                                               
DEBUG:root:Could not refresh public IP from http://canihazip.com
Traceback (most recent call last):                                                                                  
  File "/home/marc/.blessclient/blessclient/user_ip.py", line 53, in _fetchIP                                                    
    with contextlib.closing(urlopen(url, timeout=2)) as f:                                                                                                                                                                                      File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 154, in urlopen                                                                                                                                                         return opener.open(url, data, timeout)                                                                                                                                                                                                      File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 429, in open                                                                                                                                           
    response = self._open(req, data)                                                                                                                                                                                                            File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 447, in _open                                                                                                                                                           '_open', req)                                                                                                                                                                                                                               File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 407, in _call_chain                                                                                                                                                     result = func(*args)                                                                                                                                                                                                                        File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1228, in http_open                                                                                                                                   
    return self.do_open(httplib.HTTPConnection, req)                                                                                                                                                                                            File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/urllib2.py", line 1201, in do_open                                                                                                                                                        r = h.getresponse(buffering=True)                                                                                                                                        
  File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 1136, in getresponse                                                                                                                                                    response.begin()                                                                                                                                                                                                                            File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 453, in begin                                                                                                                                                           version, status, reason = self._read_status()                                                                                                                                                                                               File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/httplib.py", line 409, in _read_status                                                                                                                                                    line = self.fp.readline(_MAXLINE + 1)                                                                                                                                                                                                     
  File "/home/marc/.pyenv/versions/2.7.12/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out
Traceback (most recent call last):
  File "/home/marc/.blessclient/blessclient.run", line 11, in <module>
    load_entry_point('blessclient', 'console_scripts', 'blessclient')()
  File "/home/marc/.blessclient/blessclient/client.py", line 643, in main
    bless(region, args.nocache, args.gui, args.host, bless_config)
  File "/home/marc/.blessclient/blessclient/client.py", line 547, in bless
    my_ip = userIP.getIP()
  File "/home/marc/.blessclient/blessclient/user_ip.py", line 29, in getIP
    self._refreshIP()
  File "/home/marc/.blessclient/blessclient/user_ip.py", line 43, in _refreshIP
    raise Exception('Could not refresh public IP')
Exception: Could not refresh public IP

Immediately re-running this works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions