Reputation: 41
I am trying to create a distributed client network using Tsung. I have a cluster of 14 different machines. I want to use m01 as the server and machines m02 and m03 as the clients (or simulated users).
Here is what I wrote:
<!-- Client side setup -->
<clients>
<client host="localhost" maxusers="400" cpu="1"><ip value="192.168.1.2"/></client>
<client host="m03" maxusers="400" cpu="1"><ip value="192.168.1.3"/></client>
</clients>
The server I am targeting is defined here:
<!-- Server side setup -->
<servers>
<server host="192.168.1.1" port="5000" type="tcp"></server>
</servers>
Whenever I try to run this, I get the following error:
Host key verification failed.
For notes purposes, m02 is a localhost that I am running tsung on.
I have installed tsung and erlan on all machines and have done various testing to make sure that I can run non-distributed tests.
I am not sure how to move from here.
Upvotes: 2
Views: 6482
Reputation: 9055
Tsung distributed load testing is based on SSH shell distribution. Make sure you set up your SSH system so that you can ssh without password prompt (with key) from master to all the slave nodes.
From Tsung documentation:
for distributed tests, you need an ssh access to remote machines without password (use a RSA/DSA key without pass-phrase or ssh-agent) (rsh is also supported)
Upvotes: 3
Reputation: 3
Steps 1.Reboot the VMs/machines and start new session
2.Remove lines of /home/user/.ssh/known_hosts related to machines m01,m02 and m03 from each of the machines
3.modify /etc/hosts files of all of them to contain ip address and hostname/fqdn/shortname of m01,m02 and m03
4.Copy the contents of publickey in to /home/user/.ssh/authorized_keys file and copy the private key file in to /home/user/.ssh/ folder. Generate new private and public keys using keygen if not generated.
5.(important step)Now run command:" ssh m03 " from m01 and m02 .It is important to use the same name(or hostname) in ...(in your .xml file) , in /etc/hosts file and while doing ssh. (the hostname you use for ssh will be added in known_hosts file). Similarly do in other two machines.
Reference: http://cryolite.iteye.com/blog/378758 (please translate)
"Host key verification failed." error will never appear again :)
Upvotes: -1
Reputation: 1610
Tsung Cluster configuration.
For configuration of Tsung cluster you need to have nodes (different computers with same operation system and with same version of Tsung).
All nodes should have possibility to access to master node without promting password. For this operation you have to generate ssl certificates in master node and then add public key in all slave nodes. Follow the commands below:
Generate the certificate in master node:
ssh-keygen -t rsa Copy the files to all nodes home directories (in our example there are 3 nodes):
scp ./id_rsa.pub USERNAME@NODE_1_IP_ADDRESS:~
scp ./id_rsa.pub USERNAME@NODE_2_IP_ADDRESS:~
scp ./id_rsa.pub USERNAME@NODE_3_IP_ADDRESS:~
Add public key in all nodes:
cat id_rsa.pub >> .ssh/authorized_keys
After successful keygen generation and installation on all nodes you should check via ssh command the access to all nodes. First time login via ssh is required either you should get Host key verification failed. example : please do this: ssh [thesameusernamewhichisintsungtestplan]@yournodehostname
NOTE: Your all nodes' /etc/hosts should have the cluster and Test Servers credentials.
Upvotes: 3
Reputation: 1274
Have you ever ssh'd to the machines you are trying to use from the machine you are on?
ubuntu@ip-10-168-221-101:~/sessions$ tsung -f project.xml -l logs/tsung.log start
Starting Tsung
"Log directory is: /home/ubuntu/sessions/logs/20120830-1008"
Host key verification failed.
Host key verification failed.
Host key verification failed.
Host key verification failed.
^C
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
^Cubuntu@ip-10-168-221-101:~/sessions$ grep client project.xml
<clients>
<client host="localhost"/>
<client host="ip-10-161-74-53"/>
<client host="ip-10-168-154-136"/>
<client host="ip-10-168-15-66"/>
<client host="ip-10-168-86-249"/>
</clients>
the mean inter-arrival time between new clients and the phase
ubuntu@ip-10-168-221-101:~/sessions$ ssh ip-10-161-74-53 erl
The authenticity of host 'ip-10-161-74-53 (10.161.74.53)' can't be established.
ECDSA key fingerprint is d0:92:3c:f1:56:99:c8:34:8b:0f:99:e8:10:7e:69:a6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ip-10-161-74-53,10.161.74.53' (ECDSA) to the list of known hosts.
Eshell V5.8.5 (abort with ^G)
1> ^C
ubuntu@ip-10-168-221-101:~/sessions$ for d in $(grep client project.xml | grep ip | sed 's/<client host="\([^"]\+\)"\/>/\1/'); do ssh $d cat /etc/hosts; done
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
[...]
ubuntu@ip-10-168-221-101:~/sessions$ tsung -f project.xml -l logs/tsung.log start
Starting Tsung
"Log directory is: /home/ubuntu/sessions/logs/20120830-1013"
Profit!"
Upvotes: 2
Reputation: 331
1 Use this on server(master) to check if the SSH login without password is ok:
ssh client-002 erl
2 If it's not ok, just do this to keep your public key file is the newest:
ssh-copy-id your-hostname
PS: If you setup your SSH login without password OK, then DO NOT use ssh-keygen to generate new public key.
Upvotes: 1