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

"Connection reset by peer" in sync after long wait #12

Open
centerorbit opened this issue Jan 7, 2014 · 1 comment
Open

"Connection reset by peer" in sync after long wait #12

centerorbit opened this issue Jan 7, 2014 · 1 comment

Comments

@centerorbit
Copy link
Contributor

Do any of you get this after having it not sync for awhile?

[andy@pion.pozitronic.com] Executing task 'remote_has_modified_files'
No handlers could be found for logger "paramiko.transport"
sync failed.
<class 'socket.error'>
(54, 'Connection reset by peer')
[Errno 54] Connection reset by peer
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 73, in run
loop(self)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 218, in __call

self.callback(event)
File "/usr/bin/git_sync", line 391, in callback
if run_remote_has_modified_files():
File "/usr/bin/git_sync", line 333, in run_remote_has_modified_files
remote_path=remote_path
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/tasks.py", line 368, in execute
multiprocessing
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/tasks.py", line 264, in _execute
return task.run(_args, *_kwargs)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/tasks.py", line 171, in run
return self.wrapped(_args, *_kwargs)
File "/usr/bin/git_sync", line 91, in remote_has_modified_files
git_status_output = run("git status --porcelain .")
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/network.py", line 578, in host_prompting_wrapper
return func(_args, *_kwargs)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/operations.py", line 1042, in run
shell_escape=shell_escape)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/operations.py", line 909, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/state.py", line 388, in default_channel
chan = _open_session()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/state.py", line 380, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/transport.py", line 662, in open_session
return self.open_channel('session')
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/transport.py", line 764, in open_channel
raise e
error: [Errno 54] Connection reset by peer

@jachin
Copy link
Owner

jachin commented Jan 9, 2014

Yeah, what I think we should do is keep track of how long it's been since we connected last, (or maybe there an easy way to check if your connection has timed out). And if it been "too long" (whatever that ends up being) restart the SSH connection.

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