LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-30-2021, 07:26 AM   #1
awaismalik
Member
 
Registered: Mar 2021
Posts: 50

Rep: Reputation: Disabled
how to symlink


During the migration of webserver i copied the letsencrypt file to new web server. after running the command 'certbot renew --dry-run' i am getting following error.

# certbot renew --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/website.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/renewal.py", line 68, in _reconstitute
renewal_candidate = storage.RenewableCert(full_path, config)
File "/usr/lib/python3/dist-packages/certbot/storage.py", line 463, in __init__
self._check_symlinks()
File "/usr/lib/python3/dist-packages/certbot/storage.py", line 522, in _check_symlinks
"expected {0} to be a symlink".format(link))
certbot.errors.CertStorageError: expected /etc/letsencrypt/live/website.com/cert.pem to be a symlink
Renewal configuration file /etc/letsencrypt/renewal/website.com.conf is broken. Skipping.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/www.website.fr.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/renewal.py", line 68, in _reconstitute
renewal_candidate = storage.RenewableCert(full_path, config)
File "/usr/lib/python3/dist-packages/certbot/storage.py", line 463, in __init__
self._check_symlinks()
File "/usr/lib/python3/dist-packages/certbot/storage.py", line 522, in _check_symlinks
"expected {0} to be a symlink".format(link))
certbot.errors.CertStorageError: expected /etc/letsencrypt/live/www.website.fr/cert.pem to be a symlink
Renewal configuration file /etc/letsencrypt/renewal/www.website.fr.conf is broken. Skipping.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates below have not been saved.)

No renewals were attempted.

Additionally, the following renewal configurations were invalid:
/etc/letsencrypt/renewal/website.com.conf (parsefail)
/etc/letsencrypt/renewal/www.website.fr.conf (parsefail)
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates above have not been saved.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 renew failure(s), 2 parse failure(s)
root@h2945112:~# certbot update_symlinks
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Expected /etc/letsencrypt/live/website.com/cert.pem to be a symlink

I know that symlink can be done by 'ln -sf' but i do not know what should be in source file and symlink file ?

ln -s source_file symbolic_link
 
Old 07-30-2021, 07:52 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

With letsebcrypt, everything under /etc/letsencrypt/live/website.com/ is symlinked to the latest certs located in /etc/letsencrypt/archive/website.com.
So if you want to renew your certificate(s), delete everything under /etc/letsencrypt/live/website.com/, run certbot and let it fetch the newer certs and create the necessary symlinks.

Regards
 
Old 07-30-2021, 08:14 AM   #3
awaismalik
Member
 
Registered: Mar 2021
Posts: 50

Original Poster
Rep: Reputation: Disabled
Thanks. I found the same solution here https://charles-stover.medium.com/fi...l-1e7718f8a492
 
  


Reply

Tags
migration, symlink, symlinks, webserver



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] symlink to symlink confusion, Reprovo Linux - Newbie 2 11-18-2014 02:17 PM
Question How to get stat() of symlink and not of target of symlink ? ronbarak Programming 3 11-08-2010 12:14 PM
Symlink Nightmare!! Help NightSky Slackware 1 05-19-2002 07:42 AM
create symlink with an option,e.g. gunzip & gzip,how? l_9_l Linux - General 1 05-15-2002 03:59 AM
using autofs to effectively symlink to an existing filesystem unsteady Linux - General 0 04-12-2001 09:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration