Issues starting up Litium 8.8.0

I’m having some issues getting Litium 8.8.0 running. I decided to start from a clean sheet reinstalling Docker and all the containers. Installed the Accelerator Package. The website is running but…

  1. I can’t get the products to show up on the site. I can see the products in backoffice. I’m suspecting an issue with the index. Litium Search / Indices looks like this. No errors in the logs from what I can see.

  2. The other issue is that I can’t install any apps. I’ve tried Adyen payment, Direct payment and Direct shipment and they all give the message “The app could not be installed”. Log says this.
    2023-02-02 12:59:21.0592 [App:01] [6bf2a9fc122f0cfcbf353e80fc6e75a1] [ERROR] Litium.Web.Administration.WebApi.Settings.Controllers.AppManagementController - Could fetch app metadata ‘https://host.docker.internal:10061/api/litium-app/metadata’. System.ArgumentException: Was not able to fetch app metadata from https://host.docker.internal:10061/api/litium-app/metadata

Any ideas what’s wrong?

Litium version: 8.8.0

For the search index, try to use the “Rebuild index offline” action on the different indexes, that will recreate the search index with a new name to resolve schema out of sync problem. The red bullet in front of the rows indicate that the search index in Litium Search not is what the platform expect.

For the apps, try to use the localtest.me domain instead of host.docker.internal, the reason is to get the DNS resolving correctly. Example if it is your adyen app, use adyen-payment.localtest.me with the same port-number. The Litium-url configured for the app, also need to use the localtest.me domain.

Clicking “Rebuild index offline” for ProductDocument gave me this errors.

2023-02-02 14:31:22.1736 [App:01] [bca1677dcd6dbc7d494de11f2db4fb83] [ERROR] Litium.Application.Search.Schemas.IndexSchemaConfigurationService - Could not create index accelerator8_rev1.v2.productdocument.sv-se. ServerError: 400Type: illegal_argument_exception Reason: “failed to build synonyms” CausedBy: “Type: illegal_argument_exception Reason: “failed to get synonyms : http://host.docker.internal:9210/api/container/a155989e-c492-45de-9ea2-138e98219fd7/6bb5d5ff-007c-433d-a316-5b88e4cd28a2/solr” CausedBy: “Type: null_pointer_exception Reason: “”””
2023-02-02 14:31:22.1736 [App:01] [bca1677dcd6dbc7d494de11f2db4fb83] [ERROR] [.NET ThreadPool Worker] Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request. Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: PUT /accelerator8_rev1.v2.productdocument.en-us. ServerError: Type: illegal_argument_exception Reason: “failed to build synonyms” CausedBy: “Type: illegal_argument_exception Reason: “failed to get synonyms : http://host.docker.internal:9210/api/container/cabf76cb-32d6-46f6-a6e0-95ef355e5d2c/e6a2eb56-d54e-401b-9cc1-b22277be2789/solr” CausedBy: “Type: null_pointer_exception Reason: “”””
at Litium.Search.SearchExtensions.EnsureSuccessStatusCode[T](T response)
at Litium.Application.Search.Schemas.IndexSchemaConfigurationService.CreateIndexIfMissing(String indexName, IIndexState indexState)
at Litium.Application.Search.Schemas.IndexSchemaConfigurationService.EnsureSchema(IIndexMappingConfiguration configuration, String indexName, String culture)
at Litium.Application.Search.Schemas.IndexSchemaMaintenanceService.EnsureIndexConfiguraiton(IIndexMappingConfiguration indexConfiguration, String culture)
at Litium.Application.Search.Schemas.IndexSchemaMaintenanceService.SchemaChanged(ChangeSchemaNotification obj)
at Litium.Application.Search.Schemas.IndexSchemaVersionServiceImpl.Notify(ChangeSchemaNotification event)
at Litium.Application.Search.Schemas.IndexSchemaVersionServiceImpl.CreatePendingVersionAsync(String documentName)
at Litium.Application.Search.IndexConfigurationServiceImpl.QueueIndexRebuildOfflineAsync(IIndexMappingConfiguration config)
at Litium.Application.Search.IndexConfigurationServiceImpl.InvokeActionAsync(String index, String action, Object args)
at Litium.Web.Administration.WebApi.Settings.Controllers.SearchIndexController.<>c__DisplayClass4_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at Litium.Web.Administration.WebApi.Settings.Controllers.SearchIndexController.RebuildIndex(String indexName, String actionName)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Builder.AppBuilderExtensions.<>c.<b__3_0>d.MoveNext()
— End of stack trace from previous location —
at Microsoft.AspNetCore.Builder.AppBuilderExtensions.<>c.<b__3_0>d.MoveNext()
— End of stack trace from previous location —
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Builder.AppBuilderExtensions.<>c__DisplayClass2_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

