jenkins web page not launching when run from docker

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

jenkins web page not launching when run from docker

Anil-2
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

slide
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVexdjpM37Tg1BObgROYmrnKB-_OXManWGDbmbggyWCyfA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Mark Waite-2
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVexdjpM37Tg1BObgROYmrnKB-_OXManWGDbmbggyWCyfA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFLKpfkSr%3DzYTgsmLFZeY0dpZ8Z9wd8usnieTZ6WQUrNg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Anil-2
In reply to this post by slide

In an ubuntu terminal (Windows 10 Home WSL2) I ran the provided code from the tutorial (Jenkins Essential Training):

I ran it under root

useradd jenkins -m 
docker run \
 -u jenkins \
 --rm \
 -d \
 -p 8080:8080 \
 -p 50000:50000 \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v /home/jenkins:/var/jenkins_home \
 jenkins/jenkins:lts 
cat /home/jenkins/secrets/initialAdminPassword

I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive?


On Tuesday, February 2, 2021 at 8:05:53 PM UTC-6 slide wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7b67ac94-64a0-4ff4-a1e2-a5febaf6b4d9n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Anil-2
In reply to this post by Mark Waite-2
In my reply above, I posted the command.
I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive correctly?

On Tuesday, February 2, 2021 at 9:21:45 PM UTC-6 Mark Waite wrote:
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c655c2d9-d827-460d-ae42-bfab467d4667n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Anil-2

The earlier instructions had:

Launching Jenkins can then be accomplished with a simple docker command
as the root user (copy/paste to your VM):

  sudo su -
  docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts


But I had already installed Docker.


root:~#   docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts
88bd4006e1fbef8faf2d0652f4d56dec12fd1206c24fb2d3c6fa7ee8a8a3008c
docker: Error response from daemon: driver failed programming external connectivity on endpoint jenkins (4cd8f8c2ee5d501f93f830f6932c383b5948ca77520f4ba3757f2dcf30e3d5d2): Bind for 0.0.0.0:50000 failed: port is already allocated.


On Wednesday, February 3, 2021 at 9:29:37 AM UTC-6 Anil wrote:
In my reply above, I posted the command.
I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive correctly?

On Tuesday, February 2, 2021 at 9:21:45 PM UTC-6 Mark Waite wrote:
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ea09b46a-8dde-4356-9b5f-9a34af04cb44n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Tej Singh Rana
Hello, Anil
Your previous docker command has created a container and that's using that 50000 port. Remove that container first then rerun docker command again.
To list the inactive container:
docker ps -a
To rm container:
docker rm <container-name>

Regards,

On Wed, Feb 3, 2021 at 11:39 PM Anil <[hidden email]> wrote:

The earlier instructions had:

Launching Jenkins can then be accomplished with a simple docker command
as the root user (copy/paste to your VM):

  sudo su -
  docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts


But I had already installed Docker.


root:~#   docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts
88bd4006e1fbef8faf2d0652f4d56dec12fd1206c24fb2d3c6fa7ee8a8a3008c
docker: Error response from daemon: driver failed programming external connectivity on endpoint jenkins (4cd8f8c2ee5d501f93f830f6932c383b5948ca77520f4ba3757f2dcf30e3d5d2): Bind for 0.0.0.0:50000 failed: port is already allocated.


On Wednesday, February 3, 2021 at 9:29:37 AM UTC-6 Anil wrote:
In my reply above, I posted the command.
I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive correctly?

On Tuesday, February 2, 2021 at 9:21:45 PM UTC-6 Mark Waite wrote:
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ea09b46a-8dde-4356-9b5f-9a34af04cb44n%40googlegroups.com.


--
---------------------
Tej Singh Rana

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADBoQToMYw_f1Yx%3D1J7aF3KeUdczDt9zqwspm-FeRYAz18icnA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Anil-2
In reply to this post by Anil-2
It started working. I don't know what fixed it but these are what I tried:

1) In Docker Desktop, reset all data to factory defaults
2) Created ubuntu root password and su - 
3) Turned off experimental Docker feature "cloud enabled".
4) I found the secret admin password in the Console in Docker desktop, not in the ubuntu shell.

