trex v3.05 on Ubuntu 24.04 with Kernel 6.8 and Python 3.12 doesn't work

1,431 views
Skip to first unread message

freddy.b...@gmail.com

unread,
Jul 25, 2024, 9:48:49 PM7/25/24
to TRex Traffic Generator
Hi,

We are deploying a baremetal ubutnu in a beefy server with 56core and 768G RAM

The server is a UCS 240 with severals NIC including a Intel Corporation 82599ES 10-Gigabit (4 ports) and a Cisco VIC 1455 (4 Ports) all of them at 10GigE

OS is Ubuntu 24.04
6.8.0-39-generic #39-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul  5 21:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Python is version 3.12
Scapy is version 2.5

When trying to use ./dpdk_setup_ports.py -i this parsing errors appears

/opt/trex/v3.04/./dpdk_setup_ports.py:62: SyntaxWarning: invalid escape sequence '\d'
  _2hex_re = '[\da-fA-F]{2}'
/opt/trex/v3.04/./dpdk_setup_ports.py:511: SyntaxWarning: invalid escape sequence '\d'
  ofed_ver_re = re.compile('.*[-](\d)(\d)?[.](\d)(\d)?[-].*')
/opt/trex/v3.04/./dpdk_setup_ports.py:863: SyntaxWarning: invalid escape sequence '\s'
  ifname_re = re.compile('iface\s*=\s*([^\s,]+)')

Those Warning messages shows all over at any command

The current config is for loop testing
cat /etc/trex_loop_cfg.yaml
### Config file generated by dpdk_setup_ports.py ###

- version: 2
  interfaces: ['8b:00.0', '8b:00.1']
  port_info:
      - ip: 1.1.1.1
        default_gw: 2.2.2.2
      - ip: 2.2.2.2
        default_gw: 1.1.1.1

  platform:
      master_thread_id: 0
      latency_thread_id: 1
      dual_if:
        - socket: 1
          threads: [28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55]


Start the trex server on interactive mode error out with missing scapy server, and even if you start it with the --no-scapy-server flag, the trex-console does not work

sudo ./trex-console -s 127.0.0.1

Using 'python3' as Python interpeter

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/trex/v3.04/automation/trex_control_plane/interactive/trex/console/trex_console.py", line 49, in <module>
    from ..stl.api import *
  File "/opt/trex/v3.04/automation/trex_control_plane/interactive/trex/stl/api.py", line 4, in <module>
    from ..utils.common import *
  File "/opt/trex/v3.04/automation/trex_control_plane/interactive/trex/utils/common.py", line 11, in <module>
    from scapy.utils import *
  File "/opt/trex/v3.04/external_libs/scapy-2.4.3/scapy/utils.py", line 29, in <module>
    from scapy.modules.six.moves import range
ModuleNotFoundError: No module named 'scapy.modules.six.moves'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 228, in partial_apport_excepthook
    return apport_excepthook(binary, exc_type, exc_obj, exc_tb)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 114, in apport_excepthook
    report["ExecutableTimestamp"] = str(int(os.stat(binary).st_mtime))
                                            ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/opt/trex/v3.04/-m'

Original exception was:
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/trex/v3.04/automation/trex_control_plane/interactive/trex/console/trex_console.py", line 49, in <module>
    from ..stl.api import *
  File "/opt/trex/v3.04/automation/trex_control_plane/interactive/trex/stl/api.py", line 4, in <module>
    from ..utils.common import *
  File "/opt/trex/v3.04/automation/trex_control_plane/interactive/trex/utils/common.py", line 11, in <module>
    from scapy.utils import *
  File "/opt/trex/v3.04/external_libs/scapy-2.4.3/scapy/utils.py", line 29, in <module>
    from scapy.modules.six.moves import range
ModuleNotFoundError: No module named 'scapy.modules.six.moves'


I have been trying some other combination but nothing seems to fix the issue.

any guidance will be appreciated



Sam Wilkes

unread,
Aug 12, 2024, 3:33:22 AM8/12/24
to TRex Traffic Generator
i am getting similar syntax errors on ubuntu 24.04 with whatever version of Trex I use; i moved to another vm with Centos Stream 9 and the syntax errors have gone away; however, now I am getting hugepage errors.

Hubert Hans

unread,
Aug 16, 2024, 5:00:15 AM8/16/24
to TRex Traffic Generator
On my Ubuntu with Kernel version 6.8.0-40 Trex 3.04 stopped working with my x710 (cannot aquire ports for dpdk) and after i stick my 225v into my machine and using trex 3.05, i have gotten the hugepage errors, also.

