Issue with client IP/FQDN
Skull0ne opened this issue · 1 comments
Hi
From the documentation (http://tsung.erlang-projects.org/user_manual/conf-client-server.html#direct-ip), with tsung v1.7, we should be able to use IP address as host but when I try to run this configuration :
<clients>
<client host="54.219.186.232" maxusers="10"/>
<client host="54.213.110.21" maxusers="10"/>
</clients>
I get this error :
Starting Tsung
Log directory is: .tsung/log/20190501-1808
ERROR: client config: 'host' attribute must be a hostname, not an IP ! (was "54.219.186.232"). You can use -I <> option.
Config Error, aborting ! {error,badhostname}
Also I tried to configure the XML using FQDN :
<clients>
<client host="ec2-54-219-186-232.us-west-1.compute.amazonaws.com" maxusers="10"/>
<client host="ec2-54-213-110-21.us-west-2.compute.amazonaws.com" maxusers="10"/>
</clients>
And I get this error :
ssh: Could not resolve hostname ec2-54-213-110-21: Temporary failure in name resolution
ssh: Could not resolve hostname ec2-54-219-186-232: Temporary failure in name resolution
Tsung version :
# tsung -v
Tsung version 1.7.0
For the moment I will define them in the /etc/hosts but if you have a solution for that please
Edit : tsung_controller logs are showing something else (maybe FW issue?) :
=INFO REPORT==== 1-May-2019::18:24:09 ===
ts_config_server:(0:<0.142.0>) Can't start newbeam on host 'ec2-54-213-110-21.us-west-2.compute.amazonaws.com' (reason: timeout) ! Aborting!
=INFO REPORT==== 1-May-2019::18:24:09 ===
ts_config_server:(0:<0.143.0>) Can't start newbeam on host 'ec2-54-219-186-232.us-west-1.compute.amazonaws.com' (reason: timeout) ! Aborting!
=ERROR REPORT==== 1-May-2019::18:24:09 ===
** Generic server ts_config_server terminating
** Last message in was {'$gen_cast',
{newbeams,
['ec2-54-213-110-21.us-west-2.compute.amazonaws.com',
'ec2-54-219-186-232.us-west-1.compute.amazonaws.com']}}
** When Server state == {state,
{config,undefined,0,5,none,text,undefined,
[{client,
"ec2-54-213-110-21.us-west-2.compute.amazonaws.com",
1.0,10,[],undefined},
{client,
"ec2-54-219-186-232.us-west-1.compute.amazonaws.com",
1.0,10,[],undefined}],
[{server,"google.ca",443,ts_tcp,1}],
undefined,[],
[{arrivalphase,1,60000,undefined,0.0005,infinity,0,
[],false,1}],
undefined,false,[],[],ts_http,
[{session,1,100,ts_http,"test",true,false,10000,
{proto_opts,negotiate,negotiate,"/http-bind/",
false,false,false,"/chat","binary",[],10,3,
600000,infinity,infinity,32768,32768,32768,32768,
[],true,true},
undefined,3,undefined,undefined,undefined,
undefined,undefined}],
[],#Ref<0.4216070227.3373137921.108521>,false,20,3,
3,[],0,10000,
{proto_opts,negotiate,negotiate,"/http-bind/",
false,false,false,"/chat","binary",[],10,3,600000,
infinity,infinity,32768,32768,32768,32768,[],true,
true},
now,none,none,[],undefined,"d",false,1,undefined,20,
[]},
".tsung/log/20190501-1823",0,0,[],
undefined,1,undefined,'ip-172-31-28-139',0,0,
undefined,2.0}
** Reason for termination ==
** {{slave_failure,timeout},
[{ts_config_server,'-check_remotes_ok/1-fun-0-',1,
[{file,"src/tsung_controller/ts_config_server.erl"},
{line,910}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{ts_config_server,handle_cast,2,
[{file,"src/tsung_controller/ts_config_server.erl"},
{line,407}]},
{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,616}]},
{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,686}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
=INFO REPORT==== 1-May-2019::18:24:09 ===
ts_mon:(0:<0.102.0>) Aborting by request !
=INFO REPORT==== 1-May-2019::18:24:09 ===
ts_mon:(5:<0.102.0>) stopping monitor (abort)
However in my security groups I allow all traffic (tcp/udp/all ports) from my master IP
Thanks
ok so I found the issue for the timeout/resolution using tcpdump : nodes are using the internal DNS of my master instead of the external IP (ip-172-31-28-139.us-west-2.compute.internal).
I put it in the host file and the erl check is now working :
# erl -rsh ssh -sname foo -setcookie mycookie
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [kernel-poll:false]
Eshell V9.2 (abort with ^G)
(foo@ip-172-31-28-139)1> slave:start("ec2-54-213-110-21.us-west-2.compute.amazonaws.com",bar,"-setcookie mycookie").
Warning: Permanently added 'ec2-54-213-110-21,54.213.110.21' (ECDSA) to the list of known hosts.
{ok,'bar@ec2-54-213-110-21'}
But could you check for the host as IP please and the FQDN (not working without configuring master host file)?