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

How to set retries and timeouts using SSHByPassword #44

Open
mherb63 opened this issue Feb 24, 2016 · 8 comments
Open

How to set retries and timeouts using SSHByPassword #44

mherb63 opened this issue Feb 24, 2016 · 8 comments

Comments

@mherb63
Copy link

mherb63 commented Feb 24, 2016

Thank you for this concise tool, but how do I override these:

   @RetryOnFailure(
        attempts = Tv.SEVEN,
        delay = 1,
        unit = TimeUnit.MINUTES,
        verbose = false,
        randomize = true,
        types = IOException.class
    )
@mherb63
Copy link
Author

mherb63 commented Feb 28, 2016

I would like to request that timeouts and retries be configurable

@dmarkov
Copy link

dmarkov commented Mar 4, 2016

@yegor256 please take a look at it and dispatch (see par.21)

@yegor256
Copy link
Member

yegor256 commented Mar 5, 2016

@mherb63 where did you get it? where this code is taken from? you're expecting us to guess? :)

@mherb63
Copy link
Author

mherb63 commented Mar 5, 2016

Its from your SSHByPassword class

public final class SSHByPassword extends AbstractSSHShell {
    /**
     * User password.
     */
    private final transient String password;
    /**
     * Constructor.
     * @param adr IP address
     * @param prt Port of server
     * @param user Login
     * @param passwd Password
     * @throws UnknownHostException If fails
     * @checkstyle ParameterNumberCheck (6 lines)
     */
    public SSHByPassword(final String adr, final int prt,
                    final String user, final String passwd)
        throws UnknownHostException {
        super(adr, prt, user);
        this.password = passwd;
    }
    // @checkstyle ProtectedMethodInFinalClassCheck (10 lines)
    @Override
    @RetryOnFailure(
        attempts = Tv.SEVEN,
        delay = 1,
        unit = TimeUnit.MINUTES,
        verbose = false,
        randomize = true,
        types = IOException.class
    )
    protected Session session() throws IOException {
  

@antonevane
Copy link

Probably related discussion: https://disqus.com/by/disqus_fvTXDMDM14/

@mherb63
Copy link
Author

mherb63 commented Mar 17, 2016

yes, I posted that. I'm just looking to control the timeouts:

  1. Connection Timeout
  2. Excec Timeout

@mherb63
Copy link
Author

mherb63 commented Apr 6, 2016

Guess this one is dead...oh well. Its been a month.

@Cyb0rk
Copy link

Cyb0rk commented Nov 16, 2019

A feature to define a timeout would be great.

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

5 participants