Error in payment app - Name or service not known

I’ve started to get errors from the payment app when placing an order locally.

This is in the payment app log:

2023-12-12 15:27:53.7111 [App:01] [77e4e4d9db647182e151bd1b27ad29f2] [INFO ] [.NET ThreadPool Worker] Litium.Connect.DirectPay.Controllers.PaymentsController - A payment with Id=a44e30f4-632a-48fd-9e95-f264a0e1056a is executed. 
{
	"Input": "a44e30f4-632a-48fd-9e95-f264a0e1056a",
	"Output": {
		"CartContextSystemId": "77b26520-470b-4843-882a-d70d5b4889d2",
		"PaymentProviderId": "directpayment",
		"MerchantAccountId": "",
		"PaymentOptionId": "DirectPay",
		"CreatedAt": "2023-12-12 15:27:53 +00:00",
		"ExpiresAt": "0001-01-01 00:00:00 +00:00",
		"OrderEditable": false,
		"Errors": {
			"General": "Name or service not known (softubelitium8.localtest.me:443)"
		},
		...

This is from the Litium log:

Error when placing an order System.Exception: Error when executing payment: Name or service not known (softubelitium8.localtest.me:443)
   at Litium.Application.Sales.Checkout.CheckoutServiceImpl.ExecutePaymentsAsync(CartContextSession cartContext, ExecutePaymentsArgs args, CancellationToken cancellationToken)
   at Litium.Application.Sales.CartContextSessionServiceImpl.ConfirmOrderAsync(Guid systemId, CancellationToken cancellationToken)
   at Litium.Application.Sales.CartContextImpl.ConfirmOrderAsync(CancellationToken cancellationToken

Payment app is running on latest Docker Desktop 4.26.0. DNS_FORWARDER and dns are set to 192.168.65.7 for dnsresolver.
nslookup softubelitium8.localtest.me 127.0.0.1 gives me 192.168.65.254 so that is used as dns on the payment app according to other threads here.

Anyone with an idea what the issue can be? Has something changed in later versions of Docker?

Litium version: 8.12

have you checked that the apps are “healthy” ?
https://app-direct-shipment.localtest.me:10021/health/live
https://app-direct-payment.localtest.me:10011/health/live

if you fiddled with the apps i would uninstall the apps, remove them from the channel. and reinstall them.

Also make sure that you are using the correct litium url for the apps in the docker compose file.
Other then that you can look in the applogs and litium logs to see if there is a connection between litium and the app or not. The app-logs are found in data\direct-payment\logs and data\direct-shipment\logs

Had tried to reinstall the apps several times but still had the problem.

Didn’t know about the health check. Tried it and the app was healthy so nothing there.

Occasionally everything worked but mostly not, so something strange was going on. I ended up uninstalling Docker and all containers and apps. Was running the latest Docker version 4.26.0. I updated to that around when the problems started. I decided to go with an older Docker version, 4.24.2, from a couple of month ago when I know everything still worked for me.
I also followed the setup documentation from Litium for the docker-compose and appsettings and there were some minor changes since I ran the setup last time.
Last row for elasticsearch in the compose-file was different. Also changed this for Elasticsearch in the appsettings json file.

"ConnectionString": "http://localhost:9200",

and

"Synonym": {
  "Server": "http://host.docker.internal:9210",

Was using an ip address in both places before from suggestions in this forum.

Now everything seems to run without any problem. Not sure what made the trick though. I think I’ll stay on the older version of Docker though. :grin:

new version or docker sometimes changes the addresses for the dns.

for example before 4.17 you needed to use

  • DNS_FORWARDER=192.168.65.5
    dns: 192.168.65.5

after 4.17 you need to use

  • DNS_FORWARDER=192.168.65.7
    dns: 192.168.65.7

Also we notices that the dns needed to be used in the docker compose file for the apps are different for some developers.
if you setup and run your containers and after that run this command in powershell.
“nslookup nmas.localtest.me 127.0.0.1”

For some people the result for host.internal.docker is
192.168.65.2 and for others it is 192.168.65.254

litium default docker compose has 192.168.65.2 and if you have 192.168.65.254 you need to change the dns for the apps in your docker compose.

As I wrote in my initial post:

So either of these was the issue.

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