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

run_client.py: Unhandled error in Deferred #2

Open
NullByteSuiteDevs opened this issue Sep 19, 2018 · 0 comments
Open

run_client.py: Unhandled error in Deferred #2

NullByteSuiteDevs opened this issue Sep 19, 2018 · 0 comments
Assignees

Comments

@NullByteSuiteDevs
Copy link

NullByteSuiteDevs commented Sep 19, 2018

I'll start by explaining the setup. I have 1 provider and 2 mixnodes running between 2 machines. I'm trying to add a client to each machine. I've double checked the database format and information, all of which is properly done.

When I try to use run_client.py script, I get this message:
Current Path: /home/vecow1/loopix/loopix
Unhandled error in Deferred:

I'm not sure whats happening here. Opening up loopix_client.py I can see that there is supposed to be more output, such as starting message handling/processing. Also, once this error is generated I see a steady stream of subscriptions from the client (in the provider window), like the client is stuck in a loop subscribing to the provider (EDIT: that's supposed to happen).

I tried to research the error and found this but I am at this point unfamiliar with the twisted package and can't make much of what is going on. I can provide more debugging information as needed.

EDIT: After going further into loopix_client.py I see that twisted.internet.task is used to constantly loop the subscribe_to_provider function. Currently looking into twisted.internet.defer to temporarily enable debugging.

EDIT 2: Enabling debugging gave me a stack trace from defer, here it is:
File "/home/vecow1/loopix/loopix/loopix_client.py", line 42, in startProtocol
I: self.get_provider_data()
I: File "/home/vecow1/loopix/loopix/loopix_client.py", line 60, in get_provider_data
I: d = twisted.names.client.getHostByName(self.provider.host)
Digging into twisted I see that twisted.names.client.getHostByName is used for resolving addresses via DNS. The host attribute of a provider object is the IP address of the provider, so this line is trying to resolve an IPv4 address to an IPv4 address. By replacing self.provider.host with self.provider.name, and adding the correct entry to the OSes hosts file, this issue is resolved.

@gdanezis gdanezis assigned gdanezis and aniampio and unassigned gdanezis Oct 20, 2018
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