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

Example code only seems to work if I change the server to use ipv4 #381

Closed
CaliViking opened this issue Oct 3, 2022 · 6 comments
Closed
Assignees

Comments

@CaliViking
Copy link

If I try to provide an ipv6 address in the client (say ::1:8080) the client refuses to accept the format.

I changed the code in the server to use ipv4:
let server_addr = (IpAddr::V4(Ipv4Addr::LOCALHOST), flags.port);

I can now connect with an ipv4 address from the client.

Am I doing this wrong, or is there a bug in the example code?

@tikue
Copy link
Collaborator

tikue commented Oct 7, 2022

Thanks for the report! That's interesting — I can't reproduce this problem on my Macbook, but I can't say you're doing anything wrong either! At least, not without a bit more info :)

  • What's the specific error you're getting? Is it something like invalid IP address syntax?
  • Can you try --server-addr '[::1]:59061'?

@tikue tikue self-assigned this Oct 7, 2022
@ha-sante
Copy link

Same experience on end. Would add using the tarpc module feels like working in the dark as there is no logs you can tap into.

  • Documentation can be incredibly better for launching a tcp transport server.
  • Logs can be better for the dev experience.
  • Example service doesn't tell you anything on fresh launch(execute client bin and it dosen't get a response log).

Still exploring for my use case and haven't managed to make an RPC call for 2 days now with pure pull from the example service.

Sorry.

Will contribute to making things better when am able to successfully make use of it and it's associated features. - A big blocker to contributions.
Sorry.

@tikue
Copy link
Collaborator

tikue commented Nov 11, 2022

Hi, I'm sorry you've had a frustrating experience! Feel free to join the discord channel where others might help fix your problems faster.

There should be some logs available for the client binary, not sure what's going wrong. Have you enabled log output with RUST_LOG environment variable? E.g. RUST_LOG=debug cargo run --bin client?

@ha-sante
Copy link

ha-sante commented Nov 11, 2022

F##k yeah, it finally logged. Your command did it.

Would this be my knowledge of rust or it's how you get debug information from your setup?

- I learned rust much more fully a few days ago hence my curiosity

Most helpful thing I will do now is to write a beginners guide once am up to speed with what am doing.

@tikue
Copy link
Collaborator

tikue commented Nov 11, 2022

Nice! RUST_LOG is not specific to tarpc, but it would still be good for the tarpc examples that use it to specify how to get output :)

@ha-sante
Copy link

Can see, my memory bank needs an update. Thanks for the insight.

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

3 participants