Skip to content

Dagger doesn't work behind a corporate proxy #1369

Closed

Description

@sliard

dagger up return error behind a http proxy

Test with :

  • dagger 0.1.0-alpha.31 (374f1ba) linux/amd64 and dagger devel (7d96594) linux/amd64
  • Ubuntu 20.04.3 LTS
  • Docker 20

All docker command work with my proxy (configure into ~/.docker/config.json and /etc/systemd/system/docker.service.d/http-proxy.conf)
But with dagger I got this error.

[✗] wait                                                                                                                                                                                            10.3s
[✔] app.source                                                                                                                                                                                       0.0s
[✗] registry.run                                                                                                                                                                                    10.3s
#5 0.160 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz                                                                                                                   
#5 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz                                                                                                              
#5 5.164 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)                                                                                           
#5 10.17 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)                                                                                      
#5 10.17 ERROR: unable to select packages:                                                                                                                                                               
#5 10.17   bash (no such package):                                                                                                                                                                       
#5 10.17     required by: world[bash]                                                                                                                                                                    
[✗] app.ctr                                                                                                                                                                                         10.2s
8:45PM FTL failed to up environment: task failed: process "apk add -U --no-cache bash" did not complete successfully: exit code: 1

If I remove my VPN and proxy, first step of dagger are ok, but not the docker image download part :

8:47PM DBG detected buildkit config    haveHostNetwork=true isActive=true version=v0.9.3                                                                           
8:47PM DBG detected buildkit config    haveHostNetwork=true isActive=true version=v0.9.3                                                                           
8:47PM DBG failed to check universe version: universe not installed                                                                                                        
8:47PM DBG spawning buildkit job    attrs=null localdirs={
    "/home/me/examples/todoapp": "/home/me/examples/todoapp"
}    
[✔] wait                                                                                                                                                                                            35.7s
[✔] app.source                                                                                                                                                                                       0.1s
[✔] registry.run                                                                                                                                                                                    11.5s
[✔] app.ctr                                                                                                                                                                                         48.1s
[✔] app.build                                                                                                                                                                                        0.1s
[✗] image                                                                                                                                                                                           10.0s
dependency detected    dependency=app.build                                                                                                                                                              
executing operation    do=load pipeline=image                                                                                                                                                            
executing operation    do=fetch-container pipeline=image.#up[0].from                                                                                                                                     
                                                                                                                                                                                                         
#17 load metadata for docker.io/library/nginx:latest                                                                                                                                                     
#17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc                                                                                                                              
#17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving                    
------                                                                                                                                                                                                   
> @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:                                                                                                                                  
------                                                                                                                                                                                                   
8:48PM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving  

After I reconnect my VPN and proxy and all end :)

8:49PM DBG detected buildkit config    haveHostNetwork=true isActive=true version=v0.9.3                                                                           
8:49PM DBG detected buildkit config    haveHostNetwork=true isActive=true version=v0.9.3                                                                           
8:49PM DBG failed to check universe version: universe not installed                                                                                                        
8:49PM DBG spawning buildkit job    attrs=null localdirs={
    "/home/me/examples/todoapp": "/home/me/examples/todoapp"
}    
[✔] wait                                                                                                                                                                                             0.2s
[✔] app.source                                                                                                                                                                                       0.1s
[✔] registry.run                                                                                                                                                                                     1.1s
[✔] app.ctr                                                                                                                                                                                          0.0s
[✔] app.build                                                                                                                                                                                        0.1s
[✔] image                                                                                                                                                                                           39.1s
[✔] push.source                                                                                                                                                                                      1.0s
[✔] push.push                                                                                                                                                                                        1.3s
                                                                                                                                                                                                     4.6s
