Restart ServerΒΆ

Use the following procedure to restart the CPQD ASR Server. If the server is idle, it will only be started.

1) Open a console on the machine where the ASR server has been installed

2) Restart the ASR server

If the ASR server is running, it can be restarted with the following command:

sudo systemctl restart asr-server

3) Verify ASR server status

Verify the ASR server status using the following command:

sudo systemctl status asr-server

The following example shows an ASR server that is running:

$ sudo systemctl status asr-server

● asr-server.service - CPqD Speech Recognition Server
   Loaded: loaded (/usr/lib/systemd/system/asr-server.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-04-12 13:11:26 UTC; 16s ago
     Docs: https://speechweb.cpqd.com.br/asr/docs/latest
 Main PID: 1380 (java)
   CGroup: /docker/c4cbfc49230515553eced80d3bc4b229fe478b06aa0f3bd503cd1a3ed1cd53b3/system.slice/asr-server.service
           └─1380 java -Xms128m -Xmx256m -XX:MaxDirectMemorySize=512m -XX:ErrorFile=/var/log/cpqd/asr/server/hs_err_pid%p.log -Dcpqd.asr.wrapper.file=/opt/cpqd/asr/config/server/asr-wrapper.properties -Dcpqd.sessionlog.config.fi...

Apr 12 13:11:26 c4cbfc492305 systemd[1]: Started CPqD Speech Recognition Server.
Apr 12 13:11:26 c4cbfc492305 systemd[1]: Starting CPqD Speech Recognition Server...
Apr 12 13:11:26 c4cbfc492305 start-server[1380]: Starting process asr-server...

4) Wait for the ASR server to start

Wait for the ASR server to finish the startup process, using the following command:

cpqdasr-status

The command should return only after the server is ready to receive requests.

Warning

When using free speech recognition, ASR startup can take a few minutes (usually less than 5) and the return of the above command will be displayed only after startup is complete.

The result must be presented as shown below, with the most important lines highlighted:

$ cpqdasr-status
Service Status: STARTED

Health Check:
{
    "asr-engine": {
        "healthy": true,
        "message": "CPqD ASR Server: 2.6.0 [Engine: 3.2.0]"
    },
    "deadlocks": {
        "healthy": true
    },
    "direct-memory": {
        "healthy": true,
        "message": "directMemoryUsed: 0.0078125 MB, totalCapacity: 0.0078125 MB, maxDirectMemory: 512.0 MB"
    },
    "license-manager-visibility": {
        "healthy": true
    },
    "license-status": {
        "healthy": true,
        "message": "ONLINE"
    }
}

5) Verify the log and confirm the ASR server startup

Wait for the ASR server to start through the log, running the following command and waiting for the Server started message:

tail -F /var/log/cpqd/asr/server/asr-server.log

The following example shows an ASR server shutting down and restarting:

$ tail -F /var/log/cpqd/asr/server/asr-server.log

WARN   [18-04-17 13:58:09.560] [Thread-11] b.c.c.a.s.AsrServerApplication [ ] Stopping ASR Server...
WARN   [18-04-17 13:58:12.112] [Thread-11] b.c.c.a.s.AsrServerApplication [ ] ASR Server stopped
WARN   [18-04-17 13:58:13.790] [main] b.c.c.a.s.AsrServerApplication [ ] Starting ASR Server...
WARN   [18-04-17 13:58:13.794] [main] b.c.c.a.AsrEngine [ ] Loading ASR: /opt/cpqd/asr/engine/lib/libcpqd_asr.so, /opt/cpqd/asr/config/engine/engine.conf
WARN   [18-04-17 13:58:20.086] [main] b.c.c.a.AsrEngine [ ] [0] ASR engine created (3.2.0)
WARN   [18-04-17 13:58:20.087] [main] b.c.c.a.s.AsrServerApplication [ ] Server started after 6 secs