liux0614 / yolo_nano

Unofficial implementation of yolo nano
MIT License
254 stars 72 forks source link

Connection refused error #20

Closed henry2304 closed 4 years ago

henry2304 commented 4 years ago

Hi liux0614, thanks for sharing this code. When I was trying it out with the suggested training command, I seem to be getting the following message below printed repeatedly to the error logs. Do you know what the cause might be, or if it causes any issues? Thanks for any advice!

python3 main.py --dataset_path datasets/coco/images --annotation_path datasets/coco/annotations/ --dataset coco --lr 0.0001 --conf_thres 0.8 --nms_thres 0.5 2> error.log 1> output.log &

error.log: WARNING:root:Setting up a new session... Traceback (most recent call last): File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/connec tion.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/util/c onnection.py", line 84, in create_connection raise err File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/util/c onnection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/connec tionpool.py", line 672, in urlopen chunked=chunked, File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/connec tionpool.py", line 387, in _make_request conn.request(method, url, **httplib_request_kw) File "/home/henry/anaconda3/lib/python3.7/http/client.py", line 1244, in req uest self._send_request(method, url, body, headers, encode_chunked) File "/home/henry/anaconda3/lib/python3.7/http/client.py", line 1290, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/henry/anaconda3/lib/python3.7/http/client.py", line 1239, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/henry/anaconda3/lib/python3.7/http/client.py", line 1026, in _send_output self.send(msg) File "/home/henry/anaconda3/lib/python3.7/http/client.py", line 966, in send self.connect() File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/connection.py", line 184, in connect conn = self._new_conn() File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fdd6c5dd110>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fdd6c5dd110>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/visdom/init.py", line 548, in _send data=json.dumps(msg), File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/requests/sessions.py", line 581, in post return self.request('POST', url, data=data, json=json, kwargs) File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/home/henry/yolo_nano/ynano/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fdd6c5dd110>: Failed to establish a new connection: [Errno 111] Connection refused')) ERROR:visdom:[Errno 111] Connection refused

Repeats...

liux0614 commented 4 years ago

You should first open a visdom server via command: python3 -m visdom.server

henry2304 commented 4 years ago

Ah, good to know. Thanks for the pointer!