Install SSL issue

Show:
certbot certificates

[root@localhost conf.d]# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log


No certs found.

[root@localhost conf.d]#

below
ServerName www.sonicfiber.pk
add
ServerAlias sonicfiber.pk
then restart apache
then try:
certbot --apache -d sonicfiber.pk -d www.sonicfiber.pk

[root@localhost conf.d]# certbot --apache -d sonicfiber.pk -d www.sonicfiber.pk
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for sonicfiber.pk
http-01 challenge for www.sonicfiber.pk
Waiting for verification…
Cleaning up challenges
An unexpected error occurred:
AttributeError: ‘module’ object has no attribute ‘detect’
Please see the logfiles in /var/log/letsencrypt for more details.
[root@localhost conf.d]#

ERROR LOGS :

replay-nonce: K6otP-IkQPl1lHcOn8sLty6bhHURiQUJiZVCxHRxxAE

MIIGGDCCBQCgAwIBAgISA5Mk1BoTdY0gQdig0AZSL6qaMA0GCSqGSIb3DQEBCwUAMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQDExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xODA1MDgwNzUyMzhaFw0xODA4MDYwNzUyMzhaMBgxFjAUBgNVBAMTDXNvbmljZmliZXIucGswggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgz4cjMiMqnjnwMq2gWAIebsnN6tvXMLhe2nDFY489Rr8/TSN0olYIK78ODHuDEvhqc5U5MIO96poU3iIFseZhn6BqKRHeCZsp6Ym69YvOsu8208/MpYgvWLmyw3gZdBGk1fIR7u0IVumRHF3WOKyGqfzfw515rcScXB48DfgfUxcDepFdtxu7E1QCTzINYdj/oZl1bbjc6uA5xMVbotpfd//oxy4FLt0Bb3LNqAM+KLES4otpGlICCtwkgdMvsMvPukUZFONLU1lGA146Ws46fn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aQo21NPhgkyoXoadeR5wKu/JDCLIh5J+AiBCNU76T5rNUw+MZZX3y25vawX5zf/KP+YiNJHR242w3zANBgkqhkiG9w0BAQsFAAOCAQEAHwDjDu5emypaonEEFdA0akEJdttBwd4DYH8opnVUz24wFe9xQVlp0z4pdfMQRGEnS3BZexwaj2qjRmxKBOspZwFZ5LP8aQDo3rFR5GzWiIutapYgTmyx9+ObWJEzVqIl7FVakreOgHor5CNGEaeK0WK+Gvswuzmw6xlPlr4UPGijMUQk6liWkKwfbxSHpjtvOvgajdoMcvbz/255+tag45WDPbtBCWCr2n1B/O6gTv26m2rRUDZkfvfILz4IUjR++paYg4TeI3mR1KfqE5qMUauzTn6Zs/y0DtJAhJS7BzuXiJ57rn+rVe/gK1C4rqUodpOebQHnGwTdxqYpeXefJw==
2018-05-08 13:51:15,101:DEBUG:acme.client:Storing nonce: K6otP-IkQPl1lHcOn8sLty6bhHURiQUJiZVCxHRxxAE
2018-05-08 13:51:15,101:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File “/usr/bin/certbot”, line 9, in
load_entry_point(‘certbot==0.23.0’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python2.7/site-packages/certbot/main.py”, line 1266, in main
return config.func(config, plugins)
File “/usr/lib/python2.7/site-packages/certbot/main.py”, line 1031, in run
certname, lineage)
File “/usr/lib/python2.7/site-packages/certbot/main.py”, line 118, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File “/usr/lib/python2.7/site-packages/certbot/client.py”, line 350, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File “/usr/lib/python2.7/site-packages/certbot/client.py”, line 310, in obtain_certificate
cert, chain = self.obtain_certificate_from_csr(csr, orderr)
File “/usr/lib/python2.7/site-packages/certbot/client.py”, line 265, in obtain_certificate_from_csr
orderr = self.acme.finalize_order(orderr, deadline)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 796, in finalize_order
orderr.authorizations)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 373, in request_issuance
headers={‘Accept’: content_type})
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 90, in _post
return self.net.post(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 1069, in post
return self._post_once(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 1083, in _post_once
return self._check_response(response, content_type=content_type)
File “/usr/lib/python2.7/site-packages/acme/client.py”, line 929, in _check_response
jobj = response.json()
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 802, in json
return json.loads(self.text, **kwargs)
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 765, in text
encoding = self.apparent_encoding
File “/usr/lib/python2.7/site-packages/requests/models.py”, line 640, in apparent_encoding
return chardet.detect(self.content)[‘encoding’]
AttributeError: ‘module’ object has no attribute ‘detect’
2018-05-08 13:51:15,103:ERROR:certbot.log:An unexpected error occurred:

Since you have no certs and certbot is throwing up errors.
I would uninstall certbot
then
reinstall certbot
and try again (as root):
certbot --apache -d sonicfiber.pk -d www.sonicfiber.pk

same errot dear … ?

=====================================================================================================================================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 236 k
Installed size: 871 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): certbot-0.23.0-1.el7.noarch.rpm | 21 kB 00:00:00
(2/2): python2-certbot-apache-0.23.0-1.el7.noarch.rpm | 215 kB 00:00:04

Total 52 kB/s | 236 kB 00:00:04
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : certbot-0.23.0-1.el7.noarch 1/2
SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.30, searching for an older version.
SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.30: No such file or directory
/sbin/load_policy: Can’t load policy: No such file or directory
libsemanage.semanage_reload_policy: load_policy returned error code 2. (No such file or directory).
SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.30, searching for an older version.
SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.30: No such file or directory
/sbin/load_policy: Can’t load policy: No such file or directory
libsemanage.semanage_reload_policy: load_policy returned error code 2. (No such file or directory).
OSError: No such file or directory
Installing : python2-certbot-apache-0.23.0-1.el7.noarch 2/2
Verifying : certbot-0.23.0-1.el7.noarch 1/2
Verifying : python2-certbot-apache-0.23.0-1.el7.noarch 2/2

Installed:
python2-certbot-apache.noarch 0:0.23.0-1.el7

Dependency Installed:
certbot.noarch 0:0.23.0-1.el7

Complete!
[root@localhost conf.d]# certbot --apache -d sonicfiber.pk -d www.sonicfiber.pk
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for sonicfiber.pk
http-01 challenge for www.sonicfiber.pk
Waiting for verification…
Cleaning up challenges
An unexpected error occurred:
AttributeError: ‘module’ object has no attribute ‘detect’
Please see the logfiles in /var/log/letsencrypt for more details.
[root@localhost conf.d]#

Do:
apt update
Show:
apt list --upgradeable

boss i am using centos 7 .

ok show the list that can be upgraded
apt upgrade
?

At least do:
apt update
then reinstall certbot

Cleaning up list of fastest mirrors
[root@localhost conf.d]# yum check-update
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 6.2 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/7): base/7/x86_64/group_gz | 156 kB 00:00:00
(2/7): extras/7/x86_64/primary_db | 185 kB 00:00:00
(3/7): base/7/x86_64/primary_db | 5.7 MB 00:00:00
(4/7): updates/7/x86_64/primary_db | 6.9 MB 00:00:00
(5/7): epel/x86_64/group_gz | 266 kB 00:00:02
(6/7): epel/x86_64/updateinfo | 919 kB 00:00:31
(7/7): epel/x86_64/primary_db | 6.4 MB 00:00:53
Determining fastest mirrors

  • base: mirrors.ges.net.pk
  • epel: kartolo.sby.datautama.net.id
  • extras: mirrors.ges.net.pk
  • updates: mirrors.ges.net.pk
    [root@localhost conf.d]# yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
  • base: mirrors.ges.net.pk
  • epel: kartolo.sby.datautama.net.id
  • extras: mirrors.ges.net.pk
  • updates: mirrors.ges.net.pk
    No packages marked for update
    [root@localhost conf.d]#

