Hi everyone. I am testing perform a back in cluster. I have my own backup_policy use openssl.
Here is my command to generate my ssl certificates
openssl req -x509 -newkey rsa:4096 -keyout private.key -out pulic.crt -days 365
Here is my config in backup server
dbms.ssl.policy.backup_policy.base_directory=certificates/backup_policy
dbms.backup.enabled=true
dbms.backup.address=0.0.0.0:6362
dbms.backup.ssl_policy=backup_policy
and this is my config in backup client
dbms.ssl.policy.backup_policy.base_directory=certificates/backup_policy
dbms.backup.ssl_policy=backup_policy
But when I start either backup server or backup client. It all gives the following errors.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7daa0fbd' was successfully initialized, but failed to start. Please see the attached cause exception "IOException : DER input, Integer tag error".
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:124)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntryPoint.java:22)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7daa0fbd' was successfully initialized, but failed to start. Please see the attached cause exception "IOException : DER input, Integer tag error".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:180)
... 3 more
Caused by: java.lang.RuntimeException: Failed to load private key: /Users/anhquan/Downloads/core-1/certificates/backup_policy/private.key
at org.neo4j.kernel.configuration.ssl.SslPolicyLoader.loadPrivateKey(SslPolicyLoader.java:321)
at org.neo4j.kernel.configuration.ssl.SslPolicyLoader.load(SslPolicyLoader.java:206)
at org.neo4j.kernel.configuration.ssl.SslPolicyLoader.create(SslPolicyLoader.java:99)
at com.neo4j.causalclustering.core.CommercialCoreEditionModule.getClusteringModule(CommercialCoreEditionModule.java:62)
at org.neo4j.causalclustering.core.EnterpriseCoreEditionModule.<init>(EnterpriseCoreEditionModule.java:237)
at com.neo4j.causalclustering.core.CommercialCoreEditionModule.<init>(CommercialCoreEditionModule.java:53)
at com.neo4j.causalclustering.core.CommercialCoreGraphDatabase.lambda$new$0(CommercialCoreGraphDatabase.java:27)
at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:181)
at com.neo4j.causalclustering.core.CommercialCoreGraphDatabase.<init>(CommercialCoreGraphDatabase.java:28)
at com.neo4j.server.database.CommercialGraphFactory.newGraphDatabase(CommercialGraphFactory.java:36)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:90)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 5 more
Caused by: java.security.spec.InvalidKeySpecException: Neither RSA, DSA nor EC worked
at org.neo4j.ssl.PkiUtils.loadPrivateKey(PkiUtils.java:211)
at org.neo4j.kernel.configuration.ssl.SslPolicyLoader.loadPrivateKey(SslPolicyLoader.java:317)
... 16 more
Caused by: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DER input, Integer tag error
at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:169)
at java.security.KeyFactory.generatePrivate(KeyFactory.java:372)
at org.neo4j.ssl.PkiUtils.loadPrivateKey(PkiUtils.java:207)
... 17 more
Caused by: java.security.InvalidKeyException: IOException : DER input, Integer tag error
at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:351)
at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:356)
at sun.security.ec.ECPrivateKeyImpl.<init>(ECPrivateKeyImpl.java:74)
at sun.security.ec.ECKeyFactory.implGeneratePrivate(ECKeyFactory.java:237)
at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:165)
As the log file, neo4j internal encounter an error related IO: IOException : DER input, Integer tag error.
Can someone show me how to fix this. Thankyou!!!