3

I've installed CD microservices in Linux by creating '{service-name}.service' files in /etc/systemd/system/ and registering them.

All the CD microservices run well.

I tried to create in such way DXA microservice but it fails on start up. Here is a 'dxa.service' content:

[Unit]
Description=DXA Model Service for SDL Staging
After=network.target staging-discovery.target

[Service]
Type=simple
ExecStart=/opt/sdl/sdl-8.5/microservices/staging/dxa/cis/dxa-model-service/standalone/bin/start.sh
ExecStop=/opt/sdl/sdl-8.5/microservices/staging/dxa/cis/dxa-model-service/standalone/bin/stop.sh
PIDFile=/opt/sdl/sdl-8.5/microservices/staging/dxa/cis/dxa-model-service/standalone/bin/sdl-service-container.pid

[Install]
WantedBy=multi-user.target

So it fails with a message in console like this:

Job for staging-dxa-model.service failed because a timeout was exceeded. See "systemctl status staging-dxa-model.service" and "journalctl -xe" for details.

I also tried to add parameter to .service file 'TimeoutStartSec=6000' but same issue but takes longer time =)

Does anybody has experience in creating DXA service in Linux (CentOS 7 x64)?

Here is a part of cd_client log file:

2018-09-07 13:45:37,060 WARN c.s.w.c.c.c.i.BaseClientConfigurationLoader - ?>Unable to resolve ContentServiceCapability using DiscoveryService: >http://10.6.218.86:8182/discovery.svc. com.sdl.odata.client.api.exception.ODataClientRuntimeException: Unable to call >OData service for "http://10.6.218.86:8182/discovery.svc" URL and service query >"/TokenServiceCapabilities"

But discovery service returns

"error": "invalid_grant"

So it works I believe

2

Have you registered the content service in the discovery service? The message states that ContentServiceCapability can’t be resolved, so I would start checking there.

2

Thanks to Jeroen Suurd the problem was fixed.

I've made a mistake in 'dxa.service' for PIDFile, should be as follows:

PIDFile=/opt/sdl/sdl-8.5/microservices/staging/dxa/cis/dxa-model-service/standalone/sdl-service-container.pid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.