Endpoint in imported postgres subwallets not updated
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:
-
Acapy start command uses new endpoint so that should be ok.
-
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. -
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 :)
Is this using the connection protocol or did-exchange protocol?
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?
- 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.
- I get empty Body response from
/mediation/default-mediatorEndpoint.
Hmm. Has the agent been restarted at all? Maybe it's a cache issue.
I had to restart Agent couple of times, have no idea why but now all endpoints are updated.
Thanks a lot @andrewwhitehead
I think it's worth investigating to see if the cache problem can be resolved without restarting the agent.
The endpoint in your comment is not defining a port, is that right?