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

eCAL TCP Layer, attempt to resolve .local instead of just hostname [Link-local connection] #1531

Open
2 of 3 tasks
FlorianReimold opened this issue Apr 16, 2024 · 8 comments · Fixed by #2048
Open
2 of 3 tasks
Assignees
Labels
enhancement New feature or request

Comments

@FlorianReimold
Copy link
Member

FlorianReimold commented Apr 16, 2024

I understand that in the current TCP mode, in order to use eCAL properly, we have to manually key in the hostname-IP mapping on the subscriber machine. This is pretty inconvenient for deployment to customers' machine.

I have tested on both Windows and Ubuntu Linux hosts. There is a good workaround potentially to make the TCP mode work without config.

The trick is that, althought hostnames are not resolved direclty, espically when there is not present of a router (e.g. direct ethernet cable connect of the host and edge machine), by adding the ".local" domain, the mDNS mechanism kicks and systems are able to resolve the hostname.

My suggestion is then:

  1. Make changes to the TCP pubsub behaviour, or at least make as a config setting, to fallback to .local domain, if the direct hostname could not be resolved
  2. This is actually the behaviour of "ping" command in Windows. Which is pretty neat.

Originally posted by @chengguizi in #1521

Roadmap

  • Add .local support for eCAL Services
  • Add .local support for FTP Uploads in eCAL rec client
  • Add .local support in tcp_pubsub
@FlorianReimold FlorianReimold added the enhancement New feature or request label Apr 16, 2024
@FlorianReimold
Copy link
Member Author

I started taking a look at this and implemented a first draft for eCAL Services. I didn't want to implicitely append '.local' from within the service lib, so I created an API that would not only get 1 possible endpoint but a list of them. If the first one wouldn't respond, the next one would be tried.

Unfortunately I cannot really test this at the moment due to technical reasons.

The current status can be compiled as follows:

git clone https://github.com/eclipse-ecal/ecal.git
cd ecal
git checkout feature/service_backup_domain 

git submodule init
git submodule update

cd ecal/service
mkdir build
cd build

cmake .. -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=../../cmake/submodule_dependencies.cmake -DECAL_CORE_BUILD_SAMPLES=ON -DCMAKE_BUILD_TYPE=Debug

cmake -build . --config=Debug
  • Start server: ./service_sample_server --port 1588
  • Start client: ./service_sample_client HOSTNAME:1588 HOSTNAME.local:1588
    This will make it first try to connect to HOSTNAME and then to HOSTNAME.local

@chengguizi
Copy link

@FlorianReimold Pretty much still look forward to having this mDNS feature. Just to check if it is still being considered for a near future release? Thanks!

@FlorianReimold
Copy link
Member Author

We still need at least support for tcp_pubsub (i.e. the TCP layer of eCAL). I didn't have time to work on it, but it is still on the list. The eCAL Services are already working.

@FlorianReimold FlorianReimold self-assigned this Feb 6, 2025
@cvilas
Copy link

cvilas commented Feb 21, 2025

@FlorianReimold I am looking forward to this change going in as well. I am on Linux, and I have been struggling to make my host ping another host in the LAN by name without the .local prefix. Without it, eCAL TCP communications do not work. Have tried messing around with avahi-daemon and related settings - no luck so far

@FlorianReimold
Copy link
Member Author

Yeah, sorry for the slow progress. I recently continued working on it. It will be a modification of tcp_pubsub along with the integration into eCAL of course. Haven't pushed the branch, yet, but the feature is coming. 🤞

In the meantime you have to stick around with manually modifying your hosts file 😬

@chengguizi
Copy link

@FlorianReimold will this feature be released in 5.x, or it is something only in 6.0?

@FlorianReimold
Copy link
Member Author

Probably only 6.0

@FlorianReimold
Copy link
Member Author

eCAL master branch now supports both HOSTNAME and HOSTNAME.local for TCP

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

Successfully merging a pull request may close this issue.

3 participants