[✔] push.digest                                                                                                                                                                                      0.6s
[✔] push.ref                                                                                                                                                                                         0.5s
[✔] run.ref                                                                                                                                                                                          0.5s
[✔] run.run                                                                                                                                                                                          2.5s
Output                 Value                                                                                                    Description                                                              
app.build              struct                                                                                                   Build output directory                                                   
push.ref               "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed"  Image ref                                                                
push.digest            "sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed"                                Image digest                                                             
run.ref                "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed"  Image reference (e.g: nginx:alpine)                                      
run.run.env.IMAGE_REF  "localhost:5042/todoapp:latest@sha256:514251eadf5c1de89b72f8c82600dc33d8670985b4c3520d0b8a1fab3598a5ed"  -                                                                        
appURL                 "http://localhost:8080/"    

It's look like one part support proxy but not other one...

Activity

  1. sliard commented on Jan 10, 2022

    @sliard
    Author

    This morning, I'm back to my office. So I don't need a VPN.

    On dagger up I have an error (while it worked before at home with VPN)

    [✗] wait                                                                                                                                                                   0.3s
    [✔] app.source                                                                                                                                                             0.1s
    [✗] registry.run                                                                                                                                                           0.3s
    [✔] app.ctr                                                                                                                                                                0.1s
    [✔] app.build                                                                                                                                                              0.1s
    [✗] image                                                                                                                                                                  0.0s
    dependency detected    dependency=app.build                                                                                                                                0.1s
    executing operation    do=load pipeline=image                                                                                                                              0.1s
    executing operation    do=fetch-container pipeline=image.#up[0].from                                                                                                           
                                                                                                                                                                                   
    #17 load metadata for docker.io/library/nginx:latest                                                                                                                           
    #17 sha256:06c466a4eb6821b81bd3e48610e5f38dab858b1e9acb01d6e2f6b11c8fabe6bc                                                                                                    
    #17 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server …    
    ------                                                                                                                                                                         
    > @image.#up[0].from@ load metadata for docker.io/library/nginx:latest:                                                                                                        
    ------                                                                                                                                                                         
    8:29AM FTL failed to up environment: task failed: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": proxyconnect tcp: dial tcp: lookup proxy on 127.0.0.53:53: server misbehaving
    

    I delete manualy the docker instance dagger-buildkitd.
    And run dagger run with success this time.
    It's look like network changes was not well supported by buildkitd :(

  2. grouville commented on Jan 10, 2022

    @grouville
    Member

    Did you try to do dagger up --no-cache ? I think the issue was because of the cache on previous runs

  3. added this to the next milestone on Feb 1, 2022
  4. modified the milestones: v0.2.0-beta.1, on Mar 24, 2022
  5. shykes commented on Mar 27, 2022

    @shykes
    Contributor

    @sliard are you still experiencing this issue?

  6. sliard commented on Mar 27, 2022

    @sliard
    Author

    Sorry, I can't test anymore.
    I found another solution to solve the problem, I quit my job for a company without proxy ! :)

  7. shykes commented on Mar 27, 2022

    @shykes
    Contributor

    Congratulations ! :)

    I am closing this since we don't have a way to reproduce, and much of the relevant code has changed in 0.2.

  8. grouville commented on Mar 27, 2022

    @grouville
    Member

    Congratulations ! :)

    I am closing this since we don't have a way to reproduce, and much of the relevant code has changed in 0.2.

    We might want to keep this. I started a deployment script to reproduce the infra. It's halfway finished: had to pause it until I have more bandwidth. It's mainly a proxy with the docker daemon configured to work inside this environment. But I'm 80% sure this isn't solved atm

  9. reopened this on Mar 27, 2022
  10. shykes commented on Mar 27, 2022

    @shykes
    Contributor

    Congratulations ! :)

    I am closing this since we don't have a way to reproduce, and much of the relevant code has changed in 0.2.

    We might want to keep this. I started a deployment script to reproduce the infra. It's halfway finished: had to pause it until I have more bandwidth. It's mainly a proxy with the docker daemon configured to work inside this environment. But I'm 80% sure this isn't solved atm

    Ok, re-opening. Thank for the heads up @grouville

  11. changed the title [-]dagger up error with http proxy[/-] [+]Dagger doesn't work behind a corporate VPN[/+] on Apr 8, 2022
  12. changed the title [-]Dagger doesn't work behind a corporate VPN[/-] [+]Dagger doesn't work behind a corporate proxy[/+] on Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions