I inserted diagnostic print messages into my bashrc at almost every line so that I could tell exactly which line was causing the problem. It was a coarse technique that helped me quickly detect the problem commands
On Fri, Dec 21, 2018 at 12:37 PM Philippe M. <[email protected]> wrote: > Thanks, > That's what I started to do , but how to find all of them ? > Do you have a tip ? > > Thanks > > On Friday, December 21, 2018 at 6:12:50 PM UTC+1, Mark Waite wrote: >> >> You'll need to remove the entries in the '.profile' and/or '.bashrc' that >> are doing things which are not allowed in a non-interactive shell. Either >> that, or wrap them in conditionals which prevent them from being executed >> in a non-interactive shell. >> >> Mark Waite >> >> On Friday, December 21, 2018 at 9:20:26 AM UTC-7, Philippe M. wrote: >>> >>> Hello, >>> >>> We are facing an issue using Jenkins 2.138.3 and connecting to certain >>> machines (issue occurs with machines in redhat 7.2, not in 6.4 but not >>> sure it's related). >>> >>> When we start the agent, we get this error, issue being that ssh gives >>> "stdin: >>> is not a tty" >>> >>> Full Jenkins log: >>> >>> SSHLauncher{host='XXX.XXX.X.XXX', port=22, >>> credentialsId='XXXXXXXXXXXXXXXXXXX', jvmOptions='', javaPath='', >>> prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, >>> maxNumRetries=10, retryWaitTime=15, >>> sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy, >>> tcpNoDelay=true, trackCredentials=true} >>> >>> [12/21/18 16:41:19] [SSH] Opening SSH connection to XXX.XXX.X.XXX:22. >>> >>> [12/21/18 16:41:19] [SSH] SSH host key matches key in Known Hosts file. >>> Connection will be allowed. >>> >>> [12/21/18 16:41:19] [SSH] Authentication successful. >>> >>> SSH connection reports a garbage before a command execution. >>> >>> Check your .bashrc, .profile, and so on to make sure it is quiet. >>> >>> The received junk text is as follows: >>> >>> stdin: is not a tty >>> >>> >>> >>> null >>> >>> [12/21/18 16:41:20] Launch failed - cleaning up connection >>> [12/21/18 16:41:20] [SSH] Connection closed. >>> >>> >>> How can this be fixed, searching for similar issues, I see fixes related >>> to sudoers but we are not sudoing here. >>> I also found issue could be triggered by Banner , but there is no banner >>> either. >>> >>> Note that if we try non interactive mode, we have this which explains >>> the issue faced by Jenkins I guess: >>> >>> ssh -T login@host: >>> stty: standard input: Inappropriate ioctl for device >>> stdin: is not a tty >>> stdin: is not a tty >>> stdin: is not a tty >>> >>> >>> I tried to disable in /etc/profile stty if in non interactive mode, it >>> fixed : >>> >>> stty: standard input: Inappropriate ioctl for device >>> >>> So I now have: >>> >>> ssh -T login@host: >>> stdin: is not a tty >>> stdin: is not a tty >>> stdin: is not a tty >>> >>> But I am stuck here. >>> >>> Thanks in advance for your help. >>> Regards >>> >>> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/1e6f8395-c7c3-4151-ade6-1efeef217aff%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/1e6f8395-c7c3-4151-ade6-1efeef217aff%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thanks! Mark Waite -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHARZzzD3A%3DD24mdQ_vGgUvTMNwU6fNN%2B5a11YkY6fdqw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
