osu-crypto / libPSI

A repository for private set intersection.
Other
172 stars 48 forks source link

PSI test failed in two server environment #59

Closed simingzhao closed 1 year ago

simingzhao commented 1 year ago

Hi Peter. I'm trying to run the kkrt psi protocol in two different servers. But it seems there are some network connection issues. My command lines are the following(i put the execution file and data under the same folder ): sender command: ./frontend.exe -server 0 -r 0 -kkrt -csv -in j_Sender.csv -ip 3x.1xx.xx.x:8080 receiver command: ./frontend.exe -server 1 -r 1 -kkrt -csv -in j_Receiver.csv -out j_out.csv -ip 127.0.0.1:8080

on sender terminal I have the following screenshot image

on receiver terminal I have the following screenshot image

Could you give me some suggestions on this issue? Thanks so much!!

ladnir commented 1 year ago

very much looks like you are using the wrong IP on the receiver (TCP server). 127.0.0.1 is localhost. Often your machine will have two or more (virtual) network cards. One for localhost and one for your actual external facing network. More generally, you can have a machine with n network cards. Each will get its own IP... So you need to figure out what the IP address is that you want to TCP server to listen on. In most cases this is the same IP that the TCP client is connecting to, i.e. both should use -ip 3x.1xx.xx.x:8080

Alternatively, you can use IP address 0.0.0.0 to tell the OS you want to listen to any IP address. But that's not something I normally do so IDK how well it works.

simingzhao commented 1 year ago

Hi Peter, Thanks for your reply! The issue is solved now by changing the receiver IP address.