Debian 9 "wget, curl, fetch, perl, or python not found on this instance"
Closed this issue · 4 comments
Describe the problem
I have a fresh Debian 9 VM and I'm tying to bootstrap it but it fails because none of the tools to download the chef deb package are available.
One of the required tool to download the installer should be installed automatically in order to avoid this error, and be able to fully automatise bootstrapping a new node.
Second point: the script should really abort and not try to run chef-client
in this case, but that's not a real issue.
Software Version
I'm using Chef Workstation 0.4.2 with the Stable channel, coupled with knife-zero.
Replication Case
Have a Linux box without any of the tools installed and try to bootstrap it.
Stacktrace
Bootstrapping logs
-----> Installing Chef Omnibus (stable/15)
downloading https://omnitruck.chef.io/chef/install.sh
to file /tmp/install.sh.904/install.sh
trying wget...
trying perl...
>>>>>> wget, curl, fetch, perl, or python not found on this instance.
DEBUG OUTPUT FOLLOWS:
STDERR from wget:
--2019-08-13 07:33:50-- https://omnitruck.chef.io/chef/install.sh
Resolving omnitruck.chef.io (omnitruck.chef.io)... 151.101.14.110
Connecting to omnitruck.chef.io (omnitruck.chef.io)|151.101.14.110|:443... connected.
ERROR: The certificate of ‘omnitruck.chef.io’ is not trusted.
ERROR: The certificate of ‘omnitruck.chef.io’ hasn't got a known issuer.
STDERR from perl:
Can't locate LWP/Simple.pm in @INC (you may need to install the LWP::Simple module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Starting the first Chef Infra Client Client run...
sh: 271: chef-client: not found
Possible Solution
Omnitruck should install curl
or wget
in the case it doesn't exist.
I disagree with the proposition.
An install script should not install other tools on its own.
Now your issue is that your machine has wget, but the ssl connection fail. I can think of only two reasons:
- There's no truststore in your machine or it is outdated
- You have a transparent proxy doing ssl interception and its CA cert is unknown from the machine.
Any resolution of this automagically is likely to clash with someone else security process and should be done as prerequisite but not automatically by the install script.
Now your issue is that your machine has wget
Sorry, but no I don't have wget
. As I said :
[...] none of the tools to download the chef deb package are available.
An install script should not install other tools on its own.
Can you please elaborate ?
I just look at the bootstrap logs again, and actually you are right, I have wget
on the box.
What confused me what the following message:
wget, curl, fetch, perl, or python not found on this instance
There's no truststore in your machine or it is outdated
I guess that the reason because I'm then installing curl
and as I'm doing apt-get update
, the install command should update the truststore which then solve the initial issue 🤔.
Yeah there needs to be one of these tools available in the base image. The expectations are very minimal, and this script is not responsible for solving them.