aeonix / aeon

AEON source code (post May 2018 rebase)
Other
58 stars 43 forks source link

aeond over torsocks #174

Open aeon1234 opened 4 years ago

aeon1234 commented 4 years ago

while monerod is working fine over torsocks (after waiting some time), aeond seems not to work and is giving me errors.

used commands

tried both on ubuntu 19.10 and manjaro.

aeond console

2020-04-22 20:01:12.217 [P2P0] ERROR net contrib/epee/include/net/abstract_tcp_server2.inl:1193 Exception at [boosted_tcp_server<t_protocol_handler>::connect], what=bind: Cannot assign requested address 2020-04-22 20:01:12.217 [P2P0] INFO net.p2p src/p2p/net_node.inl:941 [0.0.0.0:0 OUT] Connect failed to 74.91.23.186:11180 2020-04-22 20:01:12.217 [P2P0] WARN net.p2p src/p2p/net_node.inl:1185 Failed to connect to any of seed peers, continuing without seeds 2020-04-22 20:01:12.217 [P2P0] INFO net.p2p src/p2p/net_node.inl:1241 Failed to connect to any, trying seeds

full log here: aeon.log

I had a short look in mentioned file (contrib/epee/include/net/abstract_tcp_server2.inl aeon / xmr) which is different in xmr and aeon and also the function which throws the exception is a bit different. but I do not know if this has any relevance here.

while smooth mentioned that it may be due to fewer nodes on the aeon network, I hope someone can have an in-depth look.

thank you.

ghost commented 4 years ago

Can confirm I got the same error.

~$ torsocks ./aeon-v0.14.0.0/aeond --p2p-bind-port=***** --rpc-bind-ip=0.0.0.0 --rpc-restricted-bind-port=***** --confirm-external-bind;                                                                                       
2020-10-23 17:21:29.280     7f0d1eff6380        INFO    global  src/daemon/main.cpp:227 Aeon 'Chronos' (v0.14.0.0-release)                                                                                                                   
2020-10-23 17:21:29.281     7f0d1eff6380        INFO    global  src/daemon/protocol.h:53        Initializing cryptonote protocol...                                                                                                          
2020-10-23 17:21:29.281     7f0d1eff6380        INFO    global  src/daemon/protocol.h:58        Cryptonote protocol initialized OK                                                                                                           
2020-10-23 17:21:29.281     7f0d1eff6380        INFO    global  src/daemon/p2p.h:63     Initializing p2p server...                                                                                                                           
2020-10-23 17:21:29.290     7f0d1eff6380        FATAL   net     contrib/epee/include/net/abstract_tcp_server2.inl:862   Error starting server: listen: Operation not permitted                                                               
2020-10-23 17:21:29.292     7f0d1eff6380        INFO    global  src/daemon/core.h:103   Deinitializing core...                                                                                                                               
2020-10-23 17:21:29.294     7f0d1eff6380        ERROR   daemon  src/daemon/core.h:108   Failed to deinitialize core...                                                                                                                       
2020-10-23 17:21:29.295     7f0d1eff6380        INFO    global  src/daemon/protocol.h:75        Stopping cryptonote protocol...                                                                                                              
2020-10-23 17:21:29.295     7f0d1eff6380        INFO    global  src/daemon/protocol.h:79        Cryptonote protocol stopped successfully                                                                                                     
2020-10-23 17:21:29.295     7f0d1eff6380        ERROR   daemon  src/daemon/main.cpp:295 Exception in main! Failed to initialize p2p server.

While torsocks does not look supported, you can access tor with IPTables although it seems the tor community advises against sending p2p traffic through tor. Using a VPN may be the recommended option.

iamsmooth commented 4 years ago

@aeonic-spirit I wouldn't worry about the advice not to run p2p over tor. That was referring to bittorrent which is much higher volume than any coin but certainly for AEON.

iamsmooth commented 4 years ago

Also, I think upstream might have a better solution than torsocks for running over Tor. Perhaps we should look at merging it.

stoffu commented 4 years ago

This is the first upstream PR related to Tor: https://github.com/monero-project/monero/pull/4988 , which will be merged to AEON soonish in the upcoming upstream merges. Since in general I'm not so familiar with this kind of network-related code, I'm going to just merge such relevant upstream PRs in order, rather than out-of-order to bring them to AEON immediately (I don't feel the need for it).

ghost commented 4 years ago

@aeonic-spirit I wouldn't worry about the advice not to run p2p over tor. That was referring to bittorrent which is much higher volume than any coin but certainly for AEON.

Good point, after syncing traffic is light.