Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sudden build failure #6945

Open
malixswoop opened this issue Jun 20, 2024 · 7 comments
Open

Sudden build failure #6945

malixswoop opened this issue Jun 20, 2024 · 7 comments

Comments

@malixswoop
Copy link

malixswoop commented Jun 20, 2024

Description of problem

-----> Cleaning up...
-----> Building myapp from Dockerfile
-----> Setting config vars
       DOKKU_DOCKERFILE_PORTS:  5000
#2 [internal] load .dockerignore
#2 transferring context: 163B done
#2 DONE 0.0s

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 625B done
#1 DONE 0.0s

#3 resolve image config for docker.io/docker/dockerfile:1
#3 ERROR: failed to fetch anonymous token: unexpected status: 503 Service Unavailable
------
 > resolve image config for docker.io/docker/dockerfile:1:
------
failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: failed to fetch anonymous token: unexpected status: 503 Service Unavailable
 !     Retagging old image 82ae2ca32c12
9f266dbafa6d as dokku/admin:latest
 !     App build failed
 !     exit status 1

Steps to reproduce

dokku ps:rebuild

dokku report $APP_NAME

-----> uname: Linux azoome 5.4.0-186-generic #206-Ubuntu SMP Fri Apr 26 12:31:10 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
-----> memory: 
                     total        used        free      shared  buff/cache   available
       Mem:           7945        1165        4796          15        1982        6523
       Swap:          2047           0        2047
-----> docker version: 
       Client: Docker Engine - Community
        Version:           19.03.13
        API version:       1.40
        Go version:        go1.13.15
        Git commit:        4484c46d9d
        Built:             Wed Sep 16 17:02:52 2020
        OS/Arch:           linux/amd64
        Experimental:      false
       
       Server: Docker Engine - Community
        Engine:
         Version:          19.03.13
         API version:      1.40 (minimum version 1.12)
         Go version:       go1.13.15
         Git commit:       4484c46d9d
         Built:            Wed Sep 16 17:01:20 2020
         OS/Arch:          linux/amd64
         Experimental:     false
        containerd:
         Version:          1.3.7
         GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
        runc:
         Version:          1.0.0-rc10
         GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
        docker-init:
         Version:          0.18.0
         GitCommit:        fec3683
-----> docker daemon info: 
       Client:
        Debug Mode: true
        Plugins:
         compose: Docker Compose (Docker Inc., v2.16.0)
       
       Server:
        Containers: 8
         Running: 8
         Paused: 0
         Stopped: 0
        Images: 22
        Server Version: 19.03.13
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Native Overlay Diff: true
        Logging Driver: json-file
        Cgroup Driver: cgroupfs
        Plugins:
         Volume: local
         Network: bridge host ipvlan macvlan null overlay
         Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
        Swarm: inactive
        Runtimes: runc
        Default Runtime: runc
        Init Binary: docker-init
        containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
        runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
        init version: fec3683
        Security Options:
         apparmor
         seccomp
          Profile: default
        Kernel Version: 5.4.0-186-generic
        Operating System: Ubuntu 20.04.1 LTS
        OSType: linux
        Architecture: x86_64
        CPUs: 4
        Total Memory: 7.759GiB
        Name: azoome
        ID: PEEB:CHZO:EMP7:XJR5:2ZB7:QM5F:TPDW:PHRP:MO73:X7YR:V5PN:LJDA
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
        Registry: https://index.docker.io/v1/
        Labels:
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false
       
-----> git version: git version 2.25.1
-----> sigil version: 0.9.0build bc921b7
-----> herokuish version: 
       herokuish: v0.7.3
       buildpacks:
         heroku-buildpack-multi     v1.2.0
         heroku-buildpack-ruby      v265
         heroku-buildpack-nodejs    v235
         heroku-buildpack-clojure   v91
         heroku-buildpack-python    v242
         heroku-buildpack-java      v73
         heroku-buildpack-gradle    v39
         heroku-buildpack-scala     v96
         heroku-buildpack-play      v26
         heroku-buildpack-php       v244
         heroku-buildpack-go        v184
         heroku-buildpack-nginx     v25
         buildpack-null             v3
