Victor Hooi
2015-09-03 03:43:33 UTC
I'm running InfluxDB on OSX, which I have working with HTTP. I'm now trying
to enable SSL for both 8083 and 8086, using a self-signed certificate.
I'm following the following guide to generate a self-signed PEM file:
https://msol.io/blog/tech/2014/09/30/create-a-self-signed-ssl-certificate-with-openssl/
Specifically, the commands are:
openssl genrsa -out key.pem 2048
this, since this a local test):
-----BEGIN CERTIFICATE-----
[admin]
influxd -config /usr/local/etc/influxdb.conf
InfluxDB isn't liking this particular format somehow - any thoughts?
Thanks,
Victor
to enable SSL for both 8083 and 8086, using a self-signed certificate.
I'm following the following guide to generate a self-signed PEM file:
https://msol.io/blog/tech/2014/09/30/create-a-self-signed-ssl-certificate-with-openssl/
Specifically, the commands are:
openssl genrsa -out key.pem 2048
openssl req -new -key key.pem -out csr.pem
openssl req -x509 -days 365 -key key.pem -in csr.pem -out certificate.pem
This is the contents of my certificate.pem (I don't have any issues pastingopenssl req -x509 -days 365 -key key.pem -in csr.pem -out certificate.pem
this, since this a local test):
-----BEGIN CERTIFICATE-----
MIIDoDCCAoigAwIBAgIJAMn2Y4OQRukTMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNV
BAYTAkFVMQwwCgYDVQQIEwNOU1cxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
UHR5IEx0ZDAeFw0xNTA5MDMwMzM2NDRaFw0xNjA5MDIwMzM2NDRaMD4xCzAJBgNV
BAYTAkFVMQwwCgYDVQQIEwNOU1cxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
UHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKqVTtsPLURL
cjXWgqYeiao+rXEmqpUMlBbcHsFp7H7cmJGCOBtpYDncm1wAJ3QsKxHg+rt5LXWf
j/7MpDxTsOxNdZyBBSVicaKtHWnqFFDu6D0BWrmW2Zzw4Bu+Xmoy+eSYgxJR9DCv
O8DsgSo+UR41DGhGYrlsxmdv21OxTE7IlUuQmCVCpiIC65+mSzG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UMlBbcHsFp7H7cmJGCOBtpYDncm1wAJ3QsKxHg+rt5LXWf
j/7MpDxTsOxNdZyBBSVicaKtHWnqFFDu6D0BWrmW2Zzw4Bu+Xmoy+eSYgxJR9DCv
O8DsgSo+UR41DGhGYrlsxmdv21OxTE7IlUuQmCVCpiIC65+mSzGhSS87wPkakm2P
hDXzsJvX8yDK67/hNXLWAZn6lpsupOjLoG0MhPV7GchYS4HN+f+QO8UiJhoa59uV
Nhz5K7Kd47ymeZJPd2qYZRQSs/jpFx3o1GZMUr9ViWK4RRs2DovmmBlFkLf3E47z
XUm4Q3sJ8qECAwEAAaOBoDCBnTAdBgNVHQ4EFgQU2DI6wxURUk/fIbHDBAXPngtW
PqswbgYDVR0jBGcwZYAU2DI6wxURUk/fIbHDBAXPngtWPquhQqRAMD4xCzAJBgNV
BAYTAkFVMQwwCgYDVQQIEwNOU1cxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
UHR5IEx0ZIIJAMn2Y4OQRukTMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
ggEBAJGOC/uN2zipovwg2TyFDGhhup263uw6DaaAljD2nInzmjyqjNqvAQv4j16+
USBSASxlAc3FSbcBGpRiA3rYQWoiqsP4WDdP77G8PkxFbmFsCfqoZ3kXQHqd4kVT
Kf0jCqZ6tKTQ6i/H8OSsrfI196TuXV460QLj2dM/wfkaTidx1Qtt7vFA7AH8HJG1
a2d4zsWRLr3AfM6a2Jz2u/lUVpCvL4/25nSvhn8zmYVg+fd2x1jDWz6+jgw/GNra
Zmcx9MYMIa/bcPfFmNAV6bneCQWCG+Oe3DJZ1gNaCHvKiqWvaZd6SBQtANrrQYog
W9f5o7RYmjYl08iARwD0hbwZNSQ=
-----END CERTIFICATE-----
[admin]
enabled = true
bind-address = ":8083"
https-enabled = true
https-certificate =
"/Users/victorhooi/Documents/influxdb_ssl/certificate.pem"
[http]
enabled = true
bind-address = ":8086"
auth-enabled = false
log-enabled = true
write-tracing = false
pprof-enabled = false
https-enabled = true
https-certificate =
"/Users/victorhooi/Documents/influxdb_ssl/certificate.pem"
When I try to startup InfluxDB, I get:bind-address = ":8083"
https-enabled = true
https-certificate =
"/Users/victorhooi/Documents/influxdb_ssl/certificate.pem"
[http]
enabled = true
bind-address = ":8086"
auth-enabled = false
log-enabled = true
write-tracing = false
pprof-enabled = false
https-enabled = true
https-certificate =
"/Users/victorhooi/Documents/influxdb_ssl/certificate.pem"
influxd -config /usr/local/etc/influxdb.conf
8888888 .d888 888 8888888b. 888888b.
888 d88P" 888 888 "Y88b 888 "88b
888 888 888 888 888 888 .88P
888 88888b. 888888 888 888 888 888 888 888 888 8888888K.
888 888 "88b 888 888 888 888 Y8bd8P' 888 888 888 "Y88b
888 888 888 888 888 888 888 X88K 888 888 888 888
888 888 888 888 888 Y88b 888 .d8""8b. 888 .d88P 888 d88P
8888888 888 888 888 888 "Y88888 888 888 8888888P" 8888888P"
2015/09/03 13:38:02 InfluxDB starting, version 0.9.4-HEAD, branch unknown,
commit b4970d4eb418fc6ea44b3d175f430e162e9dd9c5
2015/09/03 13:38:02 Go version go1.5, GOMAXPROCS set to 4
2015/09/03 13:38:02 Using configuration at: /usr/local/etc/influxdb.conf
[monitor] 2015/09/03 13:38:02 starting monitor service for cluster 0, host
localhost
[monitor] 2015/09/03 13:38:02 'runtime:map[]' registered for monitoring
...
[handoff] 2015/09/03 13:38:02 Using data dir: /usr/local/var/influxdb/hh
[tcp] 2015/09/03 13:38:02 Starting cluster service
[shard-precreation] 2015/09/03 13:38:02 Starting precreation service with
check interval of 10m0s, advance period of 30m0s
[snapshot] 2015/09/03 13:38:02 Starting snapshot service
[admin] 2015/09/03 13:38:02 Starting admin service
[snapshot] 2015/09/03 13:38:02 snapshot listener closed
[tcp] 2015/09/03 13:38:02 cluster service accept error: network connection
closed
[shard-precreation] 2015/09/03 13:38:02 Precreation service terminating
[retention] 2015/09/03 13:38:02 retention policy enforcement terminating
run: open server: open service: crypto/tls: failed to parse key PEM data
I'm guessing I went wrong somewhere with the PEM key generation, and888 d88P" 888 888 "Y88b 888 "88b
888 888 888 888 888 888 .88P
888 88888b. 888888 888 888 888 888 888 888 888 8888888K.
888 888 "88b 888 888 888 888 Y8bd8P' 888 888 888 "Y88b
888 888 888 888 888 888 888 X88K 888 888 888 888
888 888 888 888 888 Y88b 888 .d8""8b. 888 .d88P 888 d88P
8888888 888 888 888 888 "Y88888 888 888 8888888P" 8888888P"
2015/09/03 13:38:02 InfluxDB starting, version 0.9.4-HEAD, branch unknown,
commit b4970d4eb418fc6ea44b3d175f430e162e9dd9c5
2015/09/03 13:38:02 Go version go1.5, GOMAXPROCS set to 4
2015/09/03 13:38:02 Using configuration at: /usr/local/etc/influxdb.conf
[monitor] 2015/09/03 13:38:02 starting monitor service for cluster 0, host
localhost
[monitor] 2015/09/03 13:38:02 'runtime:map[]' registered for monitoring
...
[handoff] 2015/09/03 13:38:02 Using data dir: /usr/local/var/influxdb/hh
[tcp] 2015/09/03 13:38:02 Starting cluster service
[shard-precreation] 2015/09/03 13:38:02 Starting precreation service with
check interval of 10m0s, advance period of 30m0s
[snapshot] 2015/09/03 13:38:02 Starting snapshot service
[admin] 2015/09/03 13:38:02 Starting admin service
[snapshot] 2015/09/03 13:38:02 snapshot listener closed
[tcp] 2015/09/03 13:38:02 cluster service accept error: network connection
closed
[shard-precreation] 2015/09/03 13:38:02 Precreation service terminating
[retention] 2015/09/03 13:38:02 retention policy enforcement terminating
run: open server: open service: crypto/tls: failed to parse key PEM data
InfluxDB isn't liking this particular format somehow - any thoughts?
Thanks,
Victor
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/a276896b-a713-4fe1-b2a4-1a151fa0628a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/a276896b-a713-4fe1-b2a4-1a151fa0628a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.