thelastpickle / cassandra-reaper

Automated Repair Awesomeness for Apache Cassandra
http://cassandra-reaper.io/
Apache License 2.0
485 stars 217 forks source link

add cluster failing #1195

Open bhanupratapm02 opened 2 years ago

bhanupratapm02 commented 2 years ago

Project board link

I am new to repear and I am trying to add cluster to the reaper tool and its failing with below error ERROR [2022-05-13 04:57:18,195] [dw-194 - POST /cluster/auth] i.d.j.e.IllegalStateExceptionMapper - Error handling a request: 8d1a256b1e84557e java.lang.IllegalStateException: No passphrase detected in environment for: REAPER_JMX_KEY at io.cassandrareaper.crypto.SymmetricCryptograph.fetchPassphrase(SymmetricCryptograph.java:117) at io.cassandrareaper.crypto.SymmetricCryptograph.encrypt(SymmetricCryptograph.java:78) at io.cassandrareaper.resources.ClusterResource.addOrUpdateCluster(ClusterResource.java:228) at io.cassandrareaper.resources.ClusterResource.addOrUpdateCluster(ClusterResource.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:475)


From cassandra-reaper.yaml

cryptograph: type: symmetric systemPropertySecret: REAPER_JMX_KEY

I did set environment variable export REAPER_JMX_KEY=somekeyvalue systemctl stop cassandra-reaper systemctl start cassandra-reaper

Please guide me how to fix this issue.

┆Issue is synchronized with this Jira Story by Unito

kolargol commented 1 year ago

was this fixed ?

adejanovski commented 1 year ago

The only assumption I can make here is that the user that is used to start reaper doesn't have access to that REAPER_JMX_KEY env variable. I encourage you to look for how to set an env variable for a user when using systemd.