Status code not OK but 500 while trying to install direct-pay

I’m trying to install direct-pay through docker, but when I’m running docker-compose up I get the following error:
Cannot create container for service direct-payment: status code not OK but 500

Full error:

Cannot create container for service direct-payment: status code not OK but 500:  ☺   ˙˙˙˙☺       ♀☻   FDocker.Core, Version=3.4.0.64130, Culture=neutral, PublicKeyToken=null♣☺   ←Docker.Core.DockerException♀     ClassNameMessage♦Data♫InnerExceptionHelpURL►StackTraceString▬RemoteStackTraceString►RemoteStackIndex☼ExcWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻   ♠♥   ←Docker.Core.DockerException♠♦   ▲Filesharing has been cancelled


♠♣   Ś‼   at Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__7.MoveNext() in C:\workspaces\PR-15766\src\github.com\docker\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.ApiServices.Mounting.FileSharing.<ShareAsync>d__5.MoveNext() in C:\workspaces\PR-15766\src\github.com\docker\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:line 53
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.HttpApi.Controllers.FilesharingController.<ShareDirectory>d__2.MoveNext() in C:\workspaces\PR-15766\src\github.com\docker\pinata\win\src\Docker.HttpApi\Controllers\FilesharingController.cs:line 21
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    ♠♠   Ł☺8
MoveNext
Docker.ApiServices, Version=3.4.0.64130, Culture=neutral, PublicKeyToken=null
Docker.ApiServices.Mounting.FileSharing+<DoShareAsync>d__7
Void MoveNext() §‼€♠   ↕Docker.ApiServices

ERROR: for direct-payment  Cannot create container for service direct-payment: status code not OK but 500:  ☺   ˙˙˙˙☺       ♀☻   FDocker.Core, Version=3.4.0.64130, Culture=neutral, PublicKeyToken=null♣☺   ←Docker.Core.DockerException♀
        ClassNameMessage♦Data♫InnerExceptionHelpURL►StackTraceString▬RemoteStackTraceString►RemoteStackIndex☼ExceptionMeWatsonBuckets☺☺♥♥☺☺☺ ☺ ☺▲System.Collections.IDictionary►System.Excepti☻☻   ♠♥   ←Docker.Core.DockerException♠♦   ▲Filesharing has been cancelled


♠♣   Ś‼   at Docker.ApiServices.Mounting.FileSharing.<DoShareAsync>d__7.MoveNext() in C:\workspaces\PR-15766\src\github.com\docker\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.ApiServices.Mounting.FileSharing.<ShareAsync>d__5.MoveNext() in C:\workspaces\PR-15766\src\github.com\docker\pinata\win\src\Docker.ApiServices\Mounting\FileSharing.cs:line 53
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.HttpApi.Controllers.FilesharingController.<ShareDirectory>d__2.MoveNext() in C:\workspaces\PR-15766\src\github.com\docker\pinata\win\src\Docker.HttpApi\Controllers\FilesharingController.cs:line 21
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()
    ♠♠   Ł☺8
MoveNext
Docker.ApiServices, Version=3.4.0.64130, Culture=neutral, PublicKeyToken=null
Docker.ApiServices.Mounting.FileSharing+<DoShareAsync>d__7
Void MoveNext() §‼€♠   ↕Docker.ApiServices
ERROR: Encountered errors while bringing up the project.

My docker-compose.yaml:

version: '3'
services:
  dnsresolver:
    image: cytopia/bind
    container_name: dnsresolver
    ports:
    - "53:53/tcp"
    - "53:53/udp"
    environment: 
    - WILDCARD_DNS=localtest.me=host.docker.internal
    - DNS_FORWARDER=192.168.65.5
    dns: 192.168.65.5
    restart: unless-stopped
  direct-payment:
    image: registry.litium.cloud/apps/direct-payment:latest
    dns: 
    - 192.168.65.2
    restart: unless-stopped
    ports:
    - "10010:80"
    - "10011:443"
    environment:
    # Enable HTTPS binding
    - ASPNETCORE_URLS=https://+;http://+
    - ASPNETCORE_HTTPS_PORT=10011
    # Configuration for HTTPS inside the container, exported dotnet dev-certs with corresponding password
    - ASPNETCORE_Kestrel__Certificates__Default__Password=${CERT_PWD}
    - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
    # Folder for the configuraiton, this is volume-mapped
    - CONFIG_PATH=/app_config
    # Folder where logfiles should be placed, this is volume-mapped
    - APP_LOG_PATH=/logs
    # Don't validate certificates
    - AppConfiguration__ValidateCertificate=false
    # Url to this app
    - AppMetadata__AppUrl=https://customer-direct-payment.localtest.me:10011
    # Url to the litium installation
    - LitiumApi__ApiUrl=https://customer-site.localtest.me
    volumes:
    - ./data/direct-payment/config:/app_config
    - ./data/direct-payment/data:/app_data
    - ./data/direct-payment/logs:/logs
    - ./data/direct-payment/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
    - ./data/https:/https:ro

The cert is located at /data/https/localhost.pfx. I have a .env-file, next to the docker-compose-file, with the CERT_PWD variable and a correct password.

I have elastic, redis and kibana in a seperate docker container, but I’ve also tried to include them in the same container, with the same result.

Litium version: 8.0.0

This seems to be the root cause, thrown by Docker itself. Have you looked into the File sharing settings of Docker Desktop? asp.net core - Docker: Drive has not been shared - Stack Overflow

Ah, thanks.

I added C:\ as a shared directory, and the container could start. Not sure if I should just add that specific folder as a shared directory instead of C:, but at least it works now! :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.