Skip to content

Error when running "docker compose --profile multi up -d" #454

@ajunx8

Description

@ajunx8

Error response from daemon: driver failed programming external connectivity on endpoint quickstart-tutorials-jenkins_controller-1 (99d73499cbeccad5211e1eb*******************bd3fb443b904dcddcab2a6): Bind for 0.0.0.0:8080 failed: port is already allocated


Purpose:
Trying to follow the tutorial "End-to-End Multibranch Pipeline Project Creation"
What I've done:
1. Followed the tutorial "Build a Node.js and React app with npm"
2. got up to the step where I run "docker compose --profile node up -d".
3. Everything worked fine.
*4. Tried to complete the tutorial "End-to-End Multibranch Pipeline Project Creation"
6. Ran "docker compose --profile multi up -d". Encountered Above error.
7. Proceed anyway onto step "Create your Multibranch Pipeline project". Ran into these warnings and had to wait. The status for the branches are in waiting for too long.

07:00:56 Jenkins-Imposed API Limiter: Current quota for Github API usage has 52 remaining (1 over budget). Next quota of 60 in 59 min. Sleeping for 5 min 5 sec.
07:00:56 Jenkins is attempting to evenly distribute GitHub API requests. To configure a different rate limiting strategy, such as having Jenkins restrict GitHub API requests only when near or above the GitHub rate limit, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
07:03:57 Jenkins-Imposed API Limiter: Still sleeping, now only 2 min 3 sec remaining.

What I've tried:
1. I've tried to remove everything from docker with "docker system prune" and other commands,
2. restart docker
3. update docker to latest version (from v4.23.0 to v4.32.0)
4. restart my machine (MacOS 14.4.1)
5. Delete and re-clone quickstart-tutorials repo

Notes:
1. "docker-ssh-jenkins-agent" Node is failing to start. These are the logs

SSHLauncher{host='desktop-jenkins_agent-1', port=22, credentialsId='jenkins-ssh-agent-private-key', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
[07/18/24 07:32:12] [SSH] Opening SSH connection to desktop-jenkins_agent-1:22.
desktop-jenkins_agent-1: Name or service not known
SSH Connection failed with IOException: "desktop-jenkins_agent-1: Name or service not known", retrying in 15 seconds. There are 10 more retries left.
desktop-jenkins_agent-1: Name or service not known
.
.
.
ERROR: Connection is not established!
java.lang.IllegalStateException: Connection is not established!
   at com.trilead.ssh2.Connection.getRemainingAuthMethods(Connection.java:989)
   at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.getRemainingAuthMethods(TrileadSSHPublicKeyAuthenticator.java:89)
   at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.canAuthenticate(TrileadSSHPublicKeyAuthenticator.java:81)
   at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
   at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
   at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
   at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Unknown Source)
   at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
   at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
   at java.base/java.util.stream.ReferencePipeline.findFirst(Unknown Source)
   at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:222)
   at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:173)
   at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:882)
   at hudson.plugins.sshslaves.SSHLauncher.lambda$launch$0(SSHLauncher.java:441)
   at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.base/java.lang.Thread.run(Unknown Source)
[07/18/24 07:34:57] Launch failed - cleaning up connection
[07/18/24 07:34:57] [SSH] Connection closed.
  1. Checking quickstart-tutorials-jenkins_controller-1 on docker container Logs
WARNING h.plugins.sshslaves.SSHLauncher#launch: SSH Launch of docker-ssh-jenkins-agent on desktop-jenkins_agent-1 failed in 165,116 ms
INFO    hudson.slaves.SlaveComputer#tryReconnect: Attempting to reconnect docker-ssh-jenkins-agent
3. Docker Compose version v2.28.1-desktop.1
4. Docker Client: Version:  27.0.3

Side-note:
*Among this step, you need to create "development" and "production" branches, however "git checkout development" returns errors saying development does not exist. I presume it should be "git checkout -b development". Same for production.

Please help, I want to complete this tutorial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions