Comments (2)
hi,
I tried to add debug .. and added to ./lib/puppet_x/consul/acl_base.rb
module PuppetX::Consul::ACLBase
class BaseClient
def initialize(hostname, port, protocol, api_token = nil)
@global_uri = URI("#{protocol}://#{hostname}:#{port}/v1/acl")
@http_client = Net::HTTP.new(@global_uri.host, @global_uri.port)
@http_client.use_ssl = true if @global_uri.instance_of? URI::HTTPS
@api_token = api_token
puts @global_uri
end
...
to see, what is called .. and the printed URL is correct .. than I tried to use the Ruby from Puppet ..
require "net/https"
require "uri"
uri = URI.parse("https://linode-ffm-hashi-server-01.sandbox.example.com:8501/v1/acl")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
puts response.body
and the output:
Traceback (most recent call last):
6: from /root/test.ry:11:in `<main>'
5: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:1458:in `request'
4: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:909:in `start'
3: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
2: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/http.rb:985:in `connect'
1: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError)
which is exactly the same .. I get with Puppet :-)
Consul config has:
"ca_file": "/etc/ssl/acme/fullchain.pem",
"cert_file": "/etc/ssl/acme/fullchain.pem",
"key_file": "/etc/ssl/acme/privkey.pem"
after playing a lot .. and searching .. I've found the root cause: Puppet 6 on Debian brings
/opt/puppetlabs/puppet/bin/ruby -v
ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux]
So, I've upgraded to Puppet7
root@linode-ffm-hashi-server-01:[/etc/apt/sources.list.d]: /opt/puppetlabs/puppet/bin/ruby -v
ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [x86_64-linux]
and ...
root@linode-ffm-hashi-server-01:[/etc/apt/sources.list.d]: /opt/puppetlabs/puppet/bin/ruby /root/test.ry
Invalid URL path: not a recognized HTTP API endpoint
Success !
Now, also Puppet runs fine and does not drop anymore issues.
from puppet-consul.
Upgrading from Puppet6 to Puppet7 fixed the issue with LetsEncrypt certificates.
from puppet-consul.
Related Issues (20)
- Drop EoL Amazon Linux support
- Drop EoL Fedora 25/26/27 support
- Drop EoL FreeBSD 10 support
- Drop support for old SLES/SLED versions
- Drop support for EoL Puppet 5
- Migrate from master to main HOT 2
- migrate module to Vox Pupuli? HOT 6
- Module Release?
- RFC: refactor to include official hashicorp package repos HOT 1
- Systemd service does't work for 'package' install_method HOT 6
- RFC: change dependency camp2camp/systemd module to voxpupuli/systemd
- legacy ACL v1 no longer working starting from Consul version 1.11 HOT 9
- Add ability to manage consul log directory HOT 1
- Status of the project HOT 1
- alternative commands to Consul Reload
- module doesn't support grpc checks
- systemd Failed to parse service type, ignoring: exec
- How to access the secret_id of tokens HOT 1
- Allow to not restart consul when updating the binary
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-consul.