reproman icon indicating copy to clipboard operation
reproman copied to clipboard

ssh session exit results in UnexpectedExit: Encountered a bad command exit code!

Open yarikoptic opened this issue 6 years ago • 2 comments

I feel like we had encountered/discussed it before, but search here returned nothing, so decided to record:

--dbg just to get a full trace.

$> niceman --dbg login sm
I: New layout of history files also found.
   Please remove/propagate old history into new

#1 !263 [0].....................................:Mon Nov 05 23:44:09:.
smaug:~
$> exit
Traceback (most recent call last):
  File "/home/yoh/proj/repronim/niceman/venvs/dev/bin/niceman", line 11, in <module>
    load_entry_point('niceman', 'console_scripts', 'niceman')()
  File "/home/yoh/proj/repronim/niceman/niceman/cmdline/main.py", line 251, in main
    ret = cmdlineargs.func(cmdlineargs)
  File "/home/yoh/proj/repronim/niceman/niceman/interface/base.py", line 288, in call_from_parser
    return cls.__call__(**kwargs)
  File "/home/yoh/proj/repronim/niceman/niceman/interface/login.py", line 45, in __call__
    with env_resource.get_session(pty=True):
  File "/home/yoh/proj/repronim/niceman/niceman/resource/session.py", line 51, in __enter__
    self.open()
  File "/home/yoh/proj/repronim/niceman/niceman/resource/ssh.py", line 180, in open
    self.interactive_shell()
  File "/home/yoh/proj/repronim/niceman/niceman/resource/ssh.py", line 190, in interactive_shell
    self.connection.run('/bin/bash', pty=True)
  File "<decorator-gen-3>", line 2, in run
  File "/home/yoh/proj/repronim/niceman/venvs/dev/local/lib/python2.7/site-packages/fabric/connection.py", line 30, in opens
    return method(self, *args, **kwargs)
  File "/home/yoh/proj/repronim/niceman/venvs/dev/local/lib/python2.7/site-packages/fabric/connection.py", line 628, in run
    return self._run(self._remote_runner(), command, **kwargs)
  File "/home/yoh/proj/repronim/niceman/venvs/dev/local/lib/python2.7/site-packages/invoke/context.py", line 101, in _run
    return runner.run(command, **kwargs)
  File "/home/yoh/proj/repronim/niceman/venvs/dev/local/lib/python2.7/site-packages/invoke/runners.py", line 271, in run
    return self._run_body(command, **kwargs)
  File "/home/yoh/proj/repronim/niceman/venvs/dev/local/lib/python2.7/site-packages/invoke/runners.py", line 404, in _run_body
    raise UnexpectedExit(result)
UnexpectedExit: Encountered a bad command exit code!

Command: '/bin/bash'

Exit code: 1

Stdout: already printed

Stderr: n/a (PTYs have no stderr)


()
> /home/yoh/proj/repronim/niceman/venvs/dev/local/lib/python2.7/site-packages/invoke/runners.py(404)_run_body()
-> raise UnexpectedExit(result)
(Pdb) 

yarikoptic avatar Nov 06 '18 04:11 yarikoptic

I've tried the niceman login <smaug> then exit dance a few times and haven't had any luck triggering this.

kyleam avatar Nov 13 '18 14:11 kyleam

I guess it is then special me... more specifically "me on remote", since me login in to smaug as test user also doesn't trigger it. Nevermind then - I will need to troubleshoot it myself, reassigning to myself

yarikoptic avatar Nov 13 '18 16:11 yarikoptic