skip to Main Content

I have a cloud. I restarted my cloud server and I started again my docker containers.

docker ps

All my containers are working excluding Jenkins.

When I checked Jenkins on portainer

portainer

it is looking "running"

but when I want to access my Jenkins UI, I see this error

enter image description here

when I want to access with the IP address and port error is

"Connection Refused"

enter image description here

3

Answers


  1. Chosen as BEST ANSWER
    root@16dbd7edbf0f:/app# tail -f /var/log/jenkins/jenkins.log
    tail: cannot open '/var/log/jenkins/jenkins.log' for reading: No such file or directory
    

    there is no log records in the docker container. why I dont understand.

    root@ubuntu-c-2-4gib-fra1-01:~# docker logs 16dbd7edbf0f
        warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
              Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
        warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
              No XML encryptor configured. Key {3352231c-d8ff-45a1-bf09-8fd2cf839c62} may be persisted to storage in unencrypted form.
        warn: Microsoft.EntityFrameworkCore.Query[10103]
              The query uses the 'First'/'FirstOrDefault' operator without 'OrderBy' and filter operators. This may lead to unpredictable results.
        info: Microsoft.EntityFrameworkCore.Database.Command[20101]
              Executed DbCommand (25ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
              SELECT a."Id", a."ErrorDescripton", a."Hash", a."HashStatus", a."lastUpdatedAt"
              FROM "AlgolabSessionKeys" AS a
              LIMIT 1
        warn: Microsoft.AspNetCore.Hosting.Diagnostics[15]
              Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://*:1001'.
        info: Microsoft.Hosting.Lifetime[14]
              Now listening on: http://[::]:1001
        info: Microsoft.Hosting.Lifetime[0]
              Application started. Press Ctrl+C to shut down.
        info: Microsoft.Hosting.Lifetime[0]
              Hosting environment: Production
        info: Microsoft.Hosting.Lifetime[0]
              Content root path: /app
        info: Microsoft.Hosting.Lifetime[0]
              Application is shutting down...
        warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
              Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
        warn: Microsoft.EntityFrameworkCore.Query[10103]
              The query uses the 'First'/'FirstOrDefault' operator without 'OrderBy' and filter operators. This may lead to unpredictable results.
        info: Microsoft.EntityFrameworkCore.Database.Command[20101]
              Executed DbCommand (23ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
              SELECT a."Id", a."ErrorDescripton", a."Hash", a."HashStatus", a."lastUpdatedAt"
              FROM "AlgolabSessionKeys" AS a
              LIMIT 1
        warn: Microsoft.AspNetCore.Hosting.Diagnostics[15]
              Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://*:1001'.
        info: Microsoft.Hosting.Lifetime[14]
              Now listening on: http://[::]:1001
        info: Microsoft.Hosting.Lifetime[0]
              Application started. Press Ctrl+C to shut down.
        info: Microsoft.Hosting.Lifetime[0]
              Hosting environment: Production
        info: Microsoft.Hosting.Lifetime[0]
              Content root path: /app
    

    When I tried with ip address and ports (http://...:8080/)

    I'm getting "connection refused"


  2. this happened to me after the update and upgrade on aws 2-3 days ago. Not jenkis, it was sonarqube. I lost 3 days looking for a solution, and after I update/upgrade the instance again, and reboot it, it’s started working normally. It was 502 bad gateway also. If you can, give it a try.
    Mine was ubuntu.

    Login or Signup to reply.
  3. How do you access Jenkins like http://<IPAddress>:8080 or https://<Jenins-domain>?

    Since they’re not much information, let me provide some insights might be helpful for you. So, portainer and Jenkins container are running on the same server, assuming it’s an EC2. This is why you see portainer UI that Jenkins "container" status is running on 8080 port.

    I assume 502 Bad Gateway issue might be caused by the changed EC2 IP so your DNS, such as Route 53 isn’t resolving to the correct IP or some plugins in the Jenkins caused the Jenkins instance broken when you restarted container although the container runs.

    If IP address is not in issue, then try to:

    1. check Jenkins log using either
    • In the container tail -f /var/log/jenkins/jenkins.log
    • docker logs docker logs <YOUR CONTAINER ID>

    Update any error logs in your question for any further help.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search