Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[<bitnami wordpress multisite>] <bncert-tool errorred while adding a domain a ssl cert. now apache will not start> #1380

Closed
dw2QIS opened this issue Jan 22, 2024 · 11 comments
Assignees
Labels
solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed wordpress

Comments

@dw2QIS
Copy link

dw2QIS commented Jan 22, 2024

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

b58c4f95-22d8-f285-abcf-1b42b0eb0335

bndiagnostic output

===== Begin of bndiagnostic tool output =====

? Apache: Found possible issues
✓ Mariadb: No issues found
? Connectivity: Found possible issues
✓ Wordpress: No issues found
✓ Resources: No issues found
✓ Processes: No issues found
✓ Php: No issues found

bndiagnostic was not useful. Could you please tell us why?

I need more information to determine how to fix the issue

Describe your issue as much as you can

I was attempting to add another domain SSL cert to my bitnami wordpress multisite hosted on aws:lightsail using the bncert-tool. During the execution, I was able to revoke the existing cert. then encountered and error during the new cert being created. I executed the following bncert-tool "sudo /opt/bitnami/bncert-tool --perform_public_ip_validation 0 --perform_dns_validation 0".

@dw2QIS dw2QIS added the tech-issues The user has a technical issue about an application label Jan 22, 2024
@github-actions github-actions bot added the triage Triage is needed label Jan 22, 2024
@gongomgra
Copy link
Collaborator

Hi @dw2QIS,

Can you share with us the error message you got trying to generate the new certificate with both domains?

Apart from that, the only error message I can find in Apache configuration is that the certificate file is missing on your system, but I can't find the filename mentioned in the Apache config on your system. It looks like the .crt file that exists on your system is drcherylolson.com.key. Can you double-check the filename is correct and update the Apache configuration? After that, restart Apache service for changes to take effect

Syntax error on line 5 of /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf:
SSLCertificateFile: file '/opt/bitnami/apache/conf/quantumintsoft.co.crt' does not exist or is empty

@dw2QIS
Copy link
Author

dw2QIS commented Jan 25, 2024

bitnami@ip-172-26-1-58:~$ sudo /opt/bitnami/bncert-tool
Warning: Custom redirections are not supported in the Bitnami package for 
WordPress Multisite. This tool will not be able to enable/disable redirections.
Press [Enter] to continue:
----------------------------------------------------------------------------
Welcome to the Bitnami HTTPS Configuration tool.

----------------------------------------------------------------------------
Domains

Please provide a valid space-separated list of domains for which you wish to 
configure your web server.

Domain list []: topnotch-detailing.com globaldefsecsol.com

The following domains were not included: www.topnotch-detailing.com www.globaldefsecsol.com
. Do you want to add them? [Y/n]: 

Warning: The domain 'topnotch-detailing.com' resolves to a different IP address 
than the one detected for this machine, which is '54.85.113.97'. Please fix its 
DNS entries or remove it. For more info see: 
https://docs.bitnami.com/general/faq/configuration/configure-custom-domain/
Press [Enter] to continue:
----------------------------------------------------------------------------
Domains

Please provide a valid space-separated list of domains for which you wish to 
configure your web server.

Domain list [topnotch-detailing.com globaldefsecsol.com www.topnotch-detailing.com www.glob
aldefsecsol.com]: 

Warning: The domain 'topnotch-detailing.com' resolves to a different IP address 
than the one detected for this machine, which is '54.85.113.97'. Please fix its 
DNS entries or remove it. For more info see: 
https://docs.bitnami.com/general/faq/configuration/configure-custom-domain/

bitnami@ip-172-26-1-58:~$ sudo /opt/bitnami/bncert-tool --perform_public_ip_validation 0 --
perform_dns_validation 0
Warning: Custom redirections are not supported in the Bitnami package for 
WordPress Multisite. This tool will not be able to enable/disable redirections.
Press [Enter] to continue:
----------------------------------------------------------------------------
Welcome to the Bitnami HTTPS Configuration tool.

----------------------------------------------------------------------------
Domains

Please provide a valid space-separated list of domains for which you wish to 
configure your web server.

Domain list []: topnotch-detailing.com globaldefsecsol.com

The following domains were not included: www.topnotch-detailing.com www.globaldefsecsol.com
. Do you want to add them? [Y/n]: Y

----------------------------------------------------------------------------
Changes to perform

The following changes will be performed to your Bitnami installation:

