You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Importing Remi GPG key fails with "certificate verify failed" #425
Same here. I can see the public key on rpms.remirepo.net in browser (no cert warnings), and both curl and wget grab it find.
On a lark, I changed the Vagrant box to config.vm.box = "geerlingguy/centos8" and that got me post the Import Remi GPG key, so my assumption is that an updated cert root/chain exists in 8 but not in 7. Unfortunately, this now turns into an error with Install Remi repo; I don't do much node, so guessing the package needed is different.
...and a bit further. After some trial and error, With centos8 and changing the GPG key/Remi repo parts to:
I get to the Check list of running Node.js apps and hit a failure (possibly a typo in my version of the playbook)
TASK [Check list of running Node.js apps.] ********************************************************************************************************************************************
fatal: [nodejs]: FAILED! => {"changed": false, "cmd": "forever list", "msg": "[Errno 2] No such file or directory: b'forever': b'forever'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...and I got it to work. In addition to the changes noted above, I had to tweak the the last two parts to give it a explicit path to forever.
- name: Check list of running Node.js apps.command: "/usr/local/bin/forever list"register: forever_listchanged_when: false
- name: Start example Node.js app.command: "/usr/local/bin/forever start {{ node_apps_location }}/app/app.js"when: "forever_list.stdout.find(node_apps_location + '/app/app.js') == -1"
My discovery phase here was to vagrant ssh into the VM, see that forever was installed and working, guess that it was a path issue (as that is what the error seemed to be). Retry and success.
"Verified" it was working with curl http://nodejs (my dhcp seemed to drop the ".test"...problem for another day) and got "Hello, World." (Sorry, old school so the comma goes in and the bang goes to dot).
Guessing there is a better way to set the path with Ansible, but I have neither gotten that far in Jeff's book (if it's discussed) nor searched on the Ansible site. Will probably poke around tomorrow to see if I can find the "right" way to apply the path. Did verify that the path that Ansible sees does not contain /usr/local/bin with ansible nodesvr -b -a "echo \$PATH"
Reacted by Varun Vats, Tony Dawson and Kami Development
Went down the same path and was able to resolve the repo related issues. Thanks for the pointer to forever's path -- that resolved the last of my remaining issues.
forever is on the vagrant user's path, but not on sudo's path. It was installed globally, but /usr/local/bin is not configured in sudo's secure_path, so sudo cannot find it. I thought this was something that changed from CentOS 7 to CentOS 8, but I checked CentOS 7 and its sudo config also does not have /usr/local/bin in its secure_path. Wonder if this ever worked.
[vagrant@nodejs ~]$ which forever
/usr/local/bin/forever
[vagrant@nodejs ~]$ sudo forever
sudo: forever: command not found
[vagrant@nodejs ~]$
The reason for the "certificate verify failed" error is that OpenSSL version 1.0.2 chooses a wrong (expired) root certificate (more details on this topic can be found here). An easy workaround is to update the packageca-certificates before importing the Remi GPG Key:
The real fix would probably need to be done by @geerlingguy by updating the CentOS7 vagrant box.
The issue about the not found forever command could be caused by your switch to CentOS 8, as the playbook installs forever to /bin/forever on CentOS 7.
Reacted by Petr Dorjin, meic, slawagn, Michael Check, ZQQ, Jeff Geerling and tomdeblende
Activity
kenhia commentedon Oct 16, 2021
Same here. I can see the public key on rpms.remirepo.net in browser (no cert warnings), and both curl and wget grab it find.
On a lark, I changed the Vagrant box to
config.vm.box = "geerlingguy/centos8"and that got me post the Import Remi GPG key, so my assumption is that an updated cert root/chain exists in 8 but not in 7. Unfortunately, this now turns into an error with Install Remi repo; I don't do much node, so guessing the package needed is different....and a bit further. After some trial and error, With centos8 and changing the GPG key/Remi repo parts to:
I get to the Check list of running Node.js apps and hit a failure (possibly a typo in my version of the playbook)
...and I got it to work. In addition to the changes noted above, I had to tweak the the last two parts to give it a explicit path to
forever.My discovery phase here was to
vagrant sshinto the VM, see that forever was installed and working, guess that it was a path issue (as that is what the error seemed to be). Retry and success."Verified" it was working with
curl http://nodejs(my dhcp seemed to drop the ".test"...problem for another day) and got "Hello, World." (Sorry, old school so the comma goes in and the bang goes to dot).Guessing there is a better way to set the path with Ansible, but I have neither gotten that far in Jeff's book (if it's discussed) nor searched on the Ansible site. Will probably poke around tomorrow to see if I can find the "right" way to apply the path. Did verify that the path that Ansible sees does not contain
/usr/local/binwithansible nodesvr -b -a "echo \$PATH"varunvats commentedon Oct 19, 2021
Went down the same path and was able to resolve the repo related issues. Thanks for the pointer to
forever's path -- that resolved the last of my remaining issues.foreveris on thevagrantuser's path, but not onsudo's path. It was installed globally, but/usr/local/binis not configured insudo'ssecure_path, sosudocannot find it. I thought this was something that changed from CentOS 7 to CentOS 8, but I checked CentOS 7 and itssudoconfig also does not have/usr/local/binin itssecure_path. Wonder if this ever worked.CaptainTyphoo commentedon Oct 30, 2021
The reason for the "certificate verify failed" error is that OpenSSL version 1.0.2 chooses a wrong (expired) root certificate (more details on this topic can be found here). An easy workaround is to update the package
ca-certificatesbefore importing the Remi GPG Key:The real fix would probably need to be done by @geerlingguy by updating the CentOS7 vagrant box.
The issue about the not found
forevercommand could be caused by your switch to CentOS 8, as the playbook installsforeverto/bin/foreveron CentOS 7.geerlingguy commentedon Oct 31, 2021
Marking as a bug, this example definitely needs some updating.