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

During handling of the above exception, another exception occurred: #11

Open
ghost opened this issue Oct 28, 2018 · 8 comments
Open

During handling of the above exception, another exception occurred: #11

ghost opened this issue Oct 28, 2018 · 8 comments

Comments

@ghost
Copy link

ghost commented Oct 28, 2018

Exception in user code:

epoch: [0/500], iter: [144/312], loss: [4.8416]
Exception in user code:

Traceback (most recent call last):
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, 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/public/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/home/public/anaconda3/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/public/anaconda3/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/public/anaconda3/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/public/anaconda3/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/home/public/anaconda3/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fb5b818dcf8>: 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/public/anaconda3/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/public/anaconda3/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb5b818dcf8>: 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/public/anaconda3/lib/python3.6/site-packages/visdom/init.py", line 446, in _send
data=json.dumps(msg),
File "/home/public/anaconda3/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/public/anaconda3/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/public/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/public/anaconda3/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/public/anaconda3/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb5b818dcf8>: Failed to establish a new connection: [Errno 111] Connection refused',))

how to solve it? thanks

@AceCoooool
Copy link
Owner

  1. I think it's caused by visdom. visdom=True, And "open it"(please see https://github.com/facebookresearch/visdom)
  2. Your PyTorch version is 0.4.1 (or preview version?)

@ghost
Copy link
Author

ghost commented Oct 29, 2018

my PyTorch version is 0.4.1

@DStickley
Copy link

I'm having the same issue, did you manage to fix it?

@AceCoooool
Copy link
Owner

@DStickley whould you mind to test it after close visdom? (visdom=False).

@DStickley
Copy link

DStickley commented Jan 8, 2019

Have done but still throws the same error, also I'm using pytorch 1.0.0 on cpu (a remote server) if that helps.

Edit: Tried with 0.4.1 and still no joy

@AceCoooool
Copy link
Owner

OK. Thank you @DStickley . I will test it in this week. (sorry not today or tomorrow 😄 )

@DStickley
Copy link

Thank you, I was just wondering it had been resolved already, I will keep trying in the meantime.
I also noticed that the above user got to iter: [144/312], when I try it shows iter: [0/312], not sure how relevant that is but it might help.

@AceCoooool
Copy link
Owner

@DStickley I did not meet this problem in my computer. Would you mind test after change num_threads to 1

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

No branches or pull requests

2 participants