1. Stop web server
2. Configure web server to use a free Let's Encrypt certificate for the domains: 
topnotch-detailing.com globaldefsecsol.com www.topnotch-detailing.com 
www.globaldefsecsol.com
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: topnotch-detailing.com
5. Start web server once all changes have been performed



Do you agree to these changes? [Y/n]: Y

Create a free HTTPS certificate with Let's Encrypt

Please provide a valid e-mail address for which to associate your Let's Encrypt 
certificate.

Domain list: topnotch-detailing.com globaldefsecsol.com 
www.topnotch-detailing.com www.globaldefsecsol.com

Server name: topnotch-detailing.com

E-mail address []: YOUR_EMAIL@YOUR_DOMAIN

The Let's Encrypt Subscriber Agreement can be found at:

https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf

Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: 


----------------------------------------------------------------------------
Performing changes to your installation

The Bitnami HTTPS Configuration Tool will perform any necessary actions to your 
Bitnami installation. This may take some time, please be patient.

/

An error occurred creating certificates with Let's Encrypt:

private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.
2024/01/25 17:09:23 No key found for account 
demetrius.washington2@quantumintsoft.com. Generating a P256 key.
2024/01/25 17:09:23 Saved key to 
/opt/bitnami/letsencrypt/accounts/acme-v02.api.letsencrypt.org/YOUR_EMAIL/keys/YOUR_EMAIL.key
2024/01/25 17:09:24 [INFO] acme: Registering account for 
demetrius.washington2@quantumintsoft.com
2024/01/25 17:09:24 [INFO] [topnotch-detailing.com, globaldefsecsol.com, 
www.topnotch-detailing.com, www.globaldefsecsol.com] acme: Obtaining bundled SAN 
certificate
2024/01/25 17:09:24 [INFO] [globaldefsecsol.com] AuthURL: 
https://acme-v02.api.letsencrypt.org/acme/authz-v3/308041641416
2024/01/25 17:09:24 [INFO] [topnotch-detailing.com] AuthURL: 
https://acme-v02.api.letsencrypt.org/acme/authz-v3/308041641426
2024/01/25 17:09:24 [INFO] [www.globaldefsecsol.com] AuthURL: 
https://acme-v02.api.letsencrypt.org/acme/authz-v3/308041641436
2024/01/25 17:09:24 [INFO] [www.topnotch-detailing.com] AuthURL: 
https://acme-v02.api.letsencrypt.org/acme/authz-v3/308041641446
Press [Enter] to continue:

@dw2QIS
Copy link
Author

dw2QIS commented Jan 26, 2024

Where are the backups of the certs stored? I do not see the cert files (crt, key json) for quantumintsoft.co in the /opt/bitnami/letsencrypt/certificates directory

@gongomgra
Copy link
Collaborator

Hi @dw2QIS,

Thanks for sharing the information. I think you should better resolve the DNS issue than skipping the IP validations. Additionally, try to manually install latest lego tool and try again. If the bncert tool keeps failing, please try the manual approach also present in the guide below.

https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/#step-1-install-the-lego-client

@dw2QIS
Copy link
Author

dw2QIS commented Jan 29, 2024 via email

@gongomgra
Copy link
Collaborator

Hi @dw2QIS,

The bncert tool uses system's getent hosts <domain> command under the hood to verify domain configuration and that it point's to server IP address. Can you manually run that command and verify the results? In case the output is not the expected one, please verify your DNS registries and take into account changes propagation may take up to 72 hours.

Regarding the files generated in the filesystem, notice the lego execution only generates one file, I guess named after the first domain name provided, but it will cover both domains. Please update the Apache config to point to the new filename and restart the service for changes to take effect.

Hope it helps!

@dw2QIS
Copy link
Author

dw2QIS commented Feb 1, 2024 via email

@dw2QIS
Copy link
Author

dw2QIS commented Feb 2, 2024 via email

@gongomgra
Copy link
Collaborator

Hi @dw2QIS,

The instructions in the manual approach are probed to work for other users, including the symlink commands. Can you follow the manual approach completely from scratch? Notice it uses the lego tool directly to generate the certificates instead of bncert. Let's see if you get any error generating the SSL certificates or with Apache configuration.

Once you have finished updating Apache configuration, please run the command below and share the output with us

apachectl -t

In case the configuration is fine, restart the Apache service for changes to take effect.

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Feb 21, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed wordpress
Projects
None yet
Development

No branches or pull requests

3 participants