I will go for CentOS now, but i doubt it will solve my problems. The Old Centos 7.6 is downloading, too. But i dont like to use it because of its age. It will be my last resort

Hubert Hans

unread,
Aug 16, 2024, 5:01:37 AM8/16/24
to TRex Traffic Generator
PS: I updatet Ubuntu today, like everyday if i want to run around with my Trex. But that was a huge mistake, some people got bitten, as it seems.

Hubert Hans

unread,
Aug 16, 2024, 5:03:43 AM8/16/24
to TRex Traffic Generator
root@MariosGrosserTREX:/opt/trex/v3.05# ./t-rex-64 --astf -i -c 15 --l-pkt-mode 2
Trying to bind to igb_uio ...
/usr/bin/python3 dpdk_nic_bind.py --bind=igb_uio 0000:07:00.0 0000:0a:00.0
/opt/trex/v3.05/dpdk_nic_bind.py:40: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import strtobool
The ports are bound/configured.
Starting  TRex v3.04 please wait  ...
EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
 You might need to run ./trex-cfg  once
EAL: Error - exiting with code: 1
  Cause: Invalid EAL arguments

Hubert Hans

unread,
Aug 16, 2024, 9:35:27 AM8/16/24
to TRex Traffic Generator
With Centos Stream 9 Trex 3.04 now works fine. For now...

Foday Harris

unread,
Aug 19, 2024, 6:08:02 AM8/19/24
to TRex Traffic Generator
Has anyone been able to install Trex on ubuntu 24.04  or the latest version of Rocky linux? I am having similar issues
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.

hanoh haim

unread,
Aug 19, 2024, 6:13:25 AM8/19/24
to Foday Harris, TRex Traffic Generator
Hi Foday, 
it seems as a python 3.12 issue, try to download version 3.10 

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/72486e87-6d75-4905-b991-976571eef852n%40googlegroups.com.


--
Hanoh
Sent from my iPhone
Message has been deleted

Foday Harris

unread,
Aug 20, 2024, 10:22:56 AM8/20/24
to TRex Traffic Generator
Has anyone solved this issue on Ubuntu 24.04 ? scapy not working.  This reference "from scapy.modules.six.moves" doesn't work with my kernel  6.8.0-40-generic 

Starting Scapy server.... Scapy server failed to run
Output: b'Traceback (most recent call last):\n  File "<frozen runpy>", line 198, in _run_module_as_main\n  File "<frozen runpy>", line 88, in _run_code\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/scapy_server/scapy_zmq_server.py", line 8, in <module>\n    from ..stl.api import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/stl/api.py", line 4, in <module>\n    from ..utils.common import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/utils/common.py", line 11, in <module>\n    from scapy.utils import *\n  File "/opt/trex/v3.05/external_libs/scapy-2.4.3/scapy/utils.py", line 29, in <module>\n    from scapy.modules.six.moves import range\nModuleNotFoundError: No module named \'scapy.modules.six.moves\'\nError in sys.excepthook:\nTraceback (most recent call last):\n  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 228, in partial_apport_excepthook\n    return apport_excepthook(binary, exc_type, exc_obj, exc_tb)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 114, in apport_excepthook\n    report["ExecutableTimestamp"] = str(int(os.stat(binary).st_mtime))\n                                            ^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: \'/opt/trex/v3.05/automation/trex_control_plane/interactive/-m\'\n\nOriginal exception was:\nTraceback (most recent call last):\n  File "<frozen runpy>", line 198, in _run_module_as_main\n  File "<frozen runpy>", line 88, in _run_code\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/scapy_server/scapy_zmq_server.py", line 8, in <module>\n    from ..stl.api import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/stl/api.py", line 4, in <module>\n    from ..utils.common import *\n  File "/opt/trex/v3.05/automation/trex_control_plane/interactive/trex/utils/common.py", line 11, in <module>\n    from scapy.utils import *\n  File "/opt/trex/v3.05/external_libs/scapy-2.4.3/scapy/utils.py", line 29, in <module>\n    from scapy.modules.six.moves import range\nModuleNotFoundError: No module named \'scapy.modules.six.moves\'\n'
Could not start scapy daemon server, which is needed by GUI to create packets.
If you don't need it, use --no-scapy-server flag.
ERROR encountered while configuring TRex system

On Monday, August 19, 2024 at 7:33:41 AM UTC-4 Foday Harris wrote:
Thanks, it worked. 

Foday Harris

unread,
Oct 23, 2024, 9:42:27 AM10/23/24
to TRex Traffic Generator
Reply all
Reply to author
Forward
0 new messages