Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to enable network for multicast data transfers (version 6.0.0-rc.1) #2007

Open
cvilas opened this issue Feb 6, 2025 · 3 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@cvilas
Copy link

cvilas commented Feb 6, 2025

Problem Description

In eCAL v6.0.0-rc.1, I am unable to send data between senders and receivers over the network.

How to reproduce

  • Enable network receive in binary_rec.cpp as follows
    auto config = eCAL::Init::Configuration();
    config.registration.network_enabled = true;
    eCAL::Initialize(config, "binary_rec");
    
  • Enable network send in binary_snd.cpp as follows
    auto config = eCAL::Init::Configuration();
    config.registration.network_enabled = true;
    eCAL::Initialize(config, "binary_snd");
    
  • Build both programs and run them on the same host
  • I get the following output from the snd application
    ./bin/ecal_sample_binary_snd
    [eCAL][Config] Specified yaml configuration path not valid:"ecal.yaml". Using default configuration.
    CUDPReceiverAsio: Unable to join multicast group: Invalid argument
    1738835768645 ms | vilas-t14s | binary_snd | 63508 | error | Could not load eCAL time sync module libecaltime-localtime.so
    CSampleSender::Send failed with: 'Permission denied'
    Sent buffer filled with 1
    ....
    Sent buffer filled with 10
    CSampleSender::Send failed with: 'Permission denied'
    CSampleSender::Send failed with: 'Permission denied'
    Sent buffer filled with 11
    ...
    Sent buffer filled with 20
    CSampleSender::Send failed with: 'Permission denied'
    CSampleSender::Send failed with: 'Permission denied'
    Sent buffer filled with 21
    
  • I get the following output from the rec application running alongside
    ./bin/ecal_sample_binary_rec
    [eCAL][Config] Specified yaml configuration path not valid:"ecal.yaml". Using default configuration.
    CUDPReceiverAsio: Unable to join multicast group: Invalid argument
    1738835763548 ms | vilas-t14s | binary_rec | 63429 | error | Could not load eCAL time sync module libecaltime-localtime.so
    CSampleSender::Send failed with: 'Permission denied'
    CUDPReceiverAsio: Unable to join multicast group: Invalid argument
    CSampleSender::Send failed with: 'Permission denied'
    CSampleSender::Send failed with: 'Permission denied' 
    ....
    CSampleSender::Send failed with: 'Permission denied'
    CSampleSender::Send failed with: 'Permission denied'
    ^C
    

How did you get eCAL?

Custom Build / Built from source

Environment

  • eCAL v6.0.0-rc.1
  • OS: Ubuntu 24.04
  • CMake 3.31.5
  • Compiler: gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2~24.04)

eCAL System Information

[eCAL][Config] Specified yaml configuration path not valid:"ecal.yaml". Using default configuration.
1738836635112 ms | vilas-t14s | eCALConfig | 79400 | error | Could not load eCAL time sync module libecaltime-localtime.so
------------------------- SYSTEM ---------------------------------
Version                  : v6.0.0-rc.1-dirty (04.02.2025)
Platform                 : linux

------------------------- CONFIGURATION --------------------------
Default INI              : 

------------------------- NETWORK --------------------------------
Host name                : vilas-t14s
SHM transport domain     : vilas-t14s
Network mode             : local
Network ttl              : 1
Network sndbuf           : 5 MByte
Network rcvbuf           : 5 MByte
Multicast cfg version    : v2
Multicast group          : 239.0.0.1
Multicast mask           : 255.255.255.240
Multicast ports          : 14002 - 14012
Multicast join all IFs   : off

------------------------- TIME -----------------------------------
Synchronization realtime : ecaltime-localtime
Synchronization replay   : 
State                    :  not synchronized 
Master / Slave           :  Slave 
Status (Code)            : "Failed to load realtime timesync module ecaltime-localtime" (-1)

------------------------- SUBSCRIPTION LAYER DEFAULTS ------------
Layer Mode UDP MC        : on
Drop out-of-order msgs   : on
@cvilas
Copy link
Author

cvilas commented Feb 6, 2025

Aha! Just noticed that I have to set

config.transport_layer.udp.mode = eCAL::Types::UDPMode::NETWORK;

I wasn't expecting that. Could the mode not be selected automatically based on network_enabled setting? Wondering what the use-case is for enabling network send/recv with LOCAL UDP mode

@KerstinKeller
Copy link
Contributor

Hi @cvilas,

this is indeed problematic.
The whole configuration concept is new for eCAL 6.
The very least that we need to do is that we need to check if the configuration is valid and in this case report that this is not a valid configuration.

It would be even better if we were able to check this atomically, with a setter function or similar.

@cvilas
Copy link
Author

cvilas commented Feb 7, 2025

This way of configuration is a big improvement over v5 I think. Perhaps a validate(eCAL:: Configuration &) that reports helpful error messages is a good start

@hannemn hannemn added the enhancement New feature or request label Feb 7, 2025
@hannemn hannemn added this to the eCAL 6.0 milestone Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants