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
Peer to Peer mode questions #39
Comments
Hi @ynasida If you re-run
it probably says If you'd like p2p mode, you should use the Docker container or install opendht from source first or via Homebrew. The message:
is just because there are no bad_actors yet, so the table hasn't been created in Thanks, |
How did you get on @ynasida ? |
Hi @ghenry Thanks a lot for your response! Yes opendht is not installed it it's the reason. Some error message would be very useful but the best option would be to have good instruction how to compile opendht :) I tried but had not luck. I am not so familiar with docker but have to use this way because I need p2p mode. 'SentryPeer node id: 8ae32230-d9d8-4a04-9f83-9bb00f16735f How can I see same things with docker variant? I already set env variables you mentioned on the page but can see sentrypeer_json.log only (almost nothing) |
Thanks for replying. If you're using the Docker hub one and not doing https://github.com/SentryPeer/SentryPeer#docker then you'd need to rebuild the container and just add a I'd install OpenDHT via Homebrew and rebuilt SentryPeer: https://brew.sh/ What OS are you on? I'm still working on rpms and debs for v1.4.0 as OpenDHT needs to be updated for the C libs. Thanks. |
Sorry, I forget the issue subject says Debian 11 :-D |
Thanks again @ghenry ! I added -d to the CMD section in the Dockerfile and did rebuild. Now I see that sentrypeer process (in docker container) is started with -d flag but... I still not sure where I should see logs I need ( like 'Peer to Peer DHT mode enabled', etc )? sentrypeer_json.log has not this. In general I would like to see logs like 'connected to p2p node - ip address, downloading, etc' Btw, can you please advice how many p2p members SentryPeer currently have ? I also tried to install OpenDHT via Homebrew. useradd ynasida /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" cd /home/ynasida It download many things and get stuck here (please look at picture). |
Hmm, that is strange for Homebrew. For your container, check out this post - https://stackoverflow.com/a/41147654/1072411 |
Thanks for good advice about container's logs! I did like you said and also disabled SIP mode to see p2p logs only. root@sentrypeer:/usr/src/SentryPeer-git# tail -f {"log":"Starting sentrypeer...\n","stream":"stderr","time":"2022-04-27T14:12:28.660215746Z"} {"log":"GET /ip-addresses from Client IP: My_IP\n","stream":"stderr","time":"2022-04-27T14:18:10.594584098Z"} May be some iptables settings ? I have these: |
Hi @ynasida If any other SentryPeer nodes are online, enabled with p2p mode and connected bootstrap.sentrypeer.org or other nodes, then when they get a probe, you will get their bad_actor. p2p mode is best effort replication, i.e. you get bad_actors from other peers if they are online and you are too. No catch up like blockchain etc. The data would be too stale otherwise. In the unreleased version of SentryPeer (main branch) is the new Does this all make sense and read OK? Thanks, |
We do store bad actors permanently on the DHT, so we could get them on start up. I've just done it so we listen on that key and get other nodes data when they PUT it. So we could catch up somewhat, to build an historic database. |
Thanks, @ghenry ! 'If any other SentryPeer nodes are online, enabled with p2p mode and connected bootstrap.sentrypeer.org or other nodes, then when they get a probe, you will get their bad_actor.' I see that node I have is connected to bootstrap.sentrypeer.org. Thus I should get bad_actor from others nodes when they get a probe. But I do not see any activity during the night. Does it means that there is not nodes online that wants to share ? 'In the unreleased version of SentryPeer (main branch) is the new -b flag, where you can run your own bootstrap node.' Please advice. |
My pleasure.
Yeah, maybe no one online. This is a new project. My node is usually on sharing things, but it's down just now as I'm working on TCP mode. I'm speaking at various places to get others online like https://chat.uknof.org.uk/public/channels/uknof49ops and Comms Council (this Friday)
Just https://github.com/savoirfairelinux/opendht/wiki/Running-a-node-with-dhtnode
|
Thank you so much for your answers! I think discussion can be closed :) |
Trying running two nodes on different IP addresses and then using sipsak against one. You should see the replication on the other node. |
Going to close for now. Get back in touch with any other questions @ynasida Thanks! |
Thanks @ghenry ! Seems like I got extra questions. I checked by iftop and see a lot of weird traffic. Please look at some screens and advice. |
It will be all the peer to peer traffic. As we're listening on port 4222, you start to become part of the main OpenDHT (https://jami.net) DHT - which you can see in your iftop. |
I see but... 3265GB.. I expected I would send and receive fraud ip addresses and numbers. I have 200+ ip addresses and about 1000+ numbers in the database. Is it possible to use opendht for traffic we need only ? |
Yeah, good point! I'll ask the team, but I don't think so. You're part of a public DHT and that means all bad_actors will get distributed and HA/DR is fantastic for that. Running it on your own private VLAN and with your own bootstrap node firewalled off would probably be the best way to limit that. Thanks. |
Was discussing this here too savoirfairelinux/opendht#589 |
Hello, @ghenry Thanks again for you answers! 'Running it on your own private VLAN and with your own bootstrap node firewalled off would probably be the best way to limit that.' But I think p2p will work between my opendht nodes only ? I have read discussion you mentioned but looks like they have not problem I mentioned. 3265GB.. |
Are you sure that figure is right? I'm running our public bootstrap node on the free Oracle Cloud tier. |
@ghenry I got alert from Linode and it is the only software installed. You think I should try re-install at oracle cloud ? |
Yeah, try it there. No issues for me and is 100% free.
…On Wed, 11 May 2022, 08:53 ynasida, ***@***.***> wrote:
@ghenry <https://github.com/ghenry> I got alert from Linode and it is the
only software installed. You think I should try re-install at oracle cloud ?
—
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG66A34XTXBMNV4BRLC7LVJNROJANCNFSM5TZQF2VQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@ghenry I did not try oracle cloud but did re-installing of simple docker version at new linode VPS. Old linode VPS was tested with different ways to install sentrypeer and I thought something could be the reason of my issue. But... I had not luck. 'Your Linode, SentryPeer1, has exceeded the notification threshold (10) for outbound traffic rate by averaging 19.82 Mb/s for the last 2 hours. ' I am pretty sure it's related with OpenDHT and still don't understand how to use p2p in this case. May be you have some special iptables rules that prevent OpenDHT to use so many traffic ? Please advice. |
I'll get some udp nftables or iptables examples to you and maybe see if I can bake it into the Docker container. |
In your logs, do you see anything like this: |
This is the bug that's causing so much bandwidth usage.
|
I see. Can we fix ? Or we should wait till opendth will fix ? |
We'll need to wait. I'm going to be looking into it more soon.
|
Hello, @ghenry, do we have any news ? |
Looking at new designs...: savoirfairelinux/opendht#599 (comment) Thanks. |
Hello @ghenry , Just would like to ask if it is possible to use sentrypeer with p2p currently. Thanks |
Hi ynasida,
Apologies for not replying in June. I somehow missed that.
If you run your own private bootstrap node (use dhtnode) and point
SentryPeer to that, you can.
I've not done any further work yet to improve traffic. I've been learning
phoenixframework.org and LiveView for a SentryPeerHQ web ui.
SentryPeer can now POST results to a url in json as per v2.0.0 release.
Thanks.
…On Wed, 28 Sept 2022, 13:41 ynasida, ***@***.***> wrote:
Hello @ghenry <https://github.com/ghenry> ,
Just would like to ask if it is possible to use sentrypeer with p2p
currently.
Thanks
—
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG66CO7S3K3ZRRBDMSUZTWAQ4F3ANCNFSM5TZQF2VQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello,
I follow the instruction 'Building from source' but do not see that p2p mode is started.
May be I should configure with some options ?
health-check is fine but I do not see any bad actors ip addresses.
In console:
'Failed to prepare statement: no such table: honey'
sentrypeer -drawps
SentryPeer node id: 5d9c4356-4471-402a-af0c-93b0bb1fcda8
Starting sentrypeer...
API mode enabled, starting http daemon...
Web GUI mode enabled...
SIP mode enabled...
Configuring local address...
Creating UDP socket...
Binding socket to local address...
Listening for incoming connections...
SIP responsive mode enabled. Will reply to SIP probes...
GET /ip-addresses from Client IP: 127.0.0.1
Checking url: /ip-addresses, against route: /health-check
Checking url: /ip-addresses, against route: /
Checking url: /ip-addresses, against route: /ip-addresses
Route is an exact match.
Failed to prepare statement: no such table: honey
Failed to select bad actors from database
The text was updated successfully, but these errors were encountered: