Closed rothgar closed 1 year ago
@rothgar thank you for filing this bug, I've got good news and bad news.
The good news is we just removed the dependency on libgit and libssl for wash
, so you should be able to install it with
cargo install wash-cli --version 0.14.0-alpha.1 --force
This is an alpha version as we're still testing some of the new changes, but you should be just fine using it. --force
is just to overwrite any older version you had installed.
Bad news is that the wasmCloud OTP host does depend on libcrypto to do some random number generation, and this can affect newer systems like Ubuntu 22.04 that upgraded to OpenSSL 3.0.
This might take more of an expert, but if you are able to install an OpenSSL compatibility layer for 1.1 you should be able to run wasmCloud on it.
Thanks for the info. I got wash
installed with the alpha version and I was able to download an old version of openssl and install it. It looks like wash up
is working properly (no errors and I can hit the localhost endpoint) Is there anything else I should test?
I installed openssl 1.1 with
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
@rothgar that's fantastic! Thank you for sharing that command, I've had to search through forums a few times before to get that to work. If you can run the following and get a response, you're good to go
wash ctl start actor wasmcloud.azurecr.io/echo:0.3.4
wash call MBCFOPM6JW2APJLXJD3Z5O4CN7CPYJ2B4FTKLJUR5YR5MITIU7HD3WD5 HttpServer.HandleRequest '{"method": "GET", "path": "/echo", "body": "", "queryString":"","header":{}}'
This starts our example echo actor and calls its HTTP Handle Request method. Otherwise, you're good to go explore the documentation and examples!
Looks like that still fails
wash ctl start actor wasmcloud.azurecr.io/echo:0.3.4
failed to read root certificates: MissingOrMalformedExtensions
@rothgar Do you have the ca-certificates
package installed on Ubuntu? The root certificates
phrase makes me think of that package. A quick google pulls up the async-nats
client so I'll take a look there
Yes, it's installed
sudo apt info ca-certificates
Package: ca-certificates
Version: 20211016
Priority: important
Section: misc
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Julien Cristau <jcristau@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 384 kB
Depends: openssl (>= 1.1.1), debconf (>= 0.5) | debconf-2.0
Breaks: ca-certificates-java (<< 20121112+nmu1)
Enhances: openssl
Task: minimal, server-minimal
Download-Size: 148 kB
APT-Manual-Installed: yes
@rothgar I'll try this out with an ubuntu 22 container real quick later today and see if I can find a workaround
So I was able to get this working, albeit with a manual build of openssl 1.1.1s. here are my full steps...
apt update
apt upgrade
apt install curl build-essential pkg-config libz-dev -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
cargo install wash-cli --version 0.14.0-alpha.1
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
curl -fLO https://www.openssl.org/source/openssl-1.1.1s.tar.gz
tar -xvf openssl-1.1.1s.tar.gz
cd openssl-1.1.1s
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
make
make test
make install
wash up -d
wash ctl start actor wasmcloud.azurecr.io/echo:0.3.4
wash call MBCFOPM6JW2APJLXJD3Z5O4CN7CPYJ2B4FTKLJUR5YR5MITIU7HD3WD5 HttpServer.HandleRequest '{"method": "GET", "path": "/echo", "body": "", "queryString":"","header":{}}'
I did the manual build of openssl only because there wasn't an arm64
available package similar to what you sent above
All those steps worked except the last two :cry:
I get the same error I had before. I also saw a similar reported issue from 3 months ago of someone on Windows connecting to NATS from rust https://stackoverflow.com/questions/73342204/rust-missingormalformedextensions-while-connecting-to-nats
Looks like we're a few minor versions behind latest on async-nats
(0.18.0 -> 0.23.0) so it might have been fixed by then. Not entirely sure what would cause the issue, especially the same one between Ubuntu and Windows, but let me see if I can upgrade that and get a PR for you to try. We also may want to try a few substitutions for variables, like switching out the NATS host from 127.0.0.1
to localhost
Happy to keep testing to get this working for myself and others. I didn't see any options to enable debug logging in wash
and unfortunately I don't know enough about how wash works yet to dive in.
I tried restarting the nats server to listen on 0.0.0.0 (I get the same error) but I'm not exactly sure where else to look.
Justin, I really appreciate all of the engagement on this - we work very closely with the NATS team so you are helping all of us out. Thank you!
enable debug logging in wash
@rothgar you should be able to get debug logs from wash by setting the environment variable RUST_LOG=debug
. On unix-like systems you can add it as a prefix to the cli:
RUST_LOG=debug wash ...
I'm just catching up on this thread .. is the error you're getting the one with MissingOrMalformedExtensions
?
I'm also surprised you still have an openssl dependency with the alpha version of wash - we tried to remove that dependency so it looks like that didn't work on some platforms. Could you please run cargo tree
from the wash source folder and attaching the output to this issue? --Thanks!
I'm also surprised you still have an openssl dependency with the alpha version of wash
@stevelr just one note, I think @rothgar is still depending on openssl because of the wasmCloud host dependency on libcrypto
@stevelr Yes, the error I'm getting is failed to read root certificates: MissingOrMalformedExtensions
when I try to start the actor.
I'm not trying to develop wash (just use it) so cargo tree
didn't return anything. When I clone wash and run cargo tree
this is the output
That sounds like a rustls error, and they fixed something in their 0.20.5
release that says
Correct compatbility with servers which return no TLS extensions and take advantage of a special case encoding.
So, maybe this is the issue. We will want to try upgrading async-nats
to a newer version
Reopening this issue as the issue with libcrypto.so is still present, but with a passable workaround. In order to get past this you can install the libssl1.1 compatibility layer on Ubuntu 22.04 and wash up
will work just fine.
For arm64 machines, you can run the following to install wash (you may need to pipe into sudo bash
for packagecloud):
apt update; apt install curl -y
curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh | bash
apt install wash
curl -fLO http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1n-0+deb11u3_arm64.deb
dpkg -i libssl1.1_1.1.1n-0+deb11u3_arm64.deb
wash --help
And for amd64 machines:
apt update; apt install wget -y
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
curl -s https://packagecloud.io/install/repositories/wasmcloud/core/script.deb.sh | bash
apt install wash
Actually, closing in favor of #366 so it can better describe the issue. @rothgar, you should be able to get past the vast majority of your issues above involving libgit, installing on Ubuntu 22, etc
Thanks! It looks like it's working on my system now.
Describe the bug I'm trying to install
wash
on Ubuntu 22.04.01 and having some problems.To Reproduce First I installed with brew
The binary installs properly but throws an error when running
wash up
I installed libssl-dev package via apt to get libcrypto.so but
wash
still failsI then tried installing via apt and I'm getting an error resolving packagecloud (not sure why).
dig
and opening the browser works fine, butapt update
throws an error.I tried via cargo
And I had problems building because I was missing the libz-dev and libgit2-dev packages. I installed both via apt
After install finished I get an error
Expected behavior I expected brew to work or at minimum apt (apt might be my computer/network problems).
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information)