@eyedeekay
&kytv
&zzz
+Anomaly
+R4SAS
+RN
+RN_
+T3s|4
+acetone
+dr|z3d
+hk
+orignal
+postman
+weko
+wodencafe
Arch
Danny
DeltaOreo
FreeRider
FreefallHeavens
Irc2PGuest12106
Irc2PGuest32754
Irc2PGuest77585
Irc2PGuest77854
Nausicaa
Onn4l7h
Onn4|7h
Over1
Sisyphus
Sleepy_
Soni
T3s|4_
Teeed
aargh2
anon3
b3t4f4c3
bak83
boonst
cumlord
dr4wd3
eyedeekay_bnc
hagen_
itsjustme
khb
mittwerk
not_bob_afk
plap
poriori_
profetikla
r3med1tz
rapidash
shiver_
solidx66
u5657_1
uop23ip
w8rabbit
x74a6
eyedeekay
obscuratus I've been looking at that error too and if we get robin back we should ask if that error is close to the top of the log
obscuratus
ok
eyedeekay
I don't think it happens every time either but I don't know why yet
obscuratus
I've never run across it before.
obscuratus
In as much as 2.3.0 has been out a while, and this throws a big, ugly error, I think this is some kind of corner case.
eyedeekay
Yeah I think I've seen it but I think it's 1/X number of restarts kind of thing, like there's a race to initialize something somewhere
eyedeekay
I have another hunch about that but it's going to take a few hours to test
eyedeekay
I have to amass a tremendous number of peers
robin
The SAM documentation does not explicitly say what the purpose is of the HOST= parameter on a SESSION ADD request. Am I correct that it is the ip address on which the port specified by PORT= is located? And if it is not specified, what is the default?
robin
Or should I be using the sam.udp.host and sam.udp.port parameters instead?
T3s|4
robin: in case you missed it, both eyedeekay and obscuratus wanted to follow-up with you earlier. Please explicitly highlight them when posing i2p development queries :)
eyedeekay
robin you can either use the default port, or set the port on the session line to configure the SAMv3 session, whichever you choose is where you should send the datagrams. Same for host. 99.99% of the time I just use the default
robin
eyedeekay In my case my Python program is NOT running on the same machine as the I2P router. Will HOST default to where the master TCP session is originating?
eyedeekay
Yes I am fairly sure it will, you probably need to set the host
robin
ok. What is the difference between the HOST and sam.udp.host parameters?
robin
Hmm, maybe those sam.udp parameters refer to where SAM is running?
robin
It is just that my program never gets ANY UDP messages back from the router
dr|z3d
how's your c++ robin?
robin
I used to work in C++ a lot, so probably still ok
robin
I am trying to find the SAM src code now...
dr|z3d
ok, great. if you have a look at the i2pchat source, it might give you some hints.
dr|z3d
(it's a functional messenger app that uses sam)
robin
Where would I find that?
robin
Thanks, I will look at that
dr|z3d
maybe start with github.com/vituperative/i2pchat/blob/master/src/backend/SessionController.cpp
robin
Interesting. i2pchat has 10x the lines of code that my Python program does. :)
dr|z3d
wouldn't surprise me, not least because qt apps aren't exactly compact :)
robin
i2pchat is using STREAM connection - I am using DATAGRAMS.
robin
My progam is in getting DATAGRAMS to work.
robin
I have other STREAM code that works fine
dr|z3d
ok, was worth a shot. I thought you might be having issues establishing a session.
dr|z3d
in any event the udp HOST is the router :)
robin
I get the PRIMARY session established ok. And the sub-session gets added ok. But when I actually go to send messages, they dissapear into the ether and do not come out the other end.
robin
I think I am getting something wrong about the host/port combinations
robin
The SAM documetation on the SESSION ADD command is lacking in details
dr|z3d
could be that. are you using java i2p as the host?
robin
yes, Java. Latest update
dr|z3d
ok, and presumably you've got the sam logging at debug level?
robin
Yes
robin
For example, the doc says that PORT= is "Required for Datagram and Raw, invalid for Stream". But it does not actually say what this is used for!
robin
It does talk about LISTEN_PORT
robin
Mybe I should be using LISTEN_PORT instead
dr|z3d
I'd assume PORT is for the host, LISTEN_PORT is for the client.
robin
But PORT= is required!!
robin
O, so I should say PORT=7654?
robin
And LISTEN_PORT= whatever UDP port I just opened?
dr|z3d
it smells like the host doesn't know where to send packets.
dr|z3d
so, handshake seems like where the issue's at.
robin
I agree with that
robin
It might also be that my client is sending the messages to the wrong place too.
dr|z3d
have a look at 127.0.0.1:7657/configclients
dr|z3d
that will indicate which ports you want to use. 7656 appears to be the default for udp.
robin
Ahh, I ofund under sending datagrams, they should go to router port 7655
dr|z3d
not sure what ofunding entails, but maybe :)
robin
*I found
robin
I am looking for hot to receive datagrams in V3.
dr|z3d
I think we're all looking for hot. Let us know when you find her. *wink*
robin
Argh. HOW to receive in V3. I see how v1 and v2 do it
dr|z3d
This is where my insights run dry. eyedeekay is the expert.
robin
That page mentions the SAM TCP ports but nothing about UDP
eyedeekay
I am going to have to have a closer look, I will figure it out from one of the other sam libs
eyedeekay
sam3 in go is the only other one with 3.3 support
dr|z3d
there are two ports mentioned, only one is explicitly tcp, so _maybe_ the one that isn't is udp. just a guess.
robin
It seems clear I should be SENDING datagrams to port 7655.
dr|z3d
ok
robin
7655 is mentioned several times in the doc
robin
So then if I just set LISTEN_PORT for my end, that will complete the handshake. I will try that
obscuratus
robin: If you come across that error you mentioned yesterday again, let me know if you can pass on a method for replicating it, and I'll look into it.
robin
obscuratus ok, but it has not reappeared yet
robin
wireshark shows my UDP message being rejected for "port unreachable". RUnning netstat on the router node shows port 7655 is bound to 126.0.0.1. How do I change that to be receptive to connections from my LAN?
robin
Sorry, 127.0.0.
robin
127.0.0.1
robin
Something in the clients.config.d file for SAM should be able to make it listen for more than local connects
RN
change 127.0.0.1 to 0.0.0.0
RN
but beware
RN
anyone that gets into your lan can then access it
robin
I know about that. But WHERE do I make this change?
RN
and make sure it is blocked from outernet by firewall
RN
oh
robin
It is. Two stacked firewalls in fact
robin
Make that THREE firewalls
RN
ok, so... it is on one of the console /config* pages
RN
using SAM?
RN
/configclients
robin
Yes. The console page says to edit the files in clients.config.d.
RN
java-i2p or i2pd?
robin
But the file for SAM does not show the setting for UDP - it is taking a default. So I do not know what to edit
robin
java
RN
in the console, stop sam, then edit save and start
RN
I think this: net.i2p.sam.SAMBridge sam.keys 0.0.0.0 7656 i2cp.tcp.host=0.0.0.0 i2cp.tcp.port=7654
robin
Edit WHAT?
robin
I know which file, but I do not know what to put in there
robin
I see that line, but I do not know what to add.
RN
when you stop the client it adds an edit button
RN
do it in the console
RN
wait, your line has 0.0.0.0 in both those places?
robin
Both WHICH places?
robin
I stopped SAM, but no edit button appeared
RN
I was expecting you to have 127.0.0.1 for both of those
robin
It says "net.i2p.sam.SAMBridge sam.keys 192.168.2.128 7656 i2cp.tcp.host=127.0.0.1 i2cp.tcp.port=7654"
robin
It mentions TCP but not UDP
RN
the edit button should appear
RN
maybe you need the config advanced = true
RN
also, editing some config files while router is running doesn't work, others will pick up the changes automatically
RN
always best to work from console instead of config file where possible
robin
It says, edit router.config, enabl ADVANCE, then restart. That one?
RN
not sure, but I think the changes are for tcp and udp... bit out of my depth
RN
yeah, if you havent already done that...
RN
heed the caution though
RN
you can really break stuff if you just start changing settings without researching them first
RN
once you reboot, the configadvanced box should be editable
robin
I have often thought it would be nice, at install time, to have a choice, "COnnections local to router node only? yes/no" And then all the defaults change, without having to edit files
RN
neat proposal
RN
you should mention it on ramble or git
robin
I got that idea from something Sadie said on Mastodon, about making things simpler for non-techie users
robin
See, my router node, a small NUC, stays up all the time, so it can help out the network. My apps access from my big desktop machine, which is NOT running all the time
robin
restarting
robin
Well, I enabled advanced config editing, but all that does is give me a text box containing that one line from the SAM config file. So I am right back where I started: what is the name of the symbol I have to set to make SAM listen on 0.0.0.0?
RN
go back on the clientsconfig and stop the client, see if the edit button appears
RN
if it does, you can change both IP to 0.0.0.0
RN
if it does not, I'm not sure what to try next
robin
I stopped SAM Bridge. Edit button appeared. Clciking that shows me the text box I described. It has some TCP settings in it
robin
I will have to look at the SAM source code...
RN
so you are running it on a nuc, I have a couple of those I hadn't decided what to do with
robin
The router is on a NUC, yes. That also runs pi-hole and is my local caching DNS server
RN
nice, I've got those functions on a tower right now running fbsd...
robin
It is wired directly to the LAN router and can see the full fiber bandwidth, though I don't let I2P use all of that
RN
sounds like a good setup
RN
myself I'd just try changing both IP on that text box to 0.0.0.0, but let us know what you find in the sam source
robin
I throttle I2p to fit into a popular speed range among all routers so I am hidden among a larger crowd
RN
I know it doesn't mention udp, but I'm presuming the same IP config applies to both
robin
I have edited an IP address there, which seems to only affect the TCP cpnnections. I can make the Primary Session connection just fine, and that uses TCP.
RN
ok, at this point I am out of my depth, hopefully someone more experienced speaks up
RN
at least you don't have to change it in the config file now, you may be able to append things on that line for udp perhaps... but probably need to find some details in doc or source
robin
The SAM doc (all 15 pages of it) does not mention any of this
RN
yeah, I think the TCP part is much more fleshed out than UDP. but don't have anything else to try at this point.
robin
src code says the magic keywords are sam.udp.host and sam.udp.port
robin
Awaiting restart
eyedeekay
Sorry I was away from my desk for a while, yes those are the configs
dr|z3d
0.0.0.0 shouldn't be necessary in most cases, and inadvisable when the router in question is exposed.
dr|z3d
in most cases you just want a lan ip, RN.