3

I configured the I2P according to this answer on Ubuntu 20.04 and 21.10.

But I have been getting the following error when I try to connect to any I2P peer:

I2P: Error connecting to a5qsnv3maw77mlmmzlcglu6twje6ttctd3fhpbfwcbpmewx6fczq.b32.i2p:0: Receive timeout (received 0 bytes without terminator before that)

This error occurs for any peer, not just the above.

How can I find the reason for this error and fix it?


UPDATE: Adding information requested by Prayank.

$ sudo ufw status verbose
Status: inactive
$ ss -nlt
State                Recv-Q               Send-Q                               Local Address:Port                                Peer Address:Port               Process               
LISTEN               0                    128                                      127.0.0.1:7656                                     0.0.0.0:*       
...

UPDATE 2: I was able to reach the website git.idk.i2p using the steps described in http://geti2p.net/en/about/browser-config .


UPDATE 3: Results of executing the steps: https://github.com/vasild/bitcoin/pull/4

$ telnet 127.0.0.1 7656
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
HELLO VERSION MIN=3.1 MAX=3.1
HELLO REPLY RESULT=OK VERSION=3.1
SESSION CREATE STYLE=STREAM ID=mysession1 DESTINATION=TRANSIENT SIGNATURE_TYPE=7
<no-response>

According to the text, a response (SESSION STATUS RESULT=OK) was expected. This didn't happen. No response was received.

Result of the other test.

$ telnet 127.0.0.1 7656
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
HELLO VERSION MIN=3.1 MAX=3.1
HELLO REPLY RESULT=OK VERSION=3.1
NAMING LOOKUP NAME=git.idk.i2p
NAMING REPLY RESULT=OK NAME=ME VALUE=80...AAA==
STREAM CONNECT ID=mysession1 DESTINATION=80...AAA== SILENT=false
STREAM STATUS RESULT=CANT_REACH_PEER

Received CANT_REACH_PEER instead of STREAM STATUS RESULT=OK.

m10b
  • 51
  • 6
  • 2
    Confirm if ports are open according to things mentioned [here](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/15_1_i2p_service.md#prepare-ports). Share result for `ss -nlt`, `bitcoin-cli -netinfo` i2p related logs from `~/.bitcoin/debug.log`. Check if `i2p_private_key` is created in ~/.bitcoin/ –  Nov 21 '21 at 17:54
  • 1
    @vasild also asks "Can you reach anything over I2P? For example, can you browse http://git.idk.i2p/ using the router's http proxy?" – Michael Folkson Nov 22 '21 at 15:23

2 Answers2

3

Can you reach anything over I2P? For example, can you browse http://git.idk.i2p/ using the router's http proxy?

vasild
  • 41
  • 2
  • 1
    Thank you for coming here @vasild! You are very welcome! Attempts to clarify the question should be in the comments to the question like @Prayank has done rather than posting as an answer. Feel free to edit your answer when we work out what the issue is. – Michael Folkson Nov 22 '21 at 15:22
  • Yes. I was able to reach this site (http://git.idk.i2p/) using the steps described in https://geti2p.net/en/about/browser-config . – m10b Nov 22 '21 at 22:19
  • 1
    I cannot post a comment to the question because "You must have 50 reputation to comment" (but apparently I can post a comment here to my answer). – vasild Nov 23 '21 at 16:56
  • 1
    Hello, can you follow the steps from here: https://github.com/vasild/bitcoin/pull/4#issuecomment-977719186 (I can't write long comments here and also all new lines are removed and thus formatting is screwed). – vasild Nov 24 '21 at 10:02
  • @vasild I updated the question text with the result of the tests described in the link you sent. – m10b Nov 25 '21 at 08:22
  • 1
    So it's not possible to create a session, hmm. I never experienced this. It looks like your I2P router is somehow not fully connected to the I2P network or broken in some other way. Can you take this to the I2P developers? The second test is meaningless without a session because it tries to use the session "mysession1" created in the first test in the "STREAM CONNECT" command. However I see a few strange things in its output: 1. you got "NAME=ME" in the "NAMING REPLY" I think it should be "NAME=git.idk.i2p" and 2. using a nonexistent session "mysession1" in the "STREAM CONNECT" did not – vasild Nov 25 '21 at 16:55
  • 1
    did not produce STREAM STATUS RESULT=INVALID_ID MESSAGE="STREAM SESSION ID mysession1 does not exist" but instead produced "CANT_REACH_PEER". It takes ~5 seconds for me for SESSION CREATE to return a result and create the session, it is talking to the I2P network. Maybe the session was also created in your case but it took way tooo long? – vasild Nov 25 '21 at 16:58
  • 1
    Which version of I2P router are you using? – vasild Nov 25 '21 at 16:59
  • i2pd version 2.29.0 (0.9.43) - Boost version 1.71.0 - OpenSSL 1.1.1d 10 Sep 2019 Ubuntu 20.04 on VMWare. Does it make a difference to use a virtual machine? Does I2P require opening a port on the router? – m10b Nov 25 '21 at 18:30
  • 2.29 is from Oct 2019, 2+ years old. The latest one is 2.39. The old one should work, but I have no other suggestion, other than to try a newer version :( ... or the java one from geti2p.net. Boost, OpenSSL and VM/or-no-VM should be irrelevant. "Does I2P require opening a port on the router?" -- no. – vasild Nov 26 '21 at 08:03
2

I was able to fix this issue by going to http://127.0.0.1:7657/configclients in the browser and enabling "SAM application bridge".

This was disabled by default.

m10b
  • 51
  • 6