-----> dokku version: dokku version 0.30.0
-----> plugn version: plugn: 0.12.0build 3a27863
-----> dokku plugins: 
         00_dokku-standard    0.30.0 enabled    dokku core standard plugin
         20_events            0.30.0 enabled    dokku core events logging plugin
         app-json             0.30.0 enabled    dokku core app-json plugin
         apps                 0.30.0 enabled    dokku core apps plugin
         builder              0.30.0 enabled    dokku core builder plugin
         builder-dockerfile   0.30.0 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.30.0 enabled    dokku core builder-herokuish plugin
         builder-lambda       0.30.0 enabled    dokku core builder-lambda plugin
         builder-null         0.30.0 enabled    dokku core builder-null plugin
         builder-pack         0.30.0 enabled    dokku core builder-pack plugin
         buildpacks           0.30.0 enabled    dokku core buildpacks plugin
         caddy-vhosts         0.30.0 enabled    dokku core caddy-vhosts plugin
         certs                0.30.0 enabled    dokku core certificate management plugin
         checks               0.30.0 enabled    dokku core checks plugin
         common               0.30.0 enabled    dokku core common plugin
         config               0.30.0 enabled    dokku core config plugin
         cron                 0.30.0 enabled    dokku core cron plugin
         docker-options       0.30.0 enabled    dokku core docker-options plugin
         domains              0.30.0 enabled    dokku core domains plugin
         enter                0.30.0 enabled    dokku core enter plugin
         git                  0.30.0 enabled    dokku core git plugin
         haproxy-vhosts       0.30.0 enabled    dokku core haproxy-vhosts plugin
         letsencrypt          0.18.1 enabled    Automated installation of let's encrypt TLS certificates
         logs                 0.30.0 enabled    dokku core logs plugin
         mariadb              1.25.0 enabled    dokku mariadb service plugin
         mongo                1.22.0 enabled    dokku mongo service plugin
         network              0.30.0 enabled    dokku core network plugin
         nginx-vhosts         0.30.0 enabled    dokku core nginx-vhosts plugin
         plugin               0.30.0 enabled    dokku core plugin plugin
         postgres             1.25.0 enabled    dokku postgres service plugin
         proxy                0.30.0 enabled    dokku core proxy plugin
         ps                   0.30.0 enabled    dokku core ps plugin
         redis                1.25.0 enabled    dokku redis service plugin
         registry             0.30.0 enabled    dokku core registry plugin
         repo                 0.30.0 enabled    dokku core repo plugin
         resource             0.30.0 enabled    dokku core resource plugin
         run                  0.30.0 enabled    dokku core run plugin
         scheduler            0.30.0 enabled    dokku core scheduler plugin
         scheduler-docker-local 0.30.0 enabled    dokku core scheduler-docker-local plugin
         scheduler-null       0.30.0 enabled    dokku core scheduler-null plugin
         shell                0.30.0 enabled    dokku core shell plugin
         ssh-keys             0.30.0 enabled    dokku core ssh-keys plugin
         storage              0.30.0 enabled    dokku core storage plugin
         trace                0.30.0 enabled    dokku core trace plugin
         traefik-vhosts       0.30.0 enabled    dokku core traefik-vhosts plugin
=====> admin app-json information
       App json computed selected:    app.json
       App json global selected:      app.json
       App json selected:             
=====> admin app information
       App created at:                1676572395
       App deploy source:             admin
       App deploy source metadata:    admin
       App dir:                       /home/dokku/admin
       App locked:                    false
=====> admin builder information
       Builder build dir:             
       Builder computed build dir:    
       Builder computed selected:     
       Builder global build dir:      
       Builder global selected:       
       Builder selected:              
