LXC: lxc-create fails due to missing SSL

lxc-create -t download -n pokus

ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for pokus failed
lxc-create: lxc_create.c: main: 274 Error creating container pokus

https://repo.turris.cz/lxc/meta/1.0/:slight_smile:
index-system.2
index-system.2.asc

Hello,

Would you please tell us more details on your issue? Are you trying it on Turris Omnia? I’ve just tried it on the TO and I don’t have any issues with it.

BusyBox v1.25.1 (2018-05-04 09:08:46 CEST) built-in shell (ash)

  _______  _    _  _____   _____   _____   _____ 
 |__   __|| |  | ||  __ \ |  __ \ |_   _| / ____|
    | |   | |  | || |__) || |__) |  | |  | (___  
    | |   | |  | ||  _  / |  _  /   | |   \___ \ 
    | |   | |__| || | \ \ | | \ \  _| |_  ____) |
    |_|    \____/ |_|  \_\|_|  \_\|_____||_____/ 
                                                 


root@turris:~# lxc-create -t download -n pokus
Setting up the GPG keyring
Downloading the image index

---
DIST	RELEASE	ARCH	VARIANT	BUILD
---
Turris_OS	stable	armv7l	default	2018-07-23
Turris_OS	stable	ppc	default	2018-07-23
Alpine	3.6	armv7l	default	2018-07-23
Alpine	3.7	armv7l	default	2018-07-23
ArchLinux	latest	armv7l	default	2018-07-23
Debian	Jessie	armv7l	default	2018-07-23
Debian	Stretch	armv7l	default	2018-07-23
Debian	Buster	armv7l	default	2018-07-23
Gentoo	stable	armv7l	default	2018-07-23
openSUSE	42.3	armv7l	default	2018-07-23
openSUSE	Tumbleweed	armv7l	default	2018-07-23
Sabayon	16	armv7l	default	2018-07-23
Ubuntu	Xenial	armv7l	default	2018-07-23
Ubuntu	Artful	armv7l	default	2018-07-23
Ubuntu	Bionic	armv7l	default	2018-07-23
---

Distribution: Ubuntu
Release: Xenial
Architecture: armv7l

Downloading the image index
Downloading the rootfs
Downloading the metadata
The image cache is now ready
Unpacking the rootfs
---
Distribution Ubuntu version Xenial was just installed as a container.

Content of the tarballs is provided by third party, thus there is no warranty of any kind nor support from Turris team.

Do not use containers on internal flash, they can wear it down really fast!!!

Didn’t you try to install LXC 2.0 from OpenWrt?

Hi,

lxc-create --version
1.1.5

curl “https://repo.turris.cz/lxc//meta/1.0/”
index-system.2
index-system.2.asc

ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system

Wrong index-system files in repo.turris.cz ?

Any updates to this?

I’m also running currently into this issue. LXC seems to try connecting over http:// and then cannot handle the permanently move (301) response.

I’m currently running lxc 1.1.5 on Turris Omnia 3.10.5.

I have tried to create new lxc container today, and I can see pretty much the same.
Please can somebody have a look into it?

root@omnia:~# lxc-create -t download -n foo
Setting up the GPG keyring
Downloading the image index
ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for foo failed
lxc-create: lxc_create.c: main: 274 Error creating container foo

Hi there,

I am afraid that this issue is not solved yet: LXC: lxc-create fails due to missing SSL support

This is what is happening on my Turris Omnia:

root@turris:~# lxc-create --name test-container -t download
Setting up the GPG keyring
Downloading the image index
ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for test-container failed
lxc-create: lxc_create.c: main: 274 Error creating container test-container
root@turris:~# cat /etc/turris-version 
3.10.5
root@turris:~# cat /etc/config/lxc
#
# lxc uci configuration
#

config lxc 'lxc'
	option url 'repo.turris.cz/lxc'

This is my first post here. Please let me know if you need any further information. Any help is greatly appreciated!

Running into the same issue currently.

Same here. wget version 1.19.5-1 is installed.
It’s strange, because I already setup three containers previously, which are running fine.
Lucis’ “just_want_to_list_available_lxc_templates” also does not obtain a list of templates.
And https://repo.turris.cz/lxc//meta/1.0/index-system only gives 404.

I’ll join the choir; experiencing same issue.

Trying to instal anything from LXC repo yelds

root@turris:~# lxc-create -t download -n name_of_lxc_container
Setting up the GPG keyring
Downloading the image index
ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for name_of_lxc_container failed
lxc-create: lxc_create.c: main: 274 Error creating container name_of_lxc_container

Quickfix:

  1. edit line 44 from /usr/share/lxc/templates/lxc-download
    DOWNLOAD_SHOW_HTTP_WARNING="false"
  2. use this command,
    lxc-create -n debian10 -t download -B best -- -d Debian -r Buster -a armv7l --no-validate

-d Debian (distribution)
-r Buster (release)

are case sensitive and can be found in the original repo, here:
https://repo.turris.cz/lxc//meta/1.0/index-system.2

Long fix: Github issue #85

Thank you for the fix, I’ll give it a try in a minute.
But frankly, this has to be fixed very soon!
Did anyone test if lxc works again in 3.10.6 RC?

Edit: Works! Even without DOWNLOAD_SHOW_HTTP_WARNING="false"

Hello,

We’ve managed to reproduce it, and @miska is working on it.
If there’d be anything new, I’ll tell you.

We don’t need to release another RC or version to fix it. :slight_smile:

2 Likes

Very cool, thank you!

Should be fixed now.

2 Likes

for me it still doesn´t work with these commands:

lxc-create -t download -n pi-hole

Can you tell me, if the output is the same or different?
Would you please try to restart your router and try it again?

Hi, as far as I remember the repository path is now different but it still doesn´t work, just rebooted too.

Here is what I get:

root@turris:~# lxc-create -t download -n pi-hole
Setting up the GPG keyring
Downloading the image index
ERROR: Failed to download http://https://repo.turris.cz/lxc/meta/1.0/index-system.2//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for pi-hole failed
lxc-create: lxc_create.c: main: 274 Error creating container pi-hole

thanks

I think you have manually altered the repo URL by adding “https://” before… now you should undo it.

It is working by now, problem with LXC utilities. Somehow their configuration wasn´t truly integrated although checked.
thanks to Turris team

I am running Turris OS version 3.11.2, just installed LXC and I get this error:

root@turris:~# lxc-create -t download -n intermodal
Setting up the GPG keyring
Downloading the image index
ERROR: Failed to download http://repo.turris.cz/lxc//meta/1.0/index-system
lxc-create: lxccontainer.c: create_run_template: 1201 container creation template for intermodal failed
lxc-create: lxc_create.c: main: 274 Error creating container intermodal

Am I doing something wrong? I tried the quick workaround (setting DOWNLOAD_SHOW_HTTP_WARNING to “false” in /usr/share/lxc/templates/lxc-download ) and it did not help either – would I have to reload a configutation somewhere for it to take effect?

edit:

is it please?