bcgov / traction

Traction is designed with an API-first architecture layered on top of Hyperledger Aries Cloud Agent Python (ACA-Py) and streamlines the process of sending and receiving digital credentials for governments and organizations.
https://digital.gov.bc.ca/digital-trust/tools/traction/
Apache License 2.0
51 stars 45 forks source link

In local Traction setup, can't connect to the second Endorser (the bcovrin-dev one) #1031

Closed loneil closed 3 months ago

loneil commented 4 months ago

To reproduce

Connection stays in request state

In traction-agent logs can see a connection error

2024-02-28 10:48:48 2024-02-28 18:48:48,702 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://host.docker.internal:8001; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='host.docker.internal', port=8001, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('192.168.65.254', 8001)")), <traceback object at 0x7f40665cd800>); Re-queue failed message ...

Connecting to BCOVRIN-TEST endorser is working fine.

Context about local endorsers: Docker compose env starts up 2 endorsers for testing out ledger switching and things. (I don't like the naming of these and the env vals...)

"Endorser": ACAPY_GENESIS_URL=http://test.bcovrin.vonx.io/genesis

"Endorser 1": ACAPY_GENESIS_URL_1=http://dev.bcovrin.vonx.io/genesis

swcurran commented 4 months ago

Side note — we’re going to get rid of all but BCovrin Test, so if you see any docs or anything that refers to BCovrin-dev, please eliminate it. BCovrin Dev, BCovrin Prod, Greenlight, etc. will be eliminated Real Soon Now.

loneil commented 4 months ago

Oh! good to know, thanks.

So if we want to maintain 2 local endorsers on ledgers we'd need to replace with another one

swcurran commented 4 months ago

Yes — I would think Candy Dev might be OK.

loneil commented 4 months ago

Reference: https://github.com/bcgov/DITP/issues/82

esune commented 4 months ago

Can we close this now that BCovrin Dev has been decommissioned?

loneil commented 4 months ago

I'll need to tweak some things to alias them differently I think here.

esune commented 4 months ago

Just peeking at the error again, not sure what port 8001 refers to since it doesn't seem to be anywhere in the codebase? Wondering if the error is a webhook delivery and the issue with BCovrin Dev is that it was NOT set to auto-endorse transactions?

loneil commented 3 months ago

@esune this is working now with changes from https://github.com/bcgov/traction/pull/1050 If that setup is all good we can close this

esune commented 3 months ago

Changes look good! Approved the PR, closed as resolved by #1050