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

distrobox clone - [Error] Error: initializing source docker://localhost/ #1640

Closed
naclander opened this issue Dec 24, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@naclander
Copy link

Describe the bug
Using podman, cloning an existing image seems to be broken for some use-cases. See https://universal-blue.discourse.group/t/distrobox-cloning-fails-on-aurora/5269

To Reproduce
distrobox create --name archlinux2 --clone archlinux

Expected behavior
Clone succeeds.

Logs
Trying to pull localhost/archlinux:2024-12-23...
WARN[0000] Failed, retrying in 1s ... (1/3). Error: initializing source docker://localhost/archlinux:2024-12-23: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
WARN[0001] Failed, retrying in 1s ... (2/3). Error: initializing source docker://localhost/archlinux:2024-12-23: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
WARN[0002] Failed, retrying in 1s ... (3/3). Error: initializing source docker://localhost/archlinux:2024-12-23: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused
Error: initializing source docker://localhost/archlinux:2024-12-23: pinging container registry localhost: Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused

Desktop (please complete the following information):

  • Podman
  • podman version 5.0.3
  • distrobox: 1.7.2.1
  • Ubuntu 24.10
  • apt
@naclander naclander added the bug Something isn't working label Dec 24, 2024
@naclander
Copy link
Author

Seems it really does find the container in that location:

DEBU[0000] Image archlinux:2024-12-23 resolved to local image localhost/archlinux:2024-12-23 which will be used for pulling 

Then it tries to ping/pull it and fails:

DEBU[0000] Ping https://localhost/v2/ err Get "https://localhost/v2/": dial tcp 127.0.0.1:443: connect: connection refused (&url.Error{Op:"Get", URL:"https://localhost/v2/", Err:(*net.OpError)(0xc0003a1db0)}) 

@Swiftloke
Copy link

Hey, I'm thinking this miiiight be a podman bug?

I ran into it while working on something completely unrelated. I was following this tutorial to get ollama to play extra nice with my shiny new laptop... And I ran into the same issue you had with this error:

$ podman run -d     --name ollama     --replace     --pull=always     --restart=always      -p 127.0.0.1:11434:11434     -v ollama:/root/.ollama     -e OLLAMA_MAX_LOADED_MODELS=1     -e OLLAMA_NUM_PARALLEL=1     --device /dev/dri     --device /dev/kfd     -e HSA_OVERRIDE_GFX_VERSION=11.0.0     ollama-gtt
Trying to pull localhost/ollama-gtt:latest...
WARN[0000] Failed, retrying in 1s ... (1/3). Error: initializing source docker://localhost/ollama-gtt:latest: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused 
WARN[0001] Failed, retrying in 1s ... (2/3). Error: initializing source docker://localhost/ollama-gtt:latest: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused 
WARN[0002] Failed, retrying in 1s ... (3/3). Error: initializing source docker://localhost/ollama-gtt:latest: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused 
Error: initializing source docker://localhost/ollama-gtt:latest: pinging container registry localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection refused

Furthermore, checking the status of podman.service shows that it has apparently been terminated?

$ systemctl status podman
○ podman.service - Podman API Service
     Loaded: loaded (/usr/lib/systemd/system/podman.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: inactive (dead) since Sat 2024-12-28 22:20:49 MST; 12s ago
   Duration: 5.024s
 Invocation: ea8685ec1bdc43e3bee7eda8539584c2
TriggeredBy: ● podman.socket
       Docs: man:podman-system-service(1)
    Process: 107393 ExecStart=/usr/bin/podman $LOGGING system service (code=exited, status=0/SUCCESS)
   Main PID: 107393 (code=exited, status=0/SUCCESS)
   Mem peak: 16.3M
        CPU: 40ms

Dec 28 22:20:44 factsphere systemd[1]: Starting podman.service - Podman API Service...
Dec 28 22:20:44 factsphere systemd[1]: Started podman.service - Podman API Service.
Dec 28 22:20:44 factsphere podman[107393]: time="2024-12-28T22:20:44-07:00" level=info msg="/usr/bin/podman filtering at log level i>
Dec 28 22:20:44 factsphere podman[107393]: time="2024-12-28T22:20:44-07:00" level=info msg="Using sqlite as database backend"
Dec 28 22:20:44 factsphere podman[107393]: time="2024-12-28T22:20:44-07:00" level=info msg="Not using native diff for overlay, this >
Dec 28 22:20:44 factsphere podman[107393]: time="2024-12-28T22:20:44-07:00" level=info msg="Setting parallel job count to 49"
Dec 28 22:20:44 factsphere podman[107393]: time="2024-12-28T22:20:44-07:00" level=info msg="Using systemd socket activation to deter>
Dec 28 22:20:44 factsphere podman[107393]: time="2024-12-28T22:20:44-07:00" level=info msg="API service listening on \"/run/podman/p>
Dec 28 22:20:49 factsphere podman[107393]: time="2024-12-28T22:20:49-07:00" level=info msg="Received shutdown.Stop(), terminating!" >
Dec 28 22:20:49 factsphere systemd[1]: podman.service: Deactivated successfully.

What fixed it for me was removing --pull=always from the command I copied. I'm running Fedora Silverblue 41.

Sorry if I'm barging in here for something that has no value at all. I just thought it might be relevant since this bug report is pretty recent and has the same error.

@naclander naclander changed the title [Error] Error: initializing source docker://localhost/ distrobox clone - [Error] Error: initializing source docker://localhost/ Jan 4, 2025
@89luca89
Copy link
Owner

pull is not compatible with localhost images, I think that's the problem

not really a distrobox thing but simply an incompatibility at docker and podman usage level

@89luca89 89luca89 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2025
@naclander
Copy link
Author

@89luca89,

Can you help me understand what pull is compatible with?

I've created a new distrobox image, and then I try to clone it. This fails due to the error described.

So is clone not compatible with images created with distrobox create? Can you help me understand a flow that is the correct usage of clone? The docs as they're written today don't specify any limitation of clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants