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

Functional test for i2p fails due to connection attempt on port !=0 #65

Closed
gitcoindev opened this issue Nov 17, 2021 · 1 comment
Closed

Comments

@gitcoindev
Copy link
Contributor

gitcoindev commented Nov 17, 2021

I am reporting this issue while working on #63

Detected by failing functional test: p2p_i2p_ports.py

The test assumes that an I2P SAM proxy is not listening and tries to connect via i2p on port 8333.

Expected result:

Connection is not attempted.

Actual behaviour:

 node0 2021-11-17T08:14:18.170452Z [httpworker.2] [rpc/request.cpp:174] [parse] ThreadRPCServer method=addnode user=__cookie__ 
 node0 2021-11-17T08:14:18.170512Z [httpworker.2] [net.cpp:399] [ConnectNode] trying connection zsxwyo6qcn3chqzwxnseusqgsnuw3maqnztkiypyfxtya4snkoka.b32.i2p:8333 lastseen=0.0hrs 
 node0 2021-11-17T08:14:18.170531Z [httpworker.2] [i2p.cpp:239] [Log] I2P: Creating SAM session with 127.0.0.1:60000 
 node0 2021-11-17T08:14:18.170602Z [httpworker.2] [netbase.cpp:534] [LogConnectFailure] connect() to 127.0.0.1:60000 failed after wait: Connection refused (111) 
 node0 2021-11-17T08:14:18.170647Z [httpworker.2] [i2p.cpp:239] [Log] I2P: Error connecting to zsxwyo6qcn3chqzwxnseusqgsnuw3maqnztkiypyfxtya4snkoka.b32.i2p:8333: Cannot connect to 127.0.0.1:60000 
 node0 2021-11-17T08:14:18.170664Z [httpworker.2] [i2p.cpp:239] [Log] I2P: Control socket error: not connected 
 test  2021-11-17T08:14:18.171000Z TestFramework (ERROR): Assertion failed 
                                   Traceback (most recent call last):
                                     File "bitgesell/test/functional/test_framework/test_framework.py", line 132, in main
                                       self.run_test()
                                     File "test/functional/p2p_i2p_ports.py", line 34, in run_test
                                       raise AssertionError("Assertion should have been raised")

How to reproduce:

Run functional test: python test/functional/p2p_i2p_ports.py

Root cause:

Not known, yet.

The same test passes on btc@master:

$ python test/functional/p2p_i2p_ports.py
2021-11-17T08:20:03.515000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_32q6d44w
2021-11-17T08:20:03.800000Z TestFramework (INFO): Ensure we don't try to connect if port!=0
2021-11-17T08:20:05.816000Z TestFramework (INFO): Ensure we try to connect if port=0 and get an error due to missing I2P proxy
2021-11-17T08:20:05.870000Z TestFramework (INFO): Stopping nodes
2021-11-17T08:20:05.972000Z TestFramework (INFO): Cleaning up /tmp/bitcoin_func_test_32q6d44w on exit
2021-11-17T08:20:05.973000Z TestFramework (INFO): Tests successful

@gitcoindev
Copy link
Contributor Author

Does not fail on master after last updates.

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

1 participant