0

I'm setting up a new C* cluster and used apt-get to install OpsCenter 4.0; which came up fine and saw all my nodes.

I have an ~/.ssh/id_dsa file set up and can ssh to my nodes without password.

I tried to have OpsCenter install the agents via "fix"..supplying the private key in the "Node SSH Credentials" dialog...but I get "Failed to SSH to ...Error output: Permission denined (publickey).

I'm puzzled how I can ssh from cmd line but OpsCenter can't.

I then tried installing agents manually (again using apt-get; and service opscenterd-agent start) but I get this in the /var/log/datastax-agent/startup.log:

 INFO [main] 2013-12-13 13:25:11,035 Loading conf files: /var/lib/datastax-agent/conf/address.yaml
Exception in thread "main" java.lang.ClassCastException: java.lang.Character cannot be cast to java.util.Map$Entry
        at opsagent.conf$load_conf_file$fn__1185$fn__1186.invoke(conf.clj:197)
        at clojure.core$map$fn__4207.invoke(core.clj:2487)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.core$seq.invoke(core.clj:133)
        at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
        at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
        at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
        at clojure.core$reduce.invoke(core.clj:6177)
        at clojure.core$into.invoke(core.clj:6229)
        at opsagent.conf$load_conf_file.invoke(conf.clj:195)
        at clojure.core$map$fn__4207.invoke(core.clj:2487)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.core$seq.invoke(core.clj:133)
        at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
        at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
        at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
        at clojure.core$reduce.invoke(core.clj:6177)
        at clojure.core$into.invoke(core.clj:6229)
        at opsagent.conf$load_conf.invoke(conf.clj:209)
        at opsagent.opsagent$_main.doInvoke(opsagent.clj:228)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at opsagent.opsagent.main(Unknown Source)

(my address.yaml file is: stomp_interface=1.2.3.4 // with different numbers of course

I've used previous versions of C* and OpsCenter for years but I'm stuck now to get this one up and running.

Brian Tarbox
  • 2,335
  • 1
  • 20
  • 30

2 Answers2

2

You're using a "=" where yaml syntax expects a ":". So what your stomp_interface line should look like:

stomp_interface: 1.2.3.4

You'll need to restart the datastax-agent for this to take effect.

mbulman
  • 470
  • 2
  • 7
  • That change makes no difference. I still get the ClassCastException. I've seen others attribute that error to duplicate agent jar files but that's not the case here either. – Brian Tarbox Dec 16 '13 at 13:57
-2

I had entered my private ssh key in ~/.ssh/id_dsa (I'm running on EC2 as user "ubuntu".

On a whim I searched for other .ssh directories and found /root/.ssh.

I copied the id_dsa file to that directory and this time OpsCenter was able to talk to all of nodes in my cluster and install the agent.

Although this "solves" the problem its a bit unsatisfying as the OpsCenter directions don't say anything about this and I'm not sure how I should have known to look for this other .ssh directory. On the other hand, it is working :-).

Brian Tarbox
  • 2,335
  • 1
  • 20
  • 30
  • For what it's worth, that step shouldn't be necessary. OpsCenter should be able to use the same key and user that you use from the command line to log in to the nodes. – nickmbailey Dec 16 '13 at 21:55
  • I agree it "shouldn't" be needed but it was. Not sure why an answer that fixes the problem got down voted, especially no alternatives have been offered. – Brian Tarbox Dec 17 '13 at 02:20
  • Well, there are actually two problems posed in your post. The stack trace you posted was definitely caused by a yaml formatting error. I'm still not sure what was causing your ssh error. It sounds like your solution was to make your private key the default private key for the root user (which opscenter runs as). Were you pasting the actual contents of the private key into OpsCenter? Including the begin and end comments? – nickmbailey Dec 17 '13 at 12:14
  • Well...I got exactly the same stack trace after fixing the yaml formatting error, so that was not the error. Given the fact (which I didn't know) that OpsCenter runs as root then putting the id_dsa in root's .ssh file is fine solution, in fact its how one generally deals with ssh connections in my experience. – Brian Tarbox Dec 17 '13 at 14:09
  • My only guess is that there were additional yaml formatting errors, or that you were editing a conf contained in the tarball used for manually installing rather than /var/lib/datastax-agent/conf/address.yaml perhaps. The reason adding the key there isn't the best workaround, is that OpsCenter won't be running as the root user in other install types (rpm, tarball), and while it does work in this case, it isn't guaranteed to work in the future. – nickmbailey Dec 18 '13 at 16:27
  • I actually used the script contained in the DataStax documentation for creating the yaml file and only accidentally swapped the :/= in creating the StackOverFlow question. – Brian Tarbox Dec 18 '13 at 20:13