For the apps, do you mean replace:
- AppMetadata__AppUrl=https://host.docker.internal:10061
with:
- AppMetadata__AppUrl=https://adyen-payment.localtest.me:10061
in the docker-compose.yaml file and recreate the container?
And then use https://adyen-payment.localtest.me:10061 to do the installation?

If you have restored a database the database contains the information for the synonym server, if you change prefix for the elasticsearch the synonym server url well be recreated. The error indicates that the elasticsearch not can connect to synonym server.

Yes, try to use localtest.me instead of the host.docker.internal.

I haven’t restored a database, I started from scratch setting up the database according to Litium instructions.
Followed some other suggestions from the forum, changing the DNS_FORWARDER and dns to 192.168.65.7 instead of …5 for the dnsresolver in docker-compose.yaml (MS SQL Server exception on app startup - Questions - Litium Forum) and using the ip instead of host.docker.internal as ConnectionString/Server for Elasticsearch in appsettings.xxxx.json (Failed to build synonyms - Questions - Litium Forum) seems to almost got me the indices to work. Can’t get the CategoryDocument online.

Clicking Activate says “Bringing index online” but nothing happens, no error in the log what I can see. The other ones took just a few seconds to get online. Still no products on the website.


Changing host.docker.internal:xxxxx to xxxx-xxxx.localtest.me:xxxxx for the AppMetadata__AppUrl value in docker-compose.yaml worked for the Apps.

Only problem now is that Adyen is not listed as a Payment Method when I try to add it to a channel.

No errors in the logs from what I can see.

Small update…

Product pages seem to work, they will show if using the products url directly. Listing products from categories and product list don’t work. Search doesn’t work either. The issue is probably with Elasticsearch then, right?

Yes, you still have problem with elastic search since Count is 0 for all the documents (page, product and category).

OK. But what can I do? I’ve tried both using host.docker.internal and the IP from host file that Docker added as connection string for Elasticsearch. Using the IP seems to work better but I still have 0 count for all documents and I can’t get the CategoryDocument to go online.

I’ve changed the prefix for Elasticsearch several times. No difference.

There’s a lot of these row in the log so it seems to be doing something. But no errors in the log.
2023-02-03 10:30:12.2334 [App:01] [8e858b99c78e57717afc8be665eec5f2] [TRACE] [.NET ThreadPool Worker] Litium.Search.IndexConfigurationService - GET http://192.168.127.177:9200/accelerator8_rev4.aq.pagedocument.*/_count
2023-02-03 10:30:12.2334 [App:01] [8e858b99c78e57717afc8be665eec5f2] [TRACE] [.NET ThreadPool Worker] Litium.Search.IndexConfigurationService - Status: 200 {“count”:0,“_shards”:{“total”:2,“successful”:2,“skipped”:0,“failed”:0}}
2023-02-03 10:30:12.2334 [App:01] [8e858b99c78e57717afc8be665eec5f2] [TRACE] [.NET ThreadPool Worker] Litium.Search.IndexConfigurationService - GET http://192.168.127.177:9200/accelerator8_rev4.aq.categorydocument.*/_count
2023-02-03 10:30:12.2334 [App:01] [8e858b99c78e57717afc8be665eec5f2] [TRACE] [.NET ThreadPool Worker] Litium.Search.IndexConfigurationService - Status: 200 {“count”:0,“_shards”:{“total”:0,“successful”:0,“skipped”:0,“failed”:0}}


I also still have the problem that I can’t add Adyen as a payment method on a channel. It’s listed under apps but not as a payment method.

After that you have solved the dns issue did you increase the prefix of the redis and restart the application? You do not need to change the prefix of the elastic search, building indices offline handle that a new index generated and used.

Finally found the issue with Elasticsearch. Noticed a very discrete warning in the Docker Elasticsearch container log about “disk watermark 95% exceeded”. You would think that 30GB of space would be enough but obviously not. Started to clean up stuff and now with 75GB free it started working. Not sure where the actual breakpoint is though, 90% maybe. I still get the message in the log “disk watermark [90%] exceeded” but now with the addition that “shards will be relocated away from this node”. Well, it’s working at least.

Just the issue with not being able to add Adyen as a payment method then. Any ideas on that?

I usual run this after I have installed a new Elasticsearch instance to lower the watermark and not have as requirement with replicas on the indices. That reduce the percentage watermark into small fixed values to not need a-lot of empty space on the disc.