=====> admin builder-dockerfile information
       Builder dockerfile computed dockerfile path: Dockerfile               
       Builder dockerfile global dockerfile path: Dockerfile               
       Builder dockerfile dockerfile path:                          
=====> admin builder-lambda information
       Builder lambda computed lambdayml path: lambda.yml               
       Builder lambda global lambdayml path: lambda.yml               
       Builder lambda lambdayml path:                          
=====> admin builder-pack information
       Builder pack computed projecttoml path: project.toml             
       Builder pack global projecttoml path: project.toml             
       Builder pack projecttoml path:                          
=====> admin buildpacks information
       Buildpacks computed stack:     gliderlabs/herokuish:latest-20
       Buildpacks global stack:       
       Buildpacks list:               
       Buildpacks stack:              
=====> admin ssl information
       Ssl dir:                       /home/dokku/admin/tls    
       Ssl enabled:                   true                     
       Ssl hostnames:                 admin.azoo.me beta.azoo.me
       Ssl expires at:                Aug 13 13:02:55 2024 GMT 
       Ssl issuer:                    C = US, O = Let's Encrypt, CN = R3
       Ssl starts at:                 May 15 13:02:56 2024 GMT 
       Ssl subject:                   subject=CN = beta.azoo.me
       Ssl verified:                  verified by a certificate authority
=====> admin checks information
       Checks disabled list:          none                     
       Checks skipped list:           none                     
       Checks computed wait to retire: 60                       
       Checks global wait to retire:  60                       
       Checks wait to retire:                                  
=====> admin cron information
       Cron task count:               0
=====> admin docker options information
       Docker options build:          --link dokku.mongo.azoomedb:dokku-mongo-azoomedb 
       Docker options deploy:         --link dokku.mongo.azoomedb:dokku-mongo-azoomedb --restart=unless-stopped -v /home/apps/admin/storage:/app/logs -v /home/apps/admin/storage:/usr/admin/logs 
       Docker options run:            --link dokku.mongo.azoomedb:dokku-mongo-azoomedb -v /home/apps/admin/storage:/app/logs -v /home/apps/admin/storage:/usr/admin/logs 
=====> admin domains information
       Domains app enabled:           true                     
       Domains app vhosts:            beta.azoo.me admin.azoo.me
       Domains global enabled:        true                     
       Domains global vhosts:         azoo.me                  
=====> admin git information
       Git deploy branch:             master                   
       Git global deploy branch:      master                   
       Git keep git dir:              false                    
       Git rev env var:               GIT_REV                  
       Git sha:                       ee47b31                  
       Git source image:                                       
       Git last updated at:           1718762764               
=====> admin letsencrypt information
       Letsencrypt active:            true                     
       Letsencrypt autorenew:         false                    
       Letsencrypt email:             [email protected]            
       Letsencrypt expiration:        1723554175               
=====> admin logs information
       Logs computed max size:        20m
       Logs global max size:          20m
       Logs global vector sink:       
       Logs max size:                 
       Logs vector sink:              
=====> admin network information
       Network attach post create:           
       Network attach post deploy:           
       Network bind all interfaces:          false
       Network computed attach post create:  
       Network computed attach post deploy:  
       Network computed bind all interfaces: false
       Network computed initial network:     
       Network computed tld:                 
       Network global attach post create:    
       Network global attach post deploy:    
       Network global bind all interfaces:   false
       Network global initial network:       
       Network global tld:                   
       Network initial network:              
       Network static web listener:          
       Network tld:                          
       Network web listeners:                172.17.0.6:5000
