aries-framework-dotnet icon indicating copy to clipboard operation
aries-framework-dotnet copied to clipboard

[Mediator Agent] Hyperledger.Indy.IOException: An IO error occurred

Open sahil-khanna opened this issue 4 years ago • 0 comments

I want to deploy the DotNet Mediator Agent on GCP Cloud Run. I have the below Dockerfile.

FROM streetcred/dotnet-indy:1.14.2 AS base
WORKDIR /app

# Expose the default port
EXPOSE 5000

COPY mediator ./mediator
WORKDIR mediator

RUN dotnet restore "MediatorAgent.csproj"
RUN dotnet build "MediatorAgent.csproj" -c Release -o ./build
RUN dotnet publish "MediatorAgent.csproj" -c Release -o ./build
CMD dotnet ./build/MediatorAgent.dll --urls http://0.0.0.0:5000

If I create a container on my system, the Mediator Endpoint works fine. However, if I deploy it on GCP Cloud Run, I get the below error

Unhandled exception. Hyperledger.Indy.IOException: An IO error occurred.
at Hyperledger.Aries.Storage.DefaultWalletService.GetWalletAsync(WalletConfiguration configuration, WalletCredentials credentials)
at Hyperledger.Aries.Configuration.DefaultProvisioningService.ProvisionAgentAsync(AgentOptions agentOptions)
at Hyperledger.Aries.Agents.Edge.MediatorProvisioningService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at mediator.Program.Main(String[] args) in /app/mediator/Program.cs:line 17

The source code and the Dockerfile are attached in the zip file cloud-run-mediator-agent.zip cloud-run-mediator-agent.zip

sahil-khanna avatar Sep 11 '21 04:09 sahil-khanna