[The SSL connection could not be established, see inner exception.]
Log files
Nothing in the apps log file.
Noting in the solution log file.
I used to get an error message in the apps log file stating: Stopped program because of exception Interop+Crypto+OpenSslCryptographicException: error:2006D080:BIO routines:BIO_new_file:no such file
This went away after I changed the dns in direct shipment yml to:
dns:
- 192.168.65.254
Docker compose
version: '3'
services:
dnsresolver:
image: cytopia/bind:stable-0.28
container_name: dnsresolver
ports:
- '127.0.0.1:53:53/tcp'
- '127.0.0.1:53:53/udp'
environment:
- DNS_CNAME=*.localtest.me=host.docker.internal
- DNS_FORWARDER=192.168.65.7
dns: 192.168.65.7
restart:
unless-stopped
direct-shipment:
image: registry.litium.cloud/apps/direct-shipment:latest
dns:
- 192.168.65.254
restart: unless-stopped
ports:
- "10020:80"
- "10021:443"
environment:
# Enable HTTPS binding
- ASPNETCORE_URLS=https://+;http://+
- ASPNETCORE_HTTPS_PORT=10021
# Configuration for HTTPS inside the container, exported dotnet dev-certs with corresponding password
- ASPNETCORE_Kestrel__Certificates__Default__Password=SuperSecretPassword
- 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://directshipment.localtest.me:10021
# Url to the litium installation
- LitiumApi__ApiUrl=https://accelerator.localtest.me:5001
volumes:
- directshipment_appdata:/app_data
- directshipment_appconfig:/app_config
- directshipment_logs:/logs
- directshipment_dataprotection:/root/.aspnet/DataProtection-Keys
- https_cert:/https:ro
volumes:
directshipment_appdata:
directshipment_appconfig:
directshipment_logs:
directshipment_dataprotection:
directshipment_https:
https_cert:
driver: local
driver_opts:
o: bind
type: none
device: ./data/https
So I was able to install direct shipment by first making a tunnel via ngrok to port 10021.
I got an internal server error back when I tried the installation url via https and 10021.
But when I tried the installation url via http and 10020 it worked.
You should be able to find a new (or the same…) certficate then located at ~/.aspnet/https/localhost.pfx with the password you provided. Copy this to the https directory.
Another little tip is to actually set a version on your apps instead of :latest - Litiums repo aren’t properly tagged.
According to this forum post the solution was to change the entry of the dns of the payment/shipment app to 192.168.65.254
I tried this a while back and it didn’t work, because as Niklas say you should try to do the following command: nslookup http://litium.localtest.me 127.0.0.1
Creating a container with the port 53 fails with the error address already in use. As a workaround, deactivate network acceleration by adding "kernelForUDP": false, in the settings.json file located at ~/Library/Group Containers/group.com.docker/settings.json.
Here is my docker-compose file in case this might be of help
version: '3'
services:
dnsresolver:
image: cytopia/bind:stable-0.28
container_name: dnsresolver
ports:
- 53:53/tcp
- 53:53/udp
environment:
- DNS_CNAME=*.localtest.me=host.docker.internal
- DNS_FORWARDER=192.168.65.7
- ALLOW_QUERY=any
dns: 192.168.65.7
restart:
unless-stopped
direct-payment:
image: registry.litium.cloud/apps/direct-payment:1.3.0
dns:
- 192.168.65.254
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=SuperSecretPassword
- 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://localhost:10021
# Url to the litium installation
- LitiumApi__ApiUrl=https://yourdomain.localtest.me:5001/
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
- https_cert:/https:ro
direct-shipment:
image: registry.litium.cloud/apps/direct-shipment:1.2.0
dns:
- 192.168.65.254
restart: unless-stopped
ports:
- "10020:80"
- "10021:443"
environment:
# Enable HTTPS binding
- ASPNETCORE_URLS=https://+;http://+
#- ASPNETCORE_URLS=https://+
- ASPNETCORE_HTTPS_PORT=10021
# Configuration for HTTPS inside the container, exported dotnet dev-certs with corresponding password
- ASPNETCORE_Kestrel__Certificates__Default__Password=SuperSecretPassword
- 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://localhost:10021
# Url to the litium installation
- LitiumApi__ApiUrl=https://yourdomain.localtest.me:5001/
volumes:
- ./data/direct-shipment/config:/app_config
- ./data/direct-shipment/data:/app_data
- ./data/direct-shipment/logs:/logs
- ./data/direct-shipment/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
- https_cert:/https:ro
volumes:
https_cert:
driver: local
driver_opts:
o: bind
type: none
device: ./data/https
Docker desktop version: v4.27.1 Litium version: 8.11.6 OS: Mac OS M2 chip
yes your containers need to be up and running for “nslookup http://litium.localtest.me 127.0.0.1” to work.
then you stop them and change dns if needed.
but what was it that you changed in your docker compose from the first on?