=====> admin nginx information
       Nginx access log format:                                
       Nginx access log path:         /var/log/nginx/admin-access.log
       Nginx bind address ipv4:                                
       Nginx bind address ipv6:       ::                       
       Nginx client max body size:                             
       Nginx disable custom config:   false                    
       Nginx error log path:          /var/log/nginx/admin-error.log
       Nginx global hsts:             true                     
       Nginx computed hsts:           true                     
       Nginx hsts:                                             
       Nginx hsts include subdomains: true                     
       Nginx hsts max age:            15724800                 
       Nginx hsts preload:            false                    
       Nginx computed nginx conf sigil path: nginx.conf.sigil         
       Nginx global nginx conf sigil path: nginx.conf.sigil         
       Nginx nginx conf sigil path:                            
       Nginx proxy buffer size:       4096                     
       Nginx proxy buffering:         on                       
       Nginx proxy buffers:           8 4096                   
       Nginx proxy busy buffers size: 8192                     
       Nginx proxy read timeout:      60s                      
       Nginx last visited at:         1718921917               
       Nginx x forwarded for value:   $remote_addr             
       Nginx x forwarded port value:  $server_port             
       Nginx x forwarded proto value: $scheme                  
       Nginx x forwarded ssl:                                  
=====> admin proxy information
       Proxy enabled:                 true
       Proxy port map:                http:80:5000 https:443:5000
       Proxy type:                    nginx
=====> admin ps information
       Deployed:                      true
       Processes:                     1
       Ps can scale:                  false
       Ps computed procfile path:     Procfile
       Ps global procfile path:       Procfile
       Ps procfile path:              
       Ps restart policy:             unless-stopped
       Restore:                       true
       Running:                       true
       Status web 1:                  running (CID: f8fec0df960)
=====> admin registry information
       Registry computed image repo:      dokku/admin
       Registry computed push on release: false
       Registry computed server:          
       Registry global push on release:   
       Registry global server:            
       Registry image repo:               
       Registry push on release:          
       Registry server:                   
       Registry tag version:              
=====> admin resource information
=====> admin scheduler information
       Scheduler computed selected:   docker-local
       Scheduler global selected:     docker-local
       Scheduler selected:            
=====> admin scheduler-docker-local information
       Scheduler docker local disable chown:                          
       Scheduler docker local init process: true                     
       Scheduler docker local parallel schedule count:                          
=====> admin storage information
       Storage build mounts:                                   
       Storage deploy mounts:         -v /home/apps/admin/storage:/app/logs -v /home/apps/admin/storage:/usr/admin/logs 
       Storage run mounts:            -v /home/apps/admin/storage:/app/logs -v /home/apps/admin/storage:/usr/admin/logs 

Additional information

No response

Output of failing commands after running: dokku trace:off

No response

Output of failing commands after running: dokku trace:on

No response

@malixsys
Copy link
Contributor

Seemed to have been caused by BUILDKIT functionality in Dockerfile

@josegonzalez
Copy link
Member

@malixsys are you working on the same app? Or maybe just two GH accounts?

@malixsys
Copy link
Contributor

@malixsys are you working on the same app? Or maybe just two GH accounts?

Yeah, I opened the issue on my work account 😄
I thought I contributed to dokku with this one, so switched, but it's through Open Source Collective :)

@malixsys
Copy link
Contributor

malixsys commented Jun 21, 2024

Got fixed by switching out:

COPY package.json yarn.lock ./
ENV YARN_CACHE_FOLDER=/tmp/yarn_cache_admin
RUN --mount=type=cache,target=/tmp/yarn_cache_admin yarn install --prefer-offline --frozen-lockfile

with

COPY package.json yarn.lock ./
RUN yarn install --prefer-offline --frozen-lockfile && yarn cache clean

in Dockerfile 🤔

@josegonzalez
Copy link
Member

Are you maybe missing buildx on the remote server or something?

@malixsys
Copy link
Contributor

It worked before... strange.

@josegonzalez
Copy link
Member

If you have a small app I can use to reproduce this error, happy to dive in further. Otherwise, I don't know that there is enough info here for me to debug/fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants