After following the documentation for the setup of https to the letter,
and checking back with all of these:
https://community.graylog.org/t/graylog-ssl-certificates/8100 https://community.graylog.org/t/https-isnt-working-for-me/8154 https://community.graylog.org/t/jerseyservice-wont-start-after-enabling-https/2836 https://community.graylog.org/t/cant-get-https-working-on-graylog/1215 https://github.com/Graylog2/graylog2-server/issues/2752 https://github.com/Graylog2/graylog2-server/issues/2215
(sorry, too many links for a new user…)
I still can’t figure out how the get graylog to use https.
No matter what I do, I always end up with a failed JerseyService and graylog starting in a loop,
apparently due to:
2019-02-13T09:16:46.576+01:00 ERROR [ServerBootstrap] Graylog startup failed. Exiting. Exception was: java.lang.IllegalStateException: Expected to be healthy after starting. The following services are not running: {FAILED=[JerseyService [FAILED]]} at com.google.common.util.concurrent.ServiceManager$ServiceManagerState.checkHealthy(ServiceManager.java:741) ~[graylog.jar:?] at com.google.common.util.concurrent.ServiceManager$ServiceManagerState.awaitHealthy(ServiceManager.java:553) ~[graylog.jar:?] at com.google.common.util.concurrent.ServiceManager.awaitHealthy(ServiceManager.java:314) ~[graylog.jar:?] at org.graylog2.bootstrap.ServerBootstrap.startCommand(ServerBootstrap.java:149) [graylog.jar:?] at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:209) [graylog.jar:?] at org.graylog2.bootstrap.Main.main(Main.java:44) [graylog.jar:?] Suppressed: com.google.common.util.concurrent.ServiceManager$FailedService: JerseyService [FAILED] Caused by: java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 48) at sun.security.util.ObjectIdentifier.(ObjectIdentifier.java:257) ~[?:1.8.0_171] at sun.security.util.DerInputStream.getOID(DerInputStream.java:314) ~[?:1.8.0_171] at com.sun.crypto.provider.PBES2Parameters.engineInit(PBES2Parameters.java:267) ~[sunjce_provider.jar:1.8.0_171] at java.security.AlgorithmParameters.init(AlgorithmParameters.java:293) ~[?:1.8.0_171] at sun.security.x509.AlgorithmId.decodeParams(AlgorithmId.java:132) ~[?:1.8.0_171] at sun.security.x509.AlgorithmId.(AlgorithmId.java:114) ~[?:1.8.0_171] at sun.security.x509.AlgorithmId.parse(AlgorithmId.java:372) ~[?:1.8.0_171] at javax.crypto.EncryptedPrivateKeyInfo.(EncryptedPrivateKeyInfo.java:95) ~[?:1.8.0_171] at org.graylog2.shared.security.tls.PemKeyStore.generateKeySpec(PemKeyStore.java:69) ~[graylog.jar:?] at org.graylog2.shared.security.tls.PemKeyStore.buildKeyStore(PemKeyStore.java:98) ~[graylog.jar:?] at org.graylog2.shared.initializers.JerseyService.buildSslEngineConfigurator(JerseyService.java:384) ~[graylog.jar:?] at org.graylog2.shared.initializers.JerseyService.startUpApi(JerseyService.java:207) ~[graylog.jar:?] at org.graylog2.shared.initializers.JerseyService.startUp(JerseyService.java:141) ~[graylog.jar:?] at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) ~[graylog.jar:?] at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) ~[graylog.jar:?] at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_171]
Without tls enabled, everything is running just fine.
The other posts seem to indicate a problem with the certificate, though I cannot figure out what could possibly the issue. I get my certificate from a WindowsCA.
Then I do…
openssl pkcs12 -in npgulmlog02.intern.swp.de.pfx -nokeys -out graylog-certificate.pem openssl pkcs12 -in npgulmlog02.intern.swp.de.pfx -nocerts -out graylog.pkcs5.priv.key openssl pkcs8 -in graylog.pkcs5.priv.key -topk8 -out graylog-private.pem
Now, there are multiple certs in the cert-file. A certificate chain.
As that didn’t work I tried
openssl x509 -in graylog-certificate.pem -outform pem -out graylog-x509.pem
as well. That didn’t work either.
I imported the certs into the java-keystore…
$keytool -importcert -keystore /etc/ssl/certs/java/cacerts -storepass changeit -alias graylog -file /etc/graylog/certs/graylog-certificate.pem
And reconfigured the hosts ca-certificates:
$ cp /etc/graylog/certs/graylog-certificate.pem /etc/ssl/certs/ $ cp /etc/graylog/certs/graylog-private.pem /etc/ssl/private/ $ dpkg-reconfigure -f noninteractive ca-certificates
But that didn’t change anything either.
Is there anywhere ELSE but the certificates I need to look at? Wouldn’t be the first time an error-message and google-searches are misleading
graylog was installed from .deb-packages.
Key | Value |
---|---|
OS | Debian 8 |
graylog-server | 2.5.1-1 |
elasticsearch | 5.6.14 |
mongodb | 1:2.4.10-5+deb8u1 |
java | openjdk version “1.8.0_171” |