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

Can't execute "hetzner-k3s create --config cluster_config.yaml" - error Unhandled exception: SSL_CTX_new: error: [...] (OpenSSL::Error) #309

Open
Linutux opened this issue Jan 26, 2024 · 6 comments

Comments

@Linutux
Copy link

Linutux commented Jan 26, 2024

I Installed all required packages ("sudo dnf install libssh2 libevent libyaml pcre gmp gc-devel"), created a cluster_config.yaml and executed "hetzner-k3s create --config cluster_config.yaml".

I got the following error:

Validating configuration...Unhandled exception: SSL_CTX_new: error:030000A9:digital envelope routines::unknown option (OpenSSL::Error)
from /usr/lib/crystal/core/openssl/ssl/context.cr:304:11 in 'new'
from /usr/lib/crystal/core/http/client.cr:136:5 in 'new_http_client'
from /home/runner/work/hetzner-k3s/hetzner-k3s/lib/crest/src/crest/request.cr:135:7 in 'available_releases'
from /home/runner/work/hetzner-k3s/hetzner-k3s/src/configuration/settings/k3s_version.cr:9:15 in 'validate'
from /usr/lib/crystal/core/gc/boehm.cr:132:5 in 'run:parent:program_name'
from /home/runner/work/hetzner-k3s/hetzner-k3s/src/hetzner-k3s.cr:10:3 in 'parse_and_run'
from /home/runner/work/hetzner-k3s/hetzner-k3s/src/hetzner-k3s.cr:96:1 in '__crystal_main'
from /usr/lib/crystal/core/crystal/main.cr:115:5 in 'main'
from src/env/__libc_start_main.c:95:2 in 'libc_start_main_stage2'

Can you please help me?

@vitobotta
Copy link
Owner

I'm sorry for the lack of replies. I was sick and then very busy with the day job. Did you figure out what was the problem in the end?

@Linutux
Copy link
Author

Linutux commented Mar 7, 2024

Nö, I have not tried again.

I switched from Fedora to Ubuntu lately and will try again...

@rsidhaarth
Copy link

I am getting the same error, I am using Ubuntu 22.04

I have installed these dependencies

sudo apt install libssh2-1 && \ sudo apt install libevent-dev && \ sudo apt install libyaml-dev && \ sudo apt install libpcre3 libpcre3-dev

am I missing something?

@vitobotta
Copy link
Owner

@Linutux @rsidhaarth I have upgraded the SSH2 shard in main, can you try again? I haven't released this change yet as I want to merge other changes first.

@konczdam
Copy link

konczdam commented Apr 27, 2024

I had the same error on Fedora 40.
When I built the app from the source code from the main branch, the error is no longer there.

I haven't found a description about the steps required to build the app locally, so I'll paste it here, hope you don't mind.

# from the crystal documentation: https://github.com/crystal-lang/crystal/wiki/All-required-libraries#fedora
sudo dnf -y install \
  gcc \
  gcc-c++ \
  gmp-devel \
  libbsd-devel \
  libevent-devel \
  libxml2-devel \
  libyaml-devel \
  llvm-devel \
  llvm-static \
  libstdc++-static \
  make \
  openssl-devel \
  pcre2-devel \
  redhat-rpm-config

# Needed this to overcome an error message
sudo dnf install libssh2-devel 

# install crystal
sudo snap install crystal --classic

# install dependencies
shards install --without-development

# build the app
crystal build src/hetzner-k3s.cr  

@vitobotta
Copy link
Owner

Hi @konczdam , thanks for confirming that the problem is fixed in main! I am still working on finalising v2.0.0, which will include this together with a lot of other stuff.

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

No branches or pull requests

4 participants