question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Retries in ConnectionCheckSSH

See original GitHub issue

In the execute method of ConnectionCheckSSH, there is a line of code as follow:

final int retries = Math.min(0, parent.retries);

That causes the number of retries to be always 0 (unless the parent.retries is negative). The result is that when the plugin starts a Docker container and then attempts to connect to it, the error “java.io.IOException: SSH service hadn’t started after 0 seconds.” will often be encountered.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
pjdartoncommented, Oct 1, 2019

“oops” Yes, that looks like a bit of an oversight on my part. …and that code had no a faulty unit-test so this one slipped through.

I’ll fix it.

1reaction
pjdartoncommented, Oct 1, 2019

OK, thanks for confirming the fix. I’ve merged the code changes into master and this will be fixed in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PortUtils.ConnectionCheckSSH (Docker plugin 1.2.10 API)
Tests the SSH connection. If the parent PortUtils.ConnectionCheck.withRetries(int) was set to more than zero then more than one attempt will be made, ...
Read more >
PortUtils.java example - Javatips.net
getPort()); } public static class ConnectionCheck { private final String host; private final int port; private int retries = 10; private long retryDelay ......
Read more >
hudson.slaves.ComputerLauncher Java Examples
ConnectionCheckSSH connectionCheckSSH = connectionCheck. ... + "Try increasing the number of retries (currently " + maxNumRetriesOrNull + ") and/or the ...
Read more >
jenkinsci - Bountysource
If Jenkins fails to launch a container say due to a SSH error, it'll keep retrying until it exhausts the container cap value....
Read more >
Index (Docker plugin 1.2.9 API) - Jenkins Javadoc
ConnectionCheckSSH - Class in com.nirima.jenkins.plugins.docker.utils ... Sets the number of retries, such that PortUtils.ConnectionCheck.execute() will try ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found