SeattleTestbed / seash

Interactive vessel management tool
MIT License
0 stars 10 forks source link

Seash's nat traversal is broken! #62

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

For some reason, Seash NAT traversal doesn't work anymore. There has been no changes to seash since the New Zealand conference cooled down, so its probable that a change elsewhere propagated to seash undetected.

I am currently tracking down exactly which revision caused this to break.

Enabled modules: clearinghouse, dyrun, factoids, geoip, modules, variables

 !> loadkeys guest0
 !> as guest0 browse
['8608b03d11aabd7d0d027eb38311305c1818df3a.zenodotus.poly.edu:53810']
An error occurred: Provided destip is not valid! IP: '8608b03d11aabd7d0d027eb38311305c1818df3a.zenodotus.poly.edu'
Affected vessels: 8608b03d11aabd7d0d027eb38311305c1818df3a.zenodotus.poly.edu:53810.
Could not add any new targets.
 !>
choksi81 commented 10 years ago

Author: leonwlaw r7140 was the last seash change. Things still work at this point. At r7220, a List out of range error was introduced. This was fixed later in r7254, but the error that we run into can be found then. Therefore, the problematic revision lies somewhere between r7120 and r7254. I will try to apply the fix in r7254 and zero out exactly where this problem started to occur.

choksi81 commented 10 years ago

Author: leonwlaw Sorry, I meant to say between r7220 and r7254.

choksi81 commented 10 years ago

Author: leonwlaw I have inserted a print statement inside the overwritten new_openconnection function defined in seash_helper, and found out that the problematic revision was actually r7254. After this revision, the new_openconnection was no longer printing anything. This is very odd behavior. Will continue investigating.

choksi81 commented 10 years ago

Author: albert I can't reproduce the problem. I'm running release sensibility-r7274 and seash from the Sensibility demokit, and removed the problems introduced in r7274 and r7288 (NAT forwarders to announce multiple keys). I can access my vessel just fine.

Could it be that yor are running a modified version of seash? I see a module dyrun in the ticket description that my version doesn't have.

choksi81 commented 10 years ago

Author: monzum After debugging with Leonard on what was broken, we found that the issue was with us importing sockettimeout.repy (through cachedadvertise.r2py) through affix_wrapper_lib.repy. This caused the instance of sockettimeout.repy to be imported into the namespace before we had a chance to overload the openconnection call in sockettimeout.repy (See ticket #1408).

Thus a workaround to this would be to import cachedadvertise.r2py within the functions in affix_wrapper_lib.repy rather than at the top of the file. I have attached patch.1407 that should address this issue. The patch needs to be reviewed.

Thanks Leonard for the help finding this!

aaaaalbert commented 10 years ago

Closing as invalid / cannot replicate. The Affix framework has changed quite a bit since the issue was reported.