beckn / beckn-utilities

Other
0 stars 2 forks source link

Individual components ONIX installation is using wrong IP for registry #84

Closed vbabuEM closed 5 months ago

vbabuEM commented 5 months ago

I did the following:

  1. Ran start_beckn_v2.sh on a machine (ec2-3-108-61-7.ap-south-1.compute.amazonaws.com - 172.31.35.93) and installed gateway and registry
  2. Ran start_beckn_v2.sh on a machine (ec2-user@ec2-13-234-217-228.ap-south-1.compute.amazonaws.com - 172.31.34.109) and installed BAP PS and BPP PS
  3. Now when I try to send a message to the BAP, I get the following error on BAP-Network. Looking Up in registry...! With URL:http://ec2-3-108-61-7.ap-south-1.compute.amazonaws.com:3030/subscribers/lookup Payload:{"type":"BG","domain":"retail:1.1.0"} 2024-03-15T15:00:54.083Z [test] info: subscribers: [{"subscriber_id":"gateway","subscriber_url":"http://172.18.0.3:4030/bg","type":"BG","signing_public_key":"1yG3l0BLb6plmFdE2NY5Grdsd8jLR010intZ+zFlJ+4=","valid_until":"2034-03-16T00:11:52.000Z"}] 2024-03-15T15:00:54.084Z [test] info: Attempt Number: 1 Action : search 2024-03-15T15:00:54.084Z [test] info: sending request to BG / BPP: http://172.18.0.3:4030/bg

As you can see it is getting the wrong address "http://172.18.0.3:4030/bg from the registry. It should have gotten the public address. It seems to be getting the docker network address.

Requirement: Gateway should register itself with registry using publicly accessible url.

prasad-takale-eminds commented 5 months ago

We have fixed the above issue. Below is the PR for the same. PR: https://github.com/beckn/beckn-utilities/pull/90