stateless trex cannot connect to RPC server

2,083 views
Skip to first unread message

Guoliang Han

unread,
Dec 19, 2017, 6:09:29 AM12/19/17
to TRex Traffic Generator
Hi team:

I am new to stateless Trex and I encounter a simple problem but cannot solve it.
Thanks in advance for your help.

trex@client-trex:~/trex-v2.32$ uname -a
Linux client-trex 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux

trex@client-trex:~/trex-v2.32$ ./trex-console -v
Using 'python' as Python interpeter

Connecting to RPC server on localhost:4501                   

[verbose] Sending Request To Server:

{
    "id": "dq8yshve",
    "jsonrpc": "2.0",
    "method": "api_sync_v2",
    "params": {
        "major": 4,
        "minor": 1,
        "name": "STL"
    }
}

[FAILED]

Log:
*** [RPC] - Failed to get server response from tcp://localhost:4501

but I have run ./t-rex-64 -i and I can see the ports open.

trex@client-trex:~/trex-v2.32$ ss -uta
Netid  State      Recv-Q Send-Q                                                          Local Address:Port                                                              Peer Address:Port   
udp    UNCONN     0      0                                                                           *:sunrpc                                                                       *:*       
udp    UNCONN     0      0                                                                           *:725                                                                          *:*       
udp    UNCONN     0      0                                                                   127.0.0.1:756                                                                          *:*       
udp    UNCONN     0      0                                                                           *:52639                                                                        *:*       
udp    UNCONN     0      0                                                                          :::sunrpc                                                                      :::*       
udp    UNCONN     0      0                                                                          :::725                                                                         :::*       
udp    UNCONN     0      0                                                                          :::35789                                                                       :::*       
tcp    LISTEN     0      100                                                                         *:4500                                                                         *:*       
tcp    LISTEN     0      100                                                                         *:4501                                                                         *:*       
tcp    LISTEN     0      128                                                                         *:ssh                                                                          *:*       
tcp    LISTEN     0      128                                                                         *:58425                                                                        *:*       
tcp    LISTEN     0      100                                                                         *:4507                                                                         *:*       
tcp    LISTEN     0      128                                                                         *:sunrpc                                                                       *:*       
tcp    ESTAB      0      0                                                                192.168.64.2:ssh                                                             192.168.64.140:35098   
tcp    ESTAB      0      1788                                                             192.168.64.2:ssh                                                             192.168.64.140:35562   
tcp    LISTEN     0      128                                                                        :::ssh                                                                         :::*       
tcp    LISTEN     0      128                                                                        :::37741                                                                       :::*       
tcp    LISTEN     0      128                                                                        :::sunrpc                                                                      :::*       
tcp    LISTEN     0      128                                                                        :::http                                                                        :::*       




Anton Kiselev

unread,
Dec 19, 2017, 6:38:15 AM12/19/17
to Guoliang Han, TRex Traffic Generator
Hi,

could you try same with 'nc -v -l 4500' and 'nc -v localhost 4500' to see if TCP is working fine?
also you may want to ensure there is no iptables blocking trex ports
iptables -F can be used to flush rules if any

Thanks,
Anton



--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+unsubscribe@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/07b79b50-de17-4b01-81c8-b2f6a20cba33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

JS

unread,
Mar 13, 2019, 2:24:15 PM3/13/19
to TRex Traffic Generator
Hi, I am seeing the same issue on centos 7.4. These ports are available and not used by any process. I have uninstalled firewalld and disabled selinux. Any suggestion?

host# nc -v localhost 4501
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection to ::1 failed: Connection refused.
Ncat: Trying next address...
Ncat: Connection refused.
host# nc -v localhost 4500
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection to ::1 failed: Connection refused.
Ncat: Trying next address...
Ncat: Connection refused.
host# nc -v -l 4500
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Listening on :::4500
Ncat: Listening on 0.0.0.0:4500
^[[A^C
host# nc -v -l 4501
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Listening on :::4501
Ncat: Listening on 0.0.0.0:4501
^C
host#
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
Message has been deleted

JS

unread,
Mar 13, 2019, 2:37:13 PM3/13/19
to TRex Traffic Generator
host v2.53]# ./trex-console -v

Using 'python' as Python interpeter

Log:
*** [RPC] - Failed to get server response from tcp://localhost:4501


Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages