aries-cloudagent-python icon indicating copy to clipboard operation
aries-cloudagent-python copied to clipboard

Endpoint in imported postgres subwallets not updated

Open milos-sol opened this issue 3 years ago • 7 comments

I had acapy running in aws ec2 together with postgres DB for couple of months. Few days ago I got new ec2 instance where acapy currently runs so I imported all subwallets from an old ec2 inst. However all subwallets still use old Endpoint since they are "hard-coded" in DB so I am unable to, for example, create new connections (Error: "Connection ... not ready.")

What I did and tried so far to update Endpoint:

  1. Acapy start command uses new endpoint so that should be ok.

  2. I also updated Endpoint with POST wallet/set-did-endpoint with { "did": "XZcf2eM9FsfZHFFD6JYaBC", "endpoint": "http://newIP/8020", "endpoint_type": "Endpoint" } and when I execute GET wallet/get-did-endpoint, new IP is actually in Response, { "did": "XZcf2eM9FsfZHFFD6JYaBC", "endpoint": "http://newIP/8020" } but Create Connection still uses old one in invitation_url.

  3. The only way it works is when I force to overwrite service_endpoint with new IP in Create connection JSON Body like: POST /connections/create-invitation { "service_endpoint" : "http://newIP/8020" }

Did I forget to do something? Or is there a way maybe I can overwrite Endpoint IP in my Postgres DB? Thanks :)

milos-sol avatar Jun 20 '22 08:06 milos-sol

Is this using the connection protocol or did-exchange protocol?

andrewwhitehead avatar Jul 07 '22 17:07 andrewwhitehead

It looks like the endpoint is generally inherited from the mediator, which may be the base wallet in the case of multitenancy. Are there any details returned from the /mediation/default-mediator endpoint?

andrewwhitehead avatar Jul 07 '22 18:07 andrewwhitehead

  1. It is connection protocol. And invitation url in our usecases is almost always presented as QR code so we can scan it with mobile wallets.
  2. I get empty Body response from /mediation/default-mediator Endpoint.

milos-sol avatar Jul 07 '22 18:07 milos-sol

Hmm. Has the agent been restarted at all? Maybe it's a cache issue.

andrewwhitehead avatar Jul 07 '22 18:07 andrewwhitehead

I had to restart Agent couple of times, have no idea why but now all endpoints are updated.

Thanks a lot @andrewwhitehead

milos-sol avatar Jul 08 '22 09:07 milos-sol

I think it's worth investigating to see if the cache problem can be resolved without restarting the agent.

andrewwhitehead avatar Jul 09 '22 18:07 andrewwhitehead

The endpoint in your comment is not defining a port, is that right?

icc-garciaju avatar Feb 16 '24 07:02 icc-garciaju