I as thinking the underlying Python version is off a bit.
I think certbot requires 2.7
But if there are no updates…

Can you try certbot-auto ?

Before that, did you follow these install instructions:

[root@localhost conf.d]# certbot-auto --apache
-bash: certbot-auto: command not found
[root@localhost conf.d]#

certbot-auto is a separate program.
you have to install it

one note about certbot-auto: unlike certbot, certbot-auto should be run from the installed location (don’t ask me why)
So don’t call it by /some/location/certbot-auto
cd to where it is
then ./certbot-auto …

hi

its take too much time dear …

[root@localhost tmp]# wget -4 https://dl.eff.org/certbot-auto
–2018-05-08 15:10:11-- https://dl.eff.org/certbot-auto
Resolving dl.eff.org (dl.eff.org)… 151.101.120.201
Connecting to dl.eff.org (dl.eff.org)|151.101.120.201|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 62854 (61K) [application/octet-stream]
Saving to: ‘certbot-auto.1’

100%[===========================================================================================================================================================>] 62,854 253KB/s in 0.2s

2018-05-08 15:10:11 (253 KB/s) - ‘certbot-auto.1’ saved [62854/62854]

[root@localhost tmp]# chmod a+x certbot-auto
[root@localhost tmp]# ./certbot-auto --apache

certbot-auto.1 ???
ls -l certbot*

Please don't refer to me with, nor as "dear"

[root@www tmp]# ls -l certbot*
-rwxr-xr-x 1 root root 62854 May 3 00:25 certbot-auto
-rw-r–r-- 1 root root 62854 May 3 00:25 certbot-auto.1
[root@www tmp]#

ok you got it twice
just delete the certbot-auto.1 file

[root@localhost tmp]# ./certbot-auto --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?

1: sonicfiber.pk
2: www.sonicfiber.pk

Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for sonicfiber.pk
http-01 challenge for www.sonicfiber.pk
Waiting for verification…
Cleaning up challenges
An unexpected error occurred:
There were too many requests of a given type :: Error creating new cert :: too many certificates already issued for exact set of domains: sonicfiber.pk,www.sonicfiber.pk: see https://letsencrypt.org/docs/rate-limits/
Please see the logfiles in /var/log/letsencrypt for more details.
[root@localhost tmp]#

Try:
./certbot-auto --apache -d sonicfiber.pk -d www.sonicfiber.pk

[root@localhost tmp]# ./certbot-auto --apache -d sonicfiber.pk -d www.sonicfiber.pk
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for sonicfiber.pk
http-01 challenge for www.sonicfiber.pk
Waiting for verification…
Cleaning up challenges
An unexpected error occurred:
There were too many requests of a given type :: Error creating new cert :: too many certificates already issued for exact set of domains: sonicfiber.pk,www.sonicfiber.pk: see https://letsencrypt.org/docs/rate-limits/
Please see the logfiles in /var/log/letsencrypt for more details.
[root@localhost tmp]#