Open ajunx8 opened 2 months ago
Hello @ajunx8,
Thank you for taking the time to create this issue. We greatly appreciate your feedback as it helps us improve our documentation and user experience.
It appears that some instructions may be missing at the end of the tutorial. Let's try a potential solution together. If this resolves your problem, we will update the documentation accordingly.
Before starting the next tutorial, please try running the following command:
docker compose --profile node down -v --remove-orphans
This command will:
We appreciate your patience and collaboration in improving our documentation. Your input is invaluable in making our tutorials more comprehensive and user-friendly.
If you have any questions or need further assistance, please don't hesitate to ask. We're here to help!
After running docker compose --profile node down -v --remove-orphans
and then docker compose --profile multi up -d
I still get the following error:
Error response from daemon: driver failed programming external connectivity on endpoint quickstart-tutorials-jenkins_controller-1 (76e17cd7cdb7db82e508ac733ef254a534b67fce7a25ccaa6553673ec27df9af): Bind for 0.0.0.0:8080 failed: port is already allocated
I enter into localhost:8080
and check the Dashboard > Nodes > docker-ssh-jenkins-agent > Logs and I still get the error:
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.
The down
command should have resolved the issue. However, if you still have a Jenkins controller running on port 8080
after executing the command, you'll need to terminate it using an alternative method.
If you're using Docker Desktop:
quickstart-tutorials
containerTo terminate the container via command line, follow these steps:
docker container ls
docker container ls | grep 8080
docker container ls --format "{{.ID}}\t{{.Ports}}" | grep "0.0.0.0:8080->8080" | cut -f1
docker kill $(docker container ls --format "{{.ID}}\t{{.Ports}}" | grep "0.0.0.0:8080->8080" | cut -f1)
These steps should help you remove any lingering Jenkins controller instances and free up port 8080
for future use.
Note: Always exercise caution when using docker kill
commands, especially in production environments.
The issue still persists after spinning it up, then stopping the container through Option 2,
➜ quickstart-tutorials git:(main) docker compose --profile multi up -d
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
[+] Running 30/30
✔ jenkins_controller Pulled 99.6s
✔ multi Pulled 43.0s
✔ 0f60e68dd20d Pull complete 1.3s
✔ a150a8f13603 Pull complete 30.6s
✔ acb61341d8dc Pull complete 30.6s
✔ 4f4fb700ef54 Pull complete 30.6s
✔ cd1a8d2724be Pull complete 31.0s
✔ 7367d34ba553 Pull complete 31.0s
✔ a2c17bc2b693 Pull complete 31.0s
✔ 8ebd94f84d79 Pull complete 39.9s
✔ 90349a2dd1b3 Pull complete 39.9s
✔ multi_jenkins_controller Pulled 99.6s
✔ 0bd1f8180c50 Already exists 0.0s
✔ 96b9209c146a Pull complete 70.5s
✔ 49d1d8c27bba Pull complete 70.6s
✔ 1b67e54696be Pull complete 70.6s
✔ d9b94d3f6c5c Pull complete 70.6s
✔ acdba9b30e9f Pull complete 84.7s
✔ 04e27316302b Pull complete 84.7s
✔ 0b5ed25beb7c Pull complete 84.7s
✔ b360fb53fcb2 Pull complete 85.1s
✔ 9a87b452193f Pull complete 85.1s
✔ 2cf9f9e2b657 Pull complete 85.1s
✔ f3cbb9e7358f Pull complete 85.1s
✔ e69dbe66420f Pull complete 85.1s
✔ ab7a3c7cedb6 Pull complete 85.1s
✔ 0048d08a0797 Pull complete 85.1s
✔ ed3c166a52fa Pull complete 85.1s
✔ ca9c5ec0c5d8 Pull complete 96.6s
✔ a4e5574c9d3d Pull complete 96.6s
[+] Running 5/6
✔ Network quickstart-tutorials_default Created 0.0s
✔ Container quickstart-tutorials-sidekick_service-1 Exited 1.2s
⠸ Container quickstart-tutorials-multi_jenkins_controller-1 Starting 1.1s
✔ Container quickstart-tutorials-discovery_and_jcasc_modifier-1 Started 1.1s
✔ Container quickstart-tutorials-jenkins_controller-1 Started 1.1s
✔ Container desktop-jenkins_agent-1-multi Created 0.1s
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:8080 -> 0.0.0.0:0: listen tcp 0.0.0.0:8080: bind: address already in use
➜ quickstart-tutorials git:(main) docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48db9925f7a0 ghcr.io/jenkins-docs/quickstart-tutorials/jenkinsci-tutorials:agent_discovery_ "sh -c /usr/local/bi…" About a minute ago Up About a minute (health: starting) quickstart-tutorials-discovery_and_jcasc_modifier-1
bd934a10d6c4 ghcr.io/jenkins-docs/quickstart-tutorials/jenkinsci-tutorials:simple_controller_ "/usr/bin/tini -- /u…" About a minute ago Up About a minute (healthy) 0.0.0.0:8080->8080/tcp, 50000/tcp quickstart-tutorials-jenkins_controller-1
➜ quickstart-tutorials git:(main) docker container ls | grep 8080
bd934a10d6c4 ghcr.io/jenkins-docs/quickstart-tutorials/jenkinsci-tutorials:simple_controller_ "/usr/bin/tini -- /u…" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:8080->8080/tcp, 50000/tcp quickstart-tutorials-jenkins_controller-1
➜ quickstart-tutorials git:(main)
docker container ls --format "{{.ID}}\t{{.Ports}}" | grep "0.0.0.0:8080->8080" | cut -f1
bd934a10d6c4
➜ quickstart-tutorials git:(main) docker kill $(docker container ls --format "{{.ID}}\t{{.Ports}}" | grep "0.0.0.0:8080->8080" | cut -f1)
bd934a10d6c4
➜ quickstart-tutorials git:(main) docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48db9925f7a0 ghcr.io/jenkins-docs/quickstart-tutorials/jenkinsci-tutorials:agent_discovery_ "sh -c /usr/local/bi…" 4 minutes ago Up 4 minutes (health: starting) quickstart-tutorials-discovery_and_jcasc_modifier-1
➜ quickstart-tutorials git:(main) docker compose --profile multi up -d
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
[+] Running 3/4
✔ Container quickstart-tutorials-sidekick_service-1 Exited 0.6s
✔ Container quickstart-tutorials-discovery_and_jcasc_modifier-1 Running 0.0s
⠹ Container quickstart-tutorials-jenkins_controller-1 Starting 0.8s
✔ Container quickstart-tutorials-multi_jenkins_controller-1 Started 0.1s
Error response from daemon: driver failed programming external connectivity on endpoint quickstart-tutorials-jenkins_controller-1 (30f7e941244c4286b8dcf028917a90fb079662d08c0184bcf8a2179af169972f): Bind for 0.0.0.0:8080 failed: port is already allocated
➜ quickstart-tutorials git:(main) docker compose --profile multi down -v --remove-orphans
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
[+] Running 8/8
✔ Container quickstart-tutorials-discovery_and_jcasc_modifier-1 Removed 10.2s
✔ Container quickstart-tutorials-jenkins_controller-1 Removed 0.0s
✔ Container desktop-jenkins_agent-1-multi Removed 0.0s
✔ Container quickstart-tutorials-multi_jenkins_controller-1 Removed 0.2s
✔ Container quickstart-tutorials-sidekick_service-1 Removed 0.0s
✔ Volume agent-ssh-dir Removed 0.0s
✔ Volume quickstart-tutorials_jenkins_home Removed 0.0s
✔ Network quickstart-tutorials_default Removed 0.1s
➜ quickstart-tutorials git:(main) docker compose --profile multi up -d
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
WARN[0000] The "GITPOD_WORKSPACE_URL" variable is not set. Defaulting to a blank string.
[+] Running 7/8
✔ Network quickstart-tutorials_default Created 0.0s
✔ Volume "agent-ssh-dir" Created 0.0s
✔ Volume "quickstart-tutorials_jenkins_home" Created 0.0s
✔ Container quickstart-tutorials-sidekick_service-1 Exited 0.7s
✔ Container quickstart-tutorials-jenkins_controller-1 Started 0.8s
✔ Container quickstart-tutorials-discovery_and_jcasc_modifier-1 Started 0.8s
⠸ Container quickstart-tutorials-multi_jenkins_controller-1 Starting 0.8s
✔ Container desktop-jenkins_agent-1-multi Created 0.0s
Error response from daemon: driver failed programming external connectivity on endpoint quickstart-tutorials-multi_jenkins_controller-1 (eee9b4ecf3523778029437c1a3bac432f73765d39d2753ad4aa60167ce2b8f9a): Bind for 0.0.0.0:8080 failed: port is already allocated
➜ quickstart-tutorials git:(main) lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
firefox 859 adriangreksa 126u IPv4 0xcdbcbb0292e895a9 0t0 TCP localhost:55523->localhost:http-alt (ESTABLISHED)
firefox 859 adriangreksa 168u IPv4 0xcdbcbb02907ce129 0t0 TCP localhost:55525->localhost:http-alt (ESTABLISHED)
com.docke 2194 adriangreksa 51u IPv6 0xcdbcbaef61ea16d9 0t0 TCP localhost:http-alt->localhost:55523 (ESTABLISHED)
com.docke 2194 adriangreksa 58u IPv6 0xcdbcbaef61e9b6d9 0t0 TCP localhost:http-alt->localhost:55525 (ESTABLISHED)
com.docke 2194 adriangreksa 110u IPv6 0xcdbcbaef61e9a6d9 0t0 TCP *:http-alt (LISTEN)
Tried to start the tutorial anyway, but got up to the "Create your Multibranch Pipeline project" step 9. Dashboard > Building a Multibranch Pipeline Project > master > #.1 > Console Output
Branch indexing
05:29:30 Connecting to https://api.github.com/ with no credentials, anonymous access
Obtained Jenkinsfile from e9ed5b1a67fd903ce791ac59bf1b87899c8852d5
[Pipeline] Start of Pipeline
[Pipeline] node
Still waiting to schedule task
‘[docker-ssh-jenkins-agent](http://localhost:8080/computer/docker%2Dssh%2Djenkins%2Dagent/)’ is offline
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:
What I've tried:
Notes:
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.