POST /_template/default
{
  "index_patterns": ["*"],
  "order": -1,
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}

PUT /*/_settings
{
  "index": {
    "number_of_replicas": 0
  }
}

PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.disk.watermark.low": "3gb",
    "cluster.routing.allocation.disk.watermark.high": "2gb",
    "cluster.routing.allocation.disk.watermark.flood_stage": "1gb",
    "cluster.info.update.interval": "1m"
  }
}

Is the Adyen payment app starting without any messages in the console?
Anything in the Adyen log-file?

OK. Where do you run that? Terminal on Elasticsearch container in Docker?


Starting up the Adyen Payment app container in Docker gives these rows in the container logs. Not sure if that is what you mean with “the console”?
2023-02-03 13:04:41 dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
2023-02-03 13:04:41 Hosting starting
2023-02-03 13:04:42 info: Microsoft.Hosting.Lifetime[14]
2023-02-03 13:04:42 Now listening on: https://[::]:443
2023-02-03 13:04:42 info: Microsoft.Hosting.Lifetime[14]
2023-02-03 13:04:42 Now listening on: http://[::]:80
2023-02-03 13:04:42 info: Microsoft.Hosting.Lifetime[0]
2023-02-03 13:04:42 Application started. Press Ctrl+C to shut down.
2023-02-03 13:04:42 info: Microsoft.Hosting.Lifetime[0]
2023-02-03 13:04:42 Hosting environment: Production
2023-02-03 13:04:42 info: Microsoft.Hosting.Lifetime[0]
2023-02-03 13:04:42 Content root path: /app
2023-02-03 13:04:42 dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
2023-02-03 13:04:42 Hosting started

In the messages.log in data/adyen-payment/logs this is written every ten seconds.
2023-02-03 12:15:11.1366 [App:01] [DEBUG] [.NET ThreadPool Worker] Microsoft.Extensions.Http.DefaultHttpClientFactory - Starting HttpMessageHandler cleanup cycle with 3 items
2023-02-03 12:15:11.1366 [App:01] [DEBUG] [.NET ThreadPool Worker] Microsoft.Extensions.Http.DefaultHttpClientFactory - Ending HttpMessageHandler cleanup cycle after 0.0023ms - processed: 0 items - remaining: 3 items

Not sure what the “3 items” are? I’ve never manage to add it as a payment method so no there’s no orders placed with Adyen as payment method.

I looked around in the database a bit and noticed this.

image

There’s no PaymentOption added for Adyen. I guess that might be the problem? Shouldn’t the install process add that?

I have this in the configuration file for the Adyen app. Not sure that has anything to do with it?
“PaymentOptions”: [
“Dropin”
],

If you browse the adyen app url with the browser, what will the result be?

Do you mean the AppMetadata__AppUrl for the app in the docker-compose.yaml?

If so, I get a 404.

Yes, the address for the AppMetadata__AppUrl.

  • If the page respond with an redirect to Litium, the app is not installed
  • If the page respond with an 404, the app is installed

Have you uploaded the config file for the Adyen app inside BO/Settings?
You can verify that the app has correct settings with these steps

  1. In the folder where you have the docker-compose-file
  2. Open the data\adyen-payment\config folder
  3. Open the AppConfiguration.json, the content in this file should be what you was uploading from BO/Settings.

I get a 404 so that means that it’s installed then.

There’s no AppConfiguration.json in the data\adyen-payment\config folder. Tried to upload it again but still not there.

I noticed this though from Docs. Maybe that’s the problem.

“Please also note that the environment must be either a live environment or a test environment for the configuration file to be accepted.”

If this is it, what is the reason for this limitation? We don’t have a test or live environment set up for our Litium 8 solution yet but we would like to evaluate the Adyen app. How can we do that if we can’t run it on a dev environment?

This means that the property environment in the json need to be either Live or Test (Prod/Dev) is not possible values.

Can you include the configuration that you try to upload? (remove the secret information before posting it)

Great! I hoped that was what it meant. :grinning: Maybe you should clarify that on Docs though. It’s not obvious what environment means in this case.

{
	"Adyen": {
		"PaymentAccounts": [
			{
				"PaymentAccountId": "SE",
				"MerchantAccount": "xxxx",
				"ApiKey": "xxxx",
				"ApiUsername": "xxxx",
				"ApiPassword": "xxxx",
				"ClientKey": "xxxx",
				"SkinCode": "",
				"HmacKey": "",
				"Environment": "Test",
				"PaymentOptions": [
				  "Dropin"
				],
				"LiveUrlPrefix": null,
				"PaymentDeadlineMinutes": 5,
			}
		]
	}
}