lyft / lyft/python-blessclient
Cannot refresh public IP randomly
Đang mở
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 117
- Fork
- 31
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với blessclient/user_ip.py, đặc biệt là getIP, _refreshIP và _fetchIP, sau đó lần theo lời gọi từ blessclient/client.py. Tái hiện timeout khi cold-run bằng hai public-IP endpoint được liệt kê và xác minh rằng lần chạy đầu tiên hoàn tất mà không phát sinh "Could not refresh public IP".
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- networking
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100