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

Bad UX when ign-transport is misconfigured #218

Closed
peci1 opened this issue Feb 2, 2021 · 13 comments
Closed

Bad UX when ign-transport is misconfigured #218

peci1 opened this issue Feb 2, 2021 · 13 comments
Assignees

Comments

@peci1
Copy link
Contributor

peci1 commented Feb 2, 2021

I've spent an hour today figuring out why my ign topic -l output is empty while gazebo is running right next to it. Today it was IGN_TRANSPORT_TOPIC_STATISTICS. Earlier, I spent a day finding a forgotten remnant of ign-citadel (gazebosim/gz-sim#294).

In both cases, ign topic -l just sits there with its empty result and tells you everything's fine. With no clue whatsoever why is that.

I see two possible ways to improve this:

  1. Prepare a static stderr message that would be printed every time the output of ign topic -l is empty.
  2. Implement some clever fallback/autodetection that would automatically try different installed versions of ign-transport, different values of IGN_TRANSPORT_TOPIC_STATISTICS and whatever is added in the future. If it succeeds with some of these fallback settings, it should tell the user exactly what are his/her options to fixing that.

This is just about ign topic -l (and also ign service -l). Maybe there are other CLI tools that would make use of such improvement. But from my experience, when things go haywire, ign topic -l is among the first things I try to diagnose the problem.

@malcolmst
Copy link

Spent a couple hours with gdb tonight figuring out the IGN_TRANSPORT_TOPIC_STATISTICS issue, wish I saw your post earlier 😃 . At a minimum, it would be nice to have some error indicating there is a version mismatch rather than silently dropping the mismatching discovery packets with no indication of error.

@malcolmst
Copy link

Had one thought on this: maybe the existing IGN_VERBOSE environment variable could be used to enable more detailed debug information such as a version mismatch (e.g. by setting IGN_VERBOSE=2).

@peci1
Copy link
Contributor Author

peci1 commented May 7, 2021

Another unexpected case:

  1. run simulator with IGN_IP=127.0.0.1
  2. call a service from the same computer via ign service without configuring IGN_IP
  3. the service isn't called, probably because the CLI chooses a non-localhost IP as the source IP for the call

@caguero
Copy link
Collaborator

caguero commented May 7, 2021

Another unexpected case:

  1. run simulator with IGN_IP=127.0.0.1
  2. call a service from the same computer via ign service without configuring IGN_IP
  3. the service isn't called, probably because the CLI chooses a non-localhost IP as the source IP for the call

Hmm, that works for me with the example/requester and example/responser from the examples/ directory.

@peci1
Copy link
Contributor Author

peci1 commented May 7, 2021

Another unexpected case:

  1. run simulator with IGN_IP=127.0.0.1
  2. call a service from the same computer via ign service without configuring IGN_IP
  3. the service isn't called, probably because the CLI chooses a non-localhost IP as the source IP for the call

Hmm, that works for me with the example/requester and example/responser from the examples/ directory.

I tried that with https://github.com/osrf/subt/wiki/Breadcrumbs-and-communication-visualization-tutorial . If I run competition.ign with IGN_IP=127.0.0.1, then the service call as written on the wiki page doesn't work.

@caguero
Copy link
Collaborator

caguero commented May 7, 2021

I tried that with https://github.com/osrf/subt/wiki/Breadcrumbs-and-communication-visualization-tutorial . If I run competition.ign with IGN_IP=127.0.0.1, then the service call as written on the wiki page doesn't work.

Just checking, did you set IGN_TRANSPORT_TOPIC_STATISTICS in the terminal where you're running ign service?

@peci1
Copy link
Contributor Author

peci1 commented May 7, 2021

Yes, in both. Just prepending IGN_IP=127.0.0.1 before the ign service call fixes the issue.

@caguero
Copy link
Collaborator

caguero commented May 7, 2021

I can't reproduce it with the basic responser/requester example. Maybe there's something else in the mix.

@peci1
Copy link
Contributor Author

peci1 commented May 7, 2021

Okay, the breadcrumb visualization service has the HOST advertise option set. If you add it to the basic responser/requester example, it behaves exactly as I describe.

@peci1
Copy link
Contributor Author

peci1 commented May 8, 2021

It seems to me this check:

https://github.com/ignitionrobotics/ign-transport/blob/133dcf0379e1d6231e30dc6cb0bf1692fe13c4f1/include/ignition/transport/Discovery.hh#L1053-L1054

needs to be more like _fromIP in this->hostAddresses for it to work. Am I right? Should I report it as a new issue?

@caguero
Copy link
Collaborator

caguero commented May 10, 2021

It seems to me this check:

https://github.com/ignitionrobotics/ign-transport/blob/133dcf0379e1d6231e30dc6cb0bf1692fe13c4f1/include/ignition/transport/Discovery.hh#L1053-L1054

needs to be more like _fromIP in this->hostAddresses for it to work. Am I right? Should I report it as a new issue?

You are, I'll take a look at it soon. No need to create a new issue, I got it. Thanks!

@caguero
Copy link
Collaborator

caguero commented May 12, 2021

@peci1 , could you give it a shot? #245

@peci1
Copy link
Contributor Author

peci1 commented Aug 17, 2021

Fixed by #245 and released in 9.1.1 .

@peci1 peci1 closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants