Repository navigation
Closed
Labels
Milestone
Description
sudo venv/bin/letsencrypt -t --debug -vvvvv
...
2015-10-14 19:36:29,059:DEBUG:letsencrypt.plugins.disco:Other error:(PluginEntryPoint#apache): ('There has been an error in parsing the file (%s): %s', u'/etc/apache2/mods-enabled/ssl.conf', u'Syntax error')
...
I'm not sure ssl.conf has been modified on this system. Anyway:
cat /etc/apache2/mods-enabled/ssl.conf
IfModule mod_ssl.c>
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512
##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##
#
# Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
# Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog exec:/usr/share/apache2/ask-for-passphrase
# Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
# (The mechanism dbm has known memory leaks and should not be used).
#SSLSessionCache dbm:${APACHE_RUN_DIR}/ssl_scache
SSLSessionCache shmcb:${APACHE_RUN_DIR}/ssl_scache(512000)
SSLSessionCacheTimeout 300
# Semaphore:
# Configure the path to the mutual exclusion semaphore the
# SSL engine uses internally for inter-process synchronization.
# (Disabled by default, the global Mutex directive consolidates by default
# this)
#Mutex file:${APACHE_LOCK_DIR}/ssl_mutex ssl-cache
# SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate. See the
# ciphers(1) man page from the openssl package for list of all available
# options.
# Enable only secure ciphers:
SSLCipherSuite HIGH:!aNULL
# SSL server cipher order preference:
# Use server priorities for cipher algorithm choice.
# Clients may prefer lower grade encryption. You should enable this
# option if you want to enforce stronger encryption, and can afford
# the CPU cost, and did not override SSLCipherSuite in a way that puts
# insecure ciphers first.
# Default: Off
#SSLHonorCipherOrder on
# The protocols to enable.
# Available values: all, SSLv3, TLSv1, TLSv1.1, TLSv1.2
# SSL v2 is no longer supported
SSLProtocol all -SSLv3
# Allow insecure renegotiation with clients which do not yet support the
# secure renegotiation protocol. Default: Off
#SSLInsecureRenegotiation on
# Whether to forbid non-SNI clients to access name based virtual hosts.
# Default: Off
#SSLStrictSNIVHostCheck On
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Activity
jdkasten commentedon Oct 15, 2015
@pde You are missing a
<before IfModule.... it should be<IfModule mod_ssl.c>jdkasten commentedon Oct 15, 2015
^ Was this a copy and paste error?
jdkasten commentedon Oct 15, 2015
I haven't tested this out... but if Apache is that relaxed in its handling of configuration files. (Which at this point wouldn't completely surprise me) I think we can probably make the bug report more helpful, by trying to detect what went wrong, but I don't think we should try to autocorrect these errors at this time.
pde commentedon Oct 15, 2015
Sorry, that is a copy and paste error. Re-pasting from this system:
jdkasten commentedon Oct 15, 2015
Related issue: hercules-team/augeas#191
This is a problem with the Httpd lens in Augeas 1.3 -- (I wasn't seeing the problem as I was personally running 1.2). The problem has been resolved in Augeas 1.4
The problem arises when comments are left at the end. For letsencrypt-apache, we might want to disallow Augeas 1.3 as this will certainly be a frequent problem.
The other alternative is not to hard-fail on parsing issues. The client would have still successfully run on the other files in this case and it wouldn't have affected the end result. This would complicate tracking down other bugs later.
pde commentedon Oct 15, 2015
There are likely to be a lot of OSes out there that have this bug, unpatched. Fedora seems to have gone to 1.4 but Ubuntu doesn't have a ticket for this problem.
I presume there's no way for us to work around the issue by feeding in files with the trailing line stripped off?
pde commentedon Oct 15, 2015
Or shipping the lense from 1.4 ourselves? They're just text files, right?
pde commentedon Oct 21, 2015
Apparently we can pass lenses in.
erebus2 commentedon Oct 22, 2015
+1
(sorry have to do this because of isaacs/github#283)
erebus2 commentedon Oct 22, 2015
I think that shipping our own lens would just be a work-around that should be avoided if possible. IMO, the right thing to do would be to depend on augeas-lenses v1.4. This would force distros to fix their augeas packages before they can ship letsencrypt.
See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802665
jdkasten commentedon Oct 22, 2015
@SwartzCr Would you like to take a look at this?
Here is where augeas is initialized right now. We don't automatically load any modules.
https://github.com/letsencrypt/letsencrypt/blob/master/letsencrypt-apache/letsencrypt_apache/augeas_configurator.py#L32
Here is where the Httpd lens is actually loaded. (The lens is added on the first parsing of any Httpd files)
https://github.com/letsencrypt/letsencrypt/blob/master/letsencrypt-apache/letsencrypt_apache/parser.py#L493
pde commentedon Oct 23, 2015
@erebus2 agree it's a workaround, but our primary aim for the time being is to get people working copies of the letsencrypt client, not to persuade distributions to fix old buggy packages. IME the latter can be a painful and thankless task...
8 remaining items
erebus2 commentedon Oct 29, 2015
@SwartzCr Well, I just don't like it because it's a workaround and not an actual fix.
However, due to #1202, we might have to ship our own lens anyway.
SwartzCr commentedon Oct 29, 2015
do we have a lens we want to use or should I just load the httpd lens from Augaes 1.2?
erebus2 commentedon Oct 29, 2015
No, the lens from 1.2 is broken as well. On my machine, it incorrectly detects a syntax error in /etc/nagios/apache2.conf
SwartzCr commentedon Oct 29, 2015
do we have a working lens?
pde commentedon Oct 30, 2015
If we don't, then the best option is to take then lens from 1.4 and start fixing bugs in it :(
SwartzCr commentedon Nov 2, 2015
does anyone have a link to the httpd.lns file from v1.4? All I can find in the tarball is httpd.aug, and for various reasons I can't find a good place to install it to try to rip the lens file from /augeas/load/Httpd/lens
pde commentedon Nov 2, 2015
I believe the .aug files might actually be the lenses? At least those are the files contained in the
augeas-lensesdebian package...domcleal commentedon Nov 3, 2015
The .aug file is the lens, the .lns extension is kind of an internal reference. The file httpd.aug provides the lens Httpd.lns.
If you want to load it in preference to the one in your distribution package, install it to /usr/share/augeas/lenses/, or put it in a directory and then set the environment variable AUGEAS_LENS_LIB. The dir can also be passed as the second argument to the Augeas constructor (
augeas.Augeas(loadpath="/example")).SwartzCr commentedon Nov 3, 2015
@domcleal yup, that's what I've done: https://github.com/SwartzCr/letsencrypt/blob/c0048d7480e7ba8b62baed3bfded465146c85156/letsencrypt-apache/letsencrypt_apache/augeas_configurator.py#L36
SwartzCr commentedon Nov 4, 2015
@domcleal do you have a sense if python augeas will support loadpaths for augeas 1.0? We're finding that Travis is failing for this change because the travis machine runs ubunut 12 which has augeas 1.0
domcleal commentedon Nov 5, 2015
@SwartzCr should be fine, it's had the functionality for years
pde commentedon Nov 6, 2015
Closed by #1291! Great work @SwartzCr, @kuba and @ArchimedesPi !