Welcome to the Linux Foundation Forum!

3.2.9 - failed to push tagged image to local registry, "server gave HTTP response to HTTPS client"

brianjfirestone
brianjfirestone Posts: 4
edited December 2022 in LFD259 Class Forum

I've seen a few threads on issues relating to this and have tried everything but am still running into this issue.

Upon trying to execute sudo podman push $repo/simpleapp, I receive the following error:

Getting image source signatures
Error: trying to reuse blob sha256:ded7a220bb058e28ee3254fbba04ca90b679070424424761a53a043b93b612bf at destination: pinging container registry 10.103.11.172:5000: Get "https://10.103.11.172:5000/v2/": http: server gave HTTP response to HTTPS client

This occurs on my cp node as I have not yet reached step 12 where changes are made to the worker node. Any help is really appreciated.

Things I've checked-
- $repo var is set to the correct IP address (ie. CLUSTER-IP from registry service)
- config.toml endpoint set to ["http://10.103.11.172:5000"]
- registries.insecure set to ["10.103.11.172:5000"]
- containerd restarted to pick up any changes

Comments

  • I am also facing the same issue. Tried different ways to fix it but didn't work

  • Glad to know I'm not the only one - I revisited this again today and am still stumped.

  • One step I am still confused about is the second command in step 5: student@cp: ̃/app1$ sudo vim /etc/containers/registries.conf.d/registry.conf

    Is this file path a typo? There is no /registries.conf.d directory in /etc/containers, but there is the registries.conf file... can anyone clarify this?

  • So in general, if you don't want to touch the original settings, you basically create a new directory and put your config files in there. same strategy is used by nginx as well. Ofc, you can directly modify the registry.conf file but it is not recommended.

    You can read more about this here -> https://www.redhat.com/sysadmin/manage-container-registries

  • @ashishsantikari thanks! did this fix the issue for you or are you still encountering it?

  • I am still struggling with the issue but I moved onto the next chapter using a public image ;)

  • Hi @brianjfirestone, @ashishsantikari,

    In exercise 3.2 step 4 there is a minor typo in the instructions to update the config.toml file, there is a missing "s".
    Below you have the corrected entry:

    [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors."*"]    #<-- Add these two lines
        endpoint = ["http://10.97.40.62:5000"]                      #<-- Remember YOUR IP here
    

    Regards,
    -Chris

  • Yes, I fixed it but I still get the error for some reason. I restarted containerd service after doing any change in config.

  • icastillejos
    icastillejos Posts: 3
    edited January 2023

    @ashishsantikari were you ever able to fix this problem? I spent many hours over several days looking into this but nothing in the docs helped.

    Finally I followed this post (https://stackoverflow.com/a/72852118/1757790) on StackOverflow and finally got it to work.

    @chrispokorni Wondering if the LinuxFoundation folks have any pointers on why this is happening and what the recommended approach is. Also, perhaps the docs need to be updated?

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi @icastillejos,

    The last few times I completed the exercise I only had to pay attention to the "plugin" typo, that was the missing "s", in order to fix the "server gave HTTP response to HTTPS client" error. Everything else worked as expected based on steps from the lab guide. I am not aware of any other issues.

    Regards,
    -Chris

  • Thanks, I saw your comments on the previous thread but it was too late to edit my previous post here

  • @icastillejos said:
    @ashishsantikari were you ever able to fix this problem? I spent many hours over several days looking into this but nothing in the docs helped.

    Finally I followed this post (https://stackoverflow.com/a/72852118/1757790) on StackOverflow and finally got it to work.

    @chrispokorni Wondering if the LinuxFoundation folks have any pointers on why this is happening and what the recommended approach is. Also, perhaps the docs need to be updated?

    No, it didn't work for me still. I basically moved on to the next chapters now. If someone would like to dig into the issue and would want to connect over this and help resolve the issue, you are most welcome :)

Categories

Upcoming Training