Skip to main content

Qlik NPrinting messaging service (RabbitMQ) start up and connection problems

The steps below work for Qlik NPrinting versions embedding RabbitMQ version 3.8.3. You can check the correct path for your installation.

Do the following:

  1. Open a new command prompt, by selecting Run as Administrator. Run:

    • cd %ProgramFiles%\NPrintingServer

    • dir

  2. Note the RabbitMQ installation folder. It starts with rabbitmq_server.

  3. Replace the folder name with the correct folder, including the correct version number in all troubleshooting commands.

Possible cause  

If reports are not produced, or engines never go to Online status, or if the Qlik NPrinting scheduler service stops after about one minute from start up, the Qlik NPrinting messaging service (RabbitMQ) may have stopped or it may be unreachable.

The scheduler log shows a message like:

*********************************************
Error: RabbitMQ message broker is unreachable
Shutting down scheduler service
*********************************************

Or like:

*********************************************
RabbitMQ service is not connected - trying again in 3 seconds
*********************************************

Proposed action  

  1. Check that Qlik NPrinting messaging service is running.
  1. Copy the .erlang.cookie file from the system profile folder (C:\WINDOWS\system32\config\systemprofile\) and replace it in the %USERPROFILE% folder (C:\Users\npadmin).
  2. Open a new command prompt as Administrator.
  3. Navigate to the RabbitMQ sbin folder: %ProgramFiles%\NPrintingServer\rabbitmq_server-3.8.3\sbin.
  4. Run the following command:

    rabbitmqctl.bat list_permissions

    The output should be:

    Listing permissions for vhost "/" ...
    user configure write read
    client_engine .* .* .*
    client_webengine .* .* .*
    remote .* .* .*
    client_audit .* .* .*
    client_scheduler .* .* .*
  5. If the ouput is different go to Fix the messaging service users and permissions.
  1. Open a new command prompt as Administrator.
  2. Navigate to the certificates generator folder: %ProgramFiles%\NPrintingServer\NPrinting\RabbitMQCertificatesGenerator.
  3. Run the following command:

    RabbitMQCertificatesGenerator.exe -d -c "C:\ProgramData\NPrinting\certificates"

  4. If the output has warnings or errors due to missing or invalid certificates go to Recreate the messaging service certificates.
  1. Copy the .erlang.cookie file from the system profile folder (C:\WINDOWS\system32\config\systemprofile\) and replace it in the %USERPROFILE% folder (C:\Users\npadmin).
  2. Open a new command prompt as Administrator.

  3. Navigate to the RabbitMQ sbin folder: %ProgramFiles%\NPrintingServer\rabbitmq_server-3.8.3\sbin.

  4. Run the following command:

    rabbitmqctl.bat status

  5. Check the output. The main sections to check are the following:
    Runtime
    OS PID: 12128
    OS: Windows
    Uptime (seconds): 23801
    RabbitMQ version: 3.8.3
    Node name: rabbit@localhost
    Erlang configuration: Erlang/OTP 22 [erts-10.6] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:64]
    Erlang processes: 316 used, 1048576 limit
    Scheduler run queue: 1
    Cluster heartbeat timeout (net_ticktime): 60
     
    Plugins
    Enabled plugin file: C:/ProgramData/NPrinting/RabbitMQ/enabled_plugins
    Enabled plugins:
    * rabbitmq_auth_mechanism_ssl
     
    Data directory
    Node data directory: c:/ProgramData/NPrinting/RabbitMQ/db/rabbit@localhost-mnesia
     
    Config files
    * c:/ProgramData/NPrinting/RabbitMQ/advanced.config
     
    Listeners
    Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
    Interface: 0.0.0.0, port: 5672, protocol: amqp/ssl, purpose: AMQP 0-9-1 and AMQP 1.0 over TLS
    Interface: [::], port: 5672, protocol: amqp/ssl, purpose: AMQP 0-9-1 and AMQP 1.0 over TLS
  6. If the command fails or if the output is different from the expected, go to Recreate the Qlik NPrinting messaging service.

  7. If you encounter command errors you can run the following command to get a more detailed error:

    rabbitmq-server.bat

  1. Copy the .erlang.cookie file from the system profile folder (C:\WINDOWS\system32\config\systemprofile\) and replace it in the %USERPROFILE% folder (C:\Users\npadmin).
  2. Open a new command prompt as Administrator.
  3. Navigate to the certificates generator folder: %ProgramFiles%\NPrintingServer\NPrinting\RabbitMQCertificatesGenerator
  4. Run the following command:

    RabbitMQCertificatesGenerator.exe -p "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.8.3"

  5. Restart the services
  1. Take a backup of folder C:\Programdata\NPrinting\RabbitMQ and place it in another location
  2. Copy the .erlang.cookie file from the system profile folder (C:\WINDOWS\system32\config\systemprofile\) and replace it in the %USERPROFILE% folder (C:\Users\npadmin).
  3. Open a new command prompt as Administrator.
  4. Stop all services, and close the services.msc window.

  5. Stop the epmd.exe process by running the following command: taskkill /f /im epmd.exe
  6. Navigate to the RabbitMQ sbin folder: %ProgramFiles%\NPrintingServer\rabbitmq_server-3.8.3\sbin
  7. Remove everything inside the folder C:\ProgramData\NPrinting\RabbitMQ except for the files enabled_plugins and advanced.config.
  8. Run the following command: rabbitmq-service.bat remove
  9. Add the system environment variable ERLANG_HOME (if missing) with the path to the Erlang base folder (C:\Program Files\erl10.6)
  10. Close the command prompt and open a new one as Administrator.
  11. Navigate to the RabbitMQ sbin folder: %ProgramFiles%\NPrintingServer\rabbitmq_server-3.8.3\sbin
  12. Run the following command:

    rabbitmq-service.bat install

  13. Run the following command:

    rabbitmq-service.bat start

  14. If the service doesn't start you can try running this command to get a more detailed error: rabbitmq-server.bat
  15. Go to Recreate the messaging service certificates and complete the steps.
  1. Open a new command prompt as Administrator.
  2. Navigate to the certificates generator folder: %ProgramFiles%\NPrintingServer\NPrinting\RabbitMQCertificatesGenerator
  3. Run the following command: RabbitMQCertificatesGenerator.exe -f -c "C:\ProgramData\NPrinting\certificates" -p "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.8.3"

    This step also fixes the messaging service users and permissions

  4. Reinstall the Qlik NPrinting Engines and reconfigures them from the Qlik NPrinting web console. Go to Admin > Engine manager) to work with the new certificates.
  5. Restart the services

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!