ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
High
|
Wayne Witzel III | ||
| | 1.21 |
High
|
Wayne Witzel III | ||
| | 1.22 |
High
|
Wayne Witzel III | ||
Bug Description
In a new deploy with MAAS as the provider, juju's rsyslog configuration is unworkable, with machine 0's units unable to connect to its own rsyslogd, due to certificate validation errors:
Here's an excerpt of tail -F /var/log/
==> /var/log/
2015-02-04 05:28:11 INFO juju.worker runner.go:261 start "rsyslog"
2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:86 starting rsyslog worker mode 1 for "unit-neutron-
2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:183 making syslog connection for "juju-unit-
2015-02-04 05:28:11 ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-02-04 05:28:11 INFO juju.worker runner.go:253 restarting "rsyslog" in 3s
==> /var/log/
2015-02-04 05:28:11 INFO juju.worker runner.go:261 start "rsyslog"
2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:86 starting rsyslog worker mode 1 for "unit-openstack
2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:183 making syslog connection for "juju-unit-
2015-02-04 05:28:11 ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-02-04 05:28:11 INFO juju.worker runner.go:253 restarting "rsyslog" in 3s
==> /var/log/
2015-02-04 05:28:14 INFO juju.worker runner.go:261 start "rsyslog"
2015-02-04 05:28:14 DEBUG juju.worker.rsyslog worker.go:86 starting rsyslog worker mode 1 for "unit-neutron-
2015-02-04 05:28:14 DEBUG juju.worker.rsyslog worker.go:183 making syslog connection for "juju-unit-
2015-02-04 05:28:14 ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-02-04 05:28:14 INFO juju.worker runner.go:253 restarting "rsyslog" in 3s
==> /var/log/
2015-02-04 05:28:14 INFO juju.worker runner.go:261 start "rsyslog"
2015-02-04 05:28:14 DEBUG juju.worker.rsyslog worker.go:86 starting rsyslog worker mode 1 for "unit-openstack
2015-02-04 05:28:14 DEBUG juju.worker.rsyslog worker.go:183 making syslog connection for "juju-unit-
2015-02-04 05:28:14 ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-02-04 05:28:14 INFO juju.worker runner.go:253 restarting "rsyslog" in 3s
==> /var/log/
2015-02-04 05:28:17 INFO juju.worker runner.go:261 start "rsyslog"
2015-02-04 05:28:17 DEBUG juju.worker.rsyslog worker.go:86 starting rsyslog worker mode 1 for "unit-neutron-
2015-02-04 05:28:17 DEBUG juju.worker.rsyslog worker.go:183 making syslog connection for "juju-unit-
2015-02-04 05:28:17 ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-02-04 05:28:17 INFO juju.worker runner.go:253 restarting "rsyslog" in 3s
==> /var/log/
2015-02-04 05:28:17 INFO juju.worker runner.go:261 start "rsyslog"
2015-02-04 05:28:17 DEBUG juju.worker.rsyslog worker.go:86 starting rsyslog worker mode 1 for "unit-openstack
2015-02-04 05:28:17 DEBUG juju.worker.rsyslog worker.go:183 making syslog connection for "juju-unit-
2015-02-04 05:28:17 ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-02-04 05:28:17 INFO juju.worker runner.go:253 restarting "rsyslog" in 3s
| Paul Gear (paulgear) wrote : | #1 |
| Paul Gear (paulgear) wrote : | #2 |
Here is the record of a manual attempt to connect to the machine 0 rsyslogd:
root@juju-
CONNECTED(00000003)
depth=0 O = juju, CN = *
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 O = juju, CN = *
verify error:num=
verify return:1
depth=0 O = juju, CN = *
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/O=juju/CN=*
i:/O=
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDSDCCArOgAwI
MDIGA1UEAwwranV
bG9nIjAeFw0xNTA
BGp1anUxCjAIBgN
52wcKtCLnVY8goq
KEdOzNRSgsaShFK
H5wPSJEZklm228j
HQ8BAf8EBAMCAKg
mL1e+9dnPJBGKYH
MIIBBwYDVR0RBIH
aWVuYWgubGN5MDM
ggEqhwQKMQQBhxD
gAAAAAAAAJ6Omf/
ZN2QhxD+
APTGKf/
ZGaj7j0rFSUBzz7
TiHkf0pEXGLR+
RGrddPFwJG7rKnx
-----END CERTIFICATE-----
subject=
issuer=
---
Acceptable client certificate CA names
/O=juju/
/O=juju/
---
SSL handshake has read 1295 bytes and written 547 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA256
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : AES256-SHA256
Session-ID: D057E1CB11EA37C
Session-ID-ctx:
Master-Key: E5F761603E97CE6
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1423028794
Timeout : 300 (sec)
Verify return code: 21 (unable to verify the first certificate)
---
^C
root@juju-
| Paul Gear (paulgear) wrote : | #3 |
Here's the openssl dump of ca-cert.pem:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: sha1WithRSAEncr
Issuer: O=juju, CN=juju-generated CA for environment "rsyslog"
Validity
Not Before: Jan 28 05:24:43 2015 GMT
Not After : Feb 4 05:24:43 2025 GMT
Subject: O=juju, CN=juju-generated CA for environment "rsyslog"
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
X509v3 extensions:
X509v3 Key Usage: critical
X509v3 Basic Constraints: critical
X509v3 Subject Key Identifier:
X509v3 Authority Key Identifier:
Signature Algorithm: sha1WithRSAEncr
08:9e
Here's the corresponding dump of rsyslog-cert.pem:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: sha1WithRSAEncr
Issuer: O=juju, CN=juju-generated CA for environment "rsyslog"
Validity
Not Before: Jan 28 05:01:18 2015 GMT
Not After : Feb 4 05:01:17 2025 GMT
Subject: O=juju, CN=*
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
| Paul Gear (paulgear) wrote : | #4 |
I neglected to mention earlier that these problems were showing up on juju-core 1.21.1-
I tried again with the same environment on juju-core 1.20.14-
root@rasalhague
CONNECTED(00000003)
depth=1 O = juju, CN = juju-generated CA for environment \"rsyslog\"
verify return:1
depth=0 O = juju, CN = *
verify return:1
---
Certificate chain
0 s:/O=juju/CN=*
i:/O=
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICOTCCAaSgAwI
MDIGA1UEAwwranV
bG9nIjAeFw0xNTA
BGp1anUxCjAIBgN
sdX50hAu67zJXx3
Ygl5I1mR4IPvU8f
Hh+CK8uzJ4z9D+
/wQEAwIAqDATBgN
Vhl0CCdbD5tcDW8
KoZIhvcNAQEFA4G
3mehJEzGNYZV365
LbQJlmkGKNy5RIG
-----END CERTIFICATE-----
subject=
issuer=
---
Acceptable client certificate CA names
/O=juju/
/O=juju/
---
SSL handshake has read 1120 bytes and written 547 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA256
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : AES256-SHA256
Session-ID: CA6FCBCD53F11C8
Session-ID-ctx:
Master-Key: AA3880BEB10E8EE
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1423031626
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
^C
root@rasalhague
| tags: | added: regression |
| tags: |
added: canonical-bootstack removed: regression |
| tags: | added: regression |
| Changed in juju-core: | |
| assignee: | nobody → Wayne Witzel III (wwitzel3) |
| tags: | added: logging |
| Changed in juju-core: | |
| status: | New → Triaged |
| importance: | Undecided → High |
| milestone: | none → 1.23 |
| Wayne Witzel III (wwitzel3) wrote : | #5 |
Hey Paul,
Can you give me the bootstrap and deploy commands you've used for this environment? I'm having issues replicating the behavior.
| Wayne Witzel III (wwitzel3) wrote : | #6 |
FROM IRC: deploy command is 'juju bootstrap --constraints "tags=bootstrap" --upload-tools --show-log --debug'
| Dimiter Naydenov (dimitern) wrote : | #7 |
Why is this targeted to 1.21, but the milestone is 1.22-beta3? It's also targeted to 1.22 and the milestone there is also 1.22-beta3. I've changed the 1.21 milestone to 1.21.3 not to block the already ready to release 1.21.2.
| Wayne Witzel III (wwitzel3) wrote : | #8 |
Despite my best efforts I am unable to reproduce this error.
I'm using MAAS 1.7.0 with any of the Juju branches listed as also being affected.
I've asked another Juju dev with a mass setup to attempt to reproduce the error.
Would it be possible to get access to the environment that the error is happening on?
| Michael Foord (mfoord) wrote : | #9 |
I can't reproduce either. (Latest MAAS, juju trunk.)
| Wayne Witzel III (wwitzel3) wrote : Re: [Bug 1417875] Re: ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate signed by unknown authority | #10 |
Ok, good to know it isn't just me, thanks Michael.
On Wed, Feb 11, 2015 at 6:05 AM, Michael Foord <email address hidden>
wrote:
> I can't reproduce either. (Latest MAAS, juju trunk.)
>
> --
> You received this bug notification because you are a bug assignee.
> https:/
>
> Title:
> ERROR juju.worker runner.go:219 exited "rsyslog": x509: certificate
> signed by unknown authority
>
> Status in juju-core:
> Triaged
> Status in juju-core 1.21 series:
> Triaged
> Status in juju-core 1.22 series:
> Triaged
>
> Bug description:
> In a new deploy with MAAS as the provider, juju's rsyslog
> configuration is unworkable, with machine 0's units unable to connect
> to its own rsyslogd, due to certificate validation errors:
>
> Here's an excerpt of tail -F /var/log/
>
> ==> /var/log/
> 2015-02-04 05:28:11 INFO juju.worker runner.go:261 start "rsyslog"
> 2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:86 starting
> rsyslog worker mode 1 for "unit-neutron-
> 2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:183 making
> syslog connection for "juju-unit-
> 2015-02-04 05:28:11 ERROR juju.worker runner.go:219 exited "rsyslog":
> x509: certificate signed by unknown authority (possibly because of
> "crypto/rsa: verification error" while trying to verify candidate authority
> certificate "juju-generated CA for environment \"rsyslog\"")
> 2015-02-04 05:28:11 INFO juju.worker runner.go:253 restarting "rsyslog"
> in 3s
>
> ==> /var/log/
> 2015-02-04 05:28:11 INFO juju.worker runner.go:261 start "rsyslog"
> 2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:86 starting
> rsyslog worker mode 1 for "unit-openstack
> 2015-02-04 05:28:11 DEBUG juju.worker.rsyslog worker.go:183 making
> syslog connection for "juju-unit-
> 2015-02-04 05:28:11 ERROR juju.worker runner.go:219 exited "rsyslog":
> x509: certificate signed by unknown authority (possibly because of
> "crypto/rsa: verification error" while trying to verify candidate authority
> certificate "juju-generated CA for environment \"rsyslog\"")
> 2015-02-04 05:28:11 INFO juju.worker runner.go:253 restarting "rsyslog"
> in 3s
>
> ==> /var/log/
> 2015-02-04 05:28:14 INFO juju.worker runner.go:261 start "rsyslog"
> 2015-02-04 05:28:14 DEBUG juju.worker.rsyslog worker.go:86 starting
> rsyslog worker mode 1 for "unit-neutron-
> 2015-02-04 05:28:14 DEBUG juju.worker.rsyslog worker.go:183 making
> syslog connection for "juju-unit-
> 2015-02-04 05:28:14 ERROR juju.worker runner.go:219 exited "rsyslog":
> x509: certificate signed by unknown authority (possibly because of
> "crypto/rsa: verification error" while trying to verify candidate authority
> certificate "juju-generated CA for environment \"rsyslog\"")
> 2015-02-04 05:28:14 INFO juju.worker runner.go:253 restarting "rsyslog"
> in 3s
>
> ==> /var/log/
> 2015-02-04 05:28:14 IN...
| Wayne Witzel III (wwitzel3) wrote : | #11 |
Was able to reproduce the issue. The certificates are only a problem when you use ensure-
Solution is to ensure that all bootstrap nodes share the master nodes rsyslog-cert.pem and rsyslog-key.pem files.
| Changed in juju-core: | |
| status: | Triaged → In Progress |
| Wayne Witzel III (wwitzel3) wrote : | #12 |
After further investigation it looks like my previous statement is incorrect. We call composeTLS during the connect to the remote rsyslog, passing in the ca-cert.pem to generate the client cert for the connection. We do this on the fly.
In replaceRemoteLogger we have a range that loops over all of the StateServerAddr
| Wayne Witzel III (wwitzel3) wrote : | #13 |
A manual work around:
After running ensure-availability one of the state machines will have a set of certificates that works for connecting.
Using the juju ssh command and the openssl command we can determine which state machine has the "good" certificates:
juju ssh 0
openssl s_client -connect 01-current-
Continue with the other state servers until you find the one that returns the OK response for the openssl command. Copy the rsyslog-*.pem certs from that state server to the /var/log/juju folder of the other state servers and restart their respective rsyslog services.
| Wayne Witzel III (wwitzel3) wrote : | #14 |
There is a fix ready to merge here: https:/
It is currently blocked by CI waiting on fixes for lp:1421687 and lp:1421606
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |
| Changed in juju-core: | |
| milestone: | 1.23 → 1.23-beta1 |
| Max (speransky) wrote : | #15 |
Getting something similar to this bug while trying to install openstack-base bundle on clean MAAS environment.
JUJU version 1.24.6-trusty-amd64
status on this units report hook failed
units:
nova-
current: error
message: 'hook failed: "cloud-
since: 22 Oct 2015 15:54:39-06:00
current: idle
since: 22 Oct 2015 15:54:39-06:00
version: 1.24.7
machine: 3/lxc/1
open-ports:
- 3333/tcp
- 8773/tcp
- 8774/tcp
- 9696/tcp
and logs full of this:
2015-10-22 21:37:34 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:38 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:41 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:45 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:48 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:51 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:56 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:37:59 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "juju-generated CA for environment \"rsyslog\"")
2015-10-22 21:38:03 ERROR juju.worker runner.go:223 exited "rsyslog": x509: certificate signed by unknown authority (possibl...
| Cheryl Jennings (cherylj) wrote : | #16 |
speransky - do you have DEBUG logs for this? There's a new bug, bug #1491688, that's opened for this problem on 1.24.5+ and we didn't get enough data to debug the issue. If you have DEBUG logs, can you add them to bug #1491688?
| Max (speransky) wrote : | #17 |
Can't reproduce on 1.24.7-


This may be a duplicate or related issue to bug 1387388.