Now I was able to go to localhost:8080 and enter the admin password.

thanks to all who replied!

On Wednesday, February 3, 2021 at 12:09:44 PM UTC-6 Anil wrote:

The earlier instructions had:

Launching Jenkins can then be accomplished with a simple docker command
as the root user (copy/paste to your VM):

  sudo su -
  docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts


But I had already installed Docker.


root:~#   docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts
88bd4006e1fbef8faf2d0652f4d56dec12fd1206c24fb2d3c6fa7ee8a8a3008c
docker: Error response from daemon: driver failed programming external connectivity on endpoint jenkins (4cd8f8c2ee5d501f93f830f6932c383b5948ca77520f4ba3757f2dcf30e3d5d2): Bind for 0.0.0.0:50000 failed: port is already allocated.


On Wednesday, February 3, 2021 at 9:29:37 AM UTC-6 Anil wrote:
In my reply above, I posted the command.
I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive correctly?

On Tuesday, February 2, 2021 at 9:21:45 PM UTC-6 Mark Waite wrote:
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/aac08384-f98c-4681-acf7-5b9c5373c45bn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Anil-2
In reply to this post by Tej Singh Rana
root:/home/jenkins# docker ps -a
CONTAINER ID   IMAGE                 COMMAND                  CREATED       STATUS       PORTS
                    NAMES
a0c268c14b94   jenkins/jenkins:lts   "/sbin/tini -- /usr/…"   4 hours ago   Up 4 hours   0.0.0.0:8080->8080/tcp, 0.0.0.0

The dashboard is launching, but things have started to fail.

This part of the command I ran before appears to have failed

-v /home/jenkins:/var/jenkins_home \

from

docker run \
 -u jenkins \
 --rm \
 -d \
 -p 8080:8080 \
 -p 50000:50000 \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v /home/jenkins:/var/jenkins_home \
 jenkins/jenkins:lts 

because when I try to run the script in the tutorial, it fails.

+ /home/jenkins/scripts/fibonacci.sh 5 /var/jenkins_home/workspace/script@tmp/durable-14129c06/script.sh: 1: /var/jenkins_home/workspace/script@tmp/durable-14129c06/script.sh: /home/jenkins/scripts/fibonacci.sh: not found

There is no /var/jenkins_home folder

jenkins:~$ cd /var
jenkins:/var$ ls
backups  cache  crash  lib  local  lock  log  mail  opt  run  snap  spool  tmp

Any suggestions appreciated...

On Wednesday, February 3, 2021 at 1:03:40 PM UTC-6 [hidden email] wrote:
Hello, Anil
Your previous docker command has created a container and that's using that 50000 port. Remove that container first then rerun docker command again.
To list the inactive container:
docker ps -a
To rm container:
docker rm <container-name>

Regards,

On Wed, Feb 3, 2021 at 11:39 PM Anil <[hidden email]> wrote:

The earlier instructions had:

Launching Jenkins can then be accomplished with a simple docker command
as the root user (copy/paste to your VM):

  sudo su -
  docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts


But I had already installed Docker.


root:~#   docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts
88bd4006e1fbef8faf2d0652f4d56dec12fd1206c24fb2d3c6fa7ee8a8a3008c
docker: Error response from daemon: driver failed programming external connectivity on endpoint jenkins (4cd8f8c2ee5d501f93f830f6932c383b5948ca77520f4ba3757f2dcf30e3d5d2): Bind for 0.0.0.0:50000 failed: port is already allocated.


On Wednesday, February 3, 2021 at 9:29:37 AM UTC-6 Anil wrote:
In my reply above, I posted the command.
I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive correctly?

On Tuesday, February 2, 2021 at 9:21:45 PM UTC-6 Mark Waite wrote:
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].

--
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 [hidden email].


--
---------------------
Tej Singh Rana

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e0670886-981f-4e11-ba64-fcb6adfd914en%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins web page not launching when run from docker

Anil-2
screenshot:

Capture.JPG

On Wednesday, February 3, 2021 at 3:31:35 PM UTC-6 Anil wrote:
root:/home/jenkins# docker ps -a
CONTAINER ID   IMAGE                 COMMAND                  CREATED       STATUS       PORTS
                    NAMES
a0c268c14b94   jenkins/jenkins:lts   "/sbin/tini -- /usr/…"   4 hours ago   Up 4 hours   0.0.0.0:8080->8080/tcp, 0.0.0.0

The dashboard is launching, but things have started to fail.

This part of the command I ran before appears to have failed

-v /home/jenkins:/var/jenkins_home \

from

docker run \
 -u jenkins \
 --rm \
 -d \
 -p 8080:8080 \
 -p 50000:50000 \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v /home/jenkins:/var/jenkins_home \
 jenkins/jenkins:lts 

because when I try to run the script in the tutorial, it fails.

+ /home/jenkins/scripts/fibonacci.sh 5 /var/jenkins_home/workspace/script@tmp/durable-14129c06/script.sh: 1: /var/jenkins_home/workspace/script@tmp/durable-14129c06/script.sh: /home/jenkins/scripts/fibonacci.sh: not found

There is no /var/jenkins_home folder

jenkins:~$ cd /var
jenkins:/var$ ls
backups  cache  crash  lib  local  lock  log  mail  opt  run  snap  spool  tmp

Any suggestions appreciated...

On Wednesday, February 3, 2021 at 1:03:40 PM UTC-6 [hidden email] wrote:
Hello, Anil
Your previous docker command has created a container and that's using that 50000 port. Remove that container first then rerun docker command again.
To list the inactive container:
docker ps -a
To rm container:
docker rm <container-name>

Regards,

On Wed, Feb 3, 2021 at 11:39 PM Anil <[hidden email]> wrote:

The earlier instructions had:

Launching Jenkins can then be accomplished with a simple docker command
as the root user (copy/paste to your VM):

  sudo su -
  docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts


But I had already installed Docker.


root:~#   docker run --name jenkins --rm -u root -d -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins:/var/jenkins_home jenkins/jenkins:lts
88bd4006e1fbef8faf2d0652f4d56dec12fd1206c24fb2d3c6fa7ee8a8a3008c
docker: Error response from daemon: driver failed programming external connectivity on endpoint jenkins (4cd8f8c2ee5d501f93f830f6932c383b5948ca77520f4ba3757f2dcf30e3d5d2): Bind for 0.0.0.0:50000 failed: port is already allocated.


On Wednesday, February 3, 2021 at 9:29:37 AM UTC-6 Anil wrote:
In my reply above, I posted the command.
I think it may have something to do with the filesystem.
When I cat /home/jenkins/secrets/initialAdminPassword
it cannot find the file.
Is there  something I should do to map the drive correctly?

On Tuesday, February 2, 2021 at 9:21:45 PM UTC-6 Mark Waite wrote:
I think you've mistakenly mapped port 8080 on the Windows computer to port 50000 in the running Docker container.  I see that output if I open http://localhost:50000 on a Docker container started by the Docker Desktop app on Windows 10 with port 50000 mapped to 500000.

You need to map port 8080 on the Windows computer to port 8080 in the running Docker container.

image.png

Interesting user interface choice of Docker Desktop that they default to show port 50000 as a possible port to map, but by default they do not show port 8080.  I had to press the "+" character to the right of the row containing port 50000.

Mark Waite

On Tue, Feb 2, 2021 at 7:05 PM Slide <[hidden email]> wrote:
What does your docker command look like?

On Tue, Feb 2, 2021, 13:43 Anil <[hidden email]> wrote:
Jenkins 2.263.3 LTS Windows 10 Home Docker Windows Ubuntu 

I am learning Jenkins and was trying to run it in a docker image.
I started up Docker Desktop and clicked Run on jenkins:lts
However when I go to localhost:8080, this is what I see, and not the Jenkins web page.


Capture.PNG

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3bf430d-c036-400a-8672-4ff858e782ben%40googlegroups.com.

--
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 [hidden email].

--
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 [hidden email].


--
---------------------
Tej Singh Rana

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/84d49f0a-a758-423a-b180-2d59d8c96f7bn%40googlegroups.com.