"Error to connect to NATS server" in the asynchronous processing logs

Prev Next

The asynchronous processing workers log NATS connection errors in worker.log and cron.log.

Symptom

In /var/log/senhasegura/async/worker.log:

[ERROR] system :: [Error NATS] Bulk Import: 30 - Error to connect to NATS server
[ERROR] system :: [Error NATS] Asynchronous Session Tasks: 30 - Error to connect to NATS server

In /var/log/senhasegura/async/cron.log, the message appears at INFO level, even though it is a failure:

[INFO] ... Orbini\Async\Event\Message\Stream\Scheduler - system error: Failed to connect: Error enabling TLS

To confirm, run:

sudo grep "Error to connect to NATS server" /var/log/senhasegura/async/worker.log | tail -n 5
sudo grep "Error enabling TLS" /var/log/senhasegura/async/cron.log | tail -n 5

Solution

Alert

Do not restart the appliance or its services before applying the fix. Restarting does not solve the problem and makes the failure worse.

  1. Apply the fix described in Segura® maintenance script for on-prem customers.
  2. Run the verification commands again. No new messages should appear after the time of the fix.

The senhasegura-* services may keep showing as running in systemctl, even while processing nothing.

For more information

If you are still having trouble, open a ticket with Segura® support using code SOP 140926.