hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
84 stars 74 forks source link

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

Open sahil-khanna opened 3 years ago

sahil-khanna commented 3 years ago

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