Discussion:
Rabbit MQ Device Not able to Model but able to connect via putty
Ranajit Jana
2013-06-20 11:53:32 UTC
Permalink
Ranajit Jana [http://community.zenoss.org/people/ranajitjana] created the discussion

"Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73684#73684

--------------------------------------------------------------
Hi,

I am able to connect to the rabbit MQ instance with remote ssh and able to run rabbitmqctl command thus confirming the public certificate is running
fine.With Remote ssh i did not specify a password.

But when i add the same to the Device it gives authentication error.

SSH authentication failed-no password or public key specified

I have set the following configuration properties
  zCommandUsername - zenoss
zCommandPassword  - 
zKeyPath - /home/zenoss/.ssh/authorized_keys

I am surprised to see once it got changed to ~/home/zenoss/.ssh/authorized_keys . Also tested with ~/.ssh/authorized_keys

In the server running Rabbit MQ the authorized_keys file is existing.

Error is the same
Find the logs , when I am trying to model the device
2013-06-20 17:18:52,127 INFO zen.ZenModeler: Connecting to localhost:8789
2013-06-20 17:18:52,131 INFO zen.ZenModeler: Connected to ZenHub
2013-06-20 17:18:52,227 INFO zen.ZenModeler: Collecting for device 10.2.65.52
2013-06-20 17:18:52,236 INFO zen.ZenModeler: No WMI plugins found for 10.2.65.52
2013-06-20 17:18:52,237 INFO zen.ZenModeler: No Python plugins found for 10.2.65.52
2013-06-20 17:18:52,237 INFO zen.ZenModeler: Using SSH collection method for device 10.2.65.52
2013-06-20 17:18:52,237 INFO zen.ZenModeler: plugins: zenoss.ssh.RabbitMQ
2013-06-20 17:18:52,238 INFO zen.ZenModeler: SNMP monitoring off for 10.2.65.52
2013-06-20 17:18:52,238 INFO zen.ZenModeler: No portscan plugins found for 10.2.65.52
2013-06-20 17:18:53,303 ERROR zen.SshClient: SSH authentication failed - no password or public key specified
2013-06-20 17:18:53,305 INFO zen.CmdClient: command client finished collection for 10.2.65.52
2013-06-20 17:18:53,306 INFO zen.ZenModeler: No change in configuration detected
2013-06-20 17:18:53,307 INFO zen.ZenModeler: Scan time: 1.08 seconds
2013-06-20 17:18:53,310 INFO zen.ZenModeler: Daemon ZenModeler shutting down





--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73684#73684]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2013-06-20 12:02:38 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73685#73685

--------------------------------------------------------------
hmm, it sure looks like you set everything up. Maybe try running zenmodeler manually and/or restarting the daemon.
zenmodeler run -d <devicename> -v 10
zenmodeler restart
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73685#73685]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Ranajit Jana
2013-06-20 17:24:34 UTC
Permalink
Ranajit Jana [http://community.zenoss.org/people/ranajitjana] created the discussion

"Re: Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73688#73688

--------------------------------------------------------------
quite useful command.But I have tried to run this without success. I had the user which was zenos . I changed to user to zenoss on both the rabbitMQ and zenoss anyway is user on zenoss side.

I am still able to login via ssh http://community.zenoss.org/mailto:***@servername ***@servername without any issues and very clearly run rabbitmqctl status.

but when running the command I get error that path /home/zenoss/.ssh/authorized_keys doesn't exist

this does exist in the Rabbit MQ machine and checked the same.

I created the keys with ssh-keygen -t rsa with no passcode.  and anyway as it is working with ssh command i dont dont it is wrong.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73688#73688]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2013-06-21 01:21:16 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73700#73700

--------------------------------------------------------------
Would it be possible for you you supply a copy of the (cleansed) debug output from the first command?

Additionally can you triple check the device in question and ensure that the username and key path you configured is showing on *that* devices configuration properties screen. I'd like to be certain that it wasnt applied somewhere in the tree that isnt applying it to the device. The following DMD snippet might help in ensuring what those values actually are http://wiki.zenoss.org/ZenDMD_Tip_-_Dump_zProperties_values_for_a_Device http://wiki.zenoss.org/ZenDMD_Tip_-_Dump_zProperties_values_for_a_Device
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73700#73700]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Vaibhav.Narula
2013-06-21 01:32:03 UTC
Permalink
Vaibhav.Narula [http://community.zenoss.org/people/Vaibhav.Narula] created the discussion

"Re: Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73701#73701

--------------------------------------------------------------
can  you put sshd  deamon in  debug mode and post the output  .
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73701#73701]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Gowrish SS
2013-06-21 02:13:37 UTC
Permalink
Gowrish SS [http://community.zenoss.org/people/gowrish.ec] created the discussion

"Re: Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73706#73706

--------------------------------------------------------------
Hi would suggest you to use a user as zenmonitor to run rabbitmqctl


1.Install the sudo package on your server.
2.Make sudo not require a TTY. This allows sudo to be run via ssh.

1.Run visudo as root.
2.Find a line containing Defaults requiretty and comment it out by prefixing the line with a #.
3.Type ESC then :wq to save the sudo configuration.
3.Allow the zenmonitor user to run rabbitmqctl.
1.Run visudo as root.
2.Add the following line to the bottom of the file.
zenmonitor ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl
3.Type ESC then :wq to save the sudo configuration.
4.Alias rabbitmqctl for the zenmonitor user.
1.Add the following lines to /home/zenmonitor/.bashrc.
shopt -s expand_aliases
alias rabbitmqctl="sudo /usr/sbin/rabbitmqctl"

Do not use the keys, ,rather use the use the username and password in the configuration properties, I have done this to monitor rabbit mq queues.

--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73706#73706]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Ranajit Jana
2013-06-21 09:10:54 UTC
Permalink
Ranajit Jana [http://community.zenoss.org/people/ranajitjana] created the discussion

"Re: Rabbit MQ Device Not able to Model but able to connect via putty"

To view the discussion, visit: http://community.zenoss.org/message/73709#73709

--------------------------------------------------------------
Folks ,

Thank you all for replying.

Something quite simple solved this issue.

The key path was pointing to /home/zenoss/.ssh/authorized_keys which is my public key in the rabbitMQ server.

While zenoss server have the private key.

Pointing to local private key in the path actually have resolved the issue.

Regards,
Ranajit

--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73709#73709]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...