: Before proceeding check if the NPrinting Messenger service is not running. If no, you must perform the steps in article:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------These steps should resolve both the messenger and scheduler services not starting issues (April 2018 and lower versions only)
If the above was unsuccessful, perform the check points below.
- If none of the steps provided in the article above and below allows the NP Scheduler to start, you will need to completely uninstall your NPrinting Server, then reinstall it. Finally you will need to restore your NP database in order to get the system back up and running.
- You can also perform an upgrade to resolve the issue if a newer version of NPrinting is available.
is an open source message broker software that implements the Advanced Message Queuing Protocol. The RabbitMQ server is written in the Erlang programming language.
NPrinting uses RabbitMQ and Erlang and those are installed during the NPrinting installation as part of the requirement.
Sometimes it happens that RabbitMQ or Erlang are failing to install or run. Below is a list of commonly seen issues.
- Erlang cookie cannot be written
- NPrinting Sheduler cannot be started and/or NPrinting Engine show Offline in the NPrinting Web Console
- Cannot start RabbitMQ Service after fresh installation
- After server or service restart, RabbitMQ service doesn't start anymore.
Note that the logs path for Rabbit is here for the following versions:
- NPrinting 17.x.x versions: No longer Supported
- The information below should be used with extreme caution and should be done in the presence of a Qlik Support representative:
- If you are running an older version of NPrinting 17.3.x or higher, we strongly urge and recommend upgrading to the latest version of NPrinting before proceeding below in order to resolve any RabbitMQ related problems.
- If running NP 17.2.3 or lower, you must upgrade to NPrinting 17.3.x exclusively before attempting to upgrade to higher versions of NPrinting and always backup your NPrinting database before performing the task below: How to BackUp and Restore Qlik NPrinting Repository Database from End to End
Check each point below one at a time below individually and check if the Scheduler service is started after performing each individual step below:
(NOTE: The rabbit server path will vary depending on the version of NPrinting that is in use. Check the path manually by navigating to the C:\Program Files\NPrintingServer\ folder to determine the rabbit server folder name and update the path below accordingly
1. rabbitmqctl.bat list_permissions command displays Error: Unable to connect to node rabbit@xxx: nodedown
- open and administrative command prompt
- cd into "C:\Program Files\NPrintingServer\rabbitmq_server-3.x.x\sbin"
- type "rabbitmqctl.bat list_permissions" into the command prompt and view any unable to connect messages
- Fix (NPrinting April 2018 and older versions): copy the .erlang.cookie file in C:\Windows to C:\Users\<npserviceaccountuser> folder. (replace any cookie file found here)
- copy the .erlang.cookie file in (Nprinting June 2018 New location )C:\WINDOWS\system32\config\systemprofile\ to C:\Users\<npserviceaccountuser> folder. (replace any cookie file found here)
See attached image to confirm the user who installed Nprinting.
2. Erlang cookie cannot be written.
During the NPrinting installation, RabbitMQ and Erlang are installed as well.
- In order to run properly, Erlang is going to create a security cookie in the path pointing to this variable %HOMEDRIVE%. This variable correspond to the profile folder of the user installing NPrinting (NOT the one supposed to run the NPrinting Services). In some enterprise Active Directory environment, this variable is redirected to a network path in order to not store the profile content locally on the server. Erlang has a known limitation which prevent you to write this cookie on a network path which results in an installation failure. In order to workaround this issue you can:
- Modify or disable the policy in order to not redirect %HOMEDRIVE% to a network path
- Install NPrinting with a user where this redirection is not applied on. For instance, usually using a local user works around the policy responsible for those redirections.
3. NPrinting Scheduler cannot be started and/or NPrinting Engine shows Offline in the NPrinting Web Console
In this case this might indicate a configuration issue during the NPrinting Installation.
- In order to troubleshoot this issue you can look at the Scheduler logs for Error: RabbitMQ message broker is unreachable Shutting down scheduler service.
- You can then open the Rabbit CMD (or CMD → cd C:\Program Files\NPrintingServer\rabbitmq_server-3.x.x\sbin) and type
- rabbitmqctl.bat list_permissions
- ie: C:\Program Files\NPrintingServer\rabbitmq_server-3.7.10\sbin>rabbitmqctl.bat list_permissions
If following lines are displayed:
Listing permissions in vhost "/" ...
guest .* .* .*
Required users listed below:
Listing permissions for vhost "/" ...
user configure write read
remote .* .* .*
client_engine .* .* .*
client_scheduler .* .* .*
client_webengine .* .* .*
You may run the following commands in the same CMD Prompt in order to add missing RabbitMQ users used by NPrinting
rabbitmqctl.bat add_user remote remote (To create the 'remote' user)
rabbitmqctl.bat set_permissions remote ".*" ".*" ".*" (To give the 'remote' user the required permissions. Do not forget quotes)
If any of the other users are missing, you can use the following to add them manually as well:
1. Create a batch file and copy/paste the following text
call "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.7.10\sbin\rabbitmqctl.bat" add_user "client_scheduler" ""
call "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.7.10\sbin\rabbitmqctl.bat" add_user "client_webengine" ""
call "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.7.10\sbin\rabbitmqctl.bat" add_user "client_engine" ""
call "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.7.10\sbin\rabbitmqctl.bat" set_permissions "client_scheduler" ".*" ".*" ".*"
call "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.7.10\sbin\rabbitmqctl.bat" set_permissions "client_webengine" ".*" ".*" ".*"
call "%ProgramFiles%\NPrintingServer\rabbitmq_server-3.7.10\sbin\rabbitmqctl.bat" set_permissions "client_engine" ".*" ".*" ".*"
2. Save the batch file as RabbitMQuseradd.bat (ensure that file extensions are not hidden otherwise you will be saving it as a .txt ext not .bat extension.)
3. Right click and run the batch file 'as administrator'
Note: you may safely run this batch file as any existing users will be identified and skipped
***Also check that the path to the 'sbin' folder is accurate as it may differ depending on the version of NPrinting in use. Update the above paths as needed***
Restart all NPrinting services
4. Cannot start RabbitMQ Service after fresh installation or start and stop immediately.
A common issue might be the port 5672 used by another process. You can check this by running a netstat -aon
- Otherwise look at the event logs, if you see this error: "RabbitMQ: Erlang machine stopped instantly (distribution name conflict?)"
- According to the rabbitMQ help (https://www.rabbitmq.com/windows-quirks.html) this means that the working directory RabbitMQ is using contains non-ASCII character. By default this directory is located in C:\Programdata\NPrinting\RabbitMQ\
If the service doesn't start after those manipulations you can try running this command :
- If the program is running properly you should get something looking like that:
RabbitMQ 3.x.x. Copyright (C) 2007-2015 Pivotal Software, Inc.
## ## Licensed under the MPL. See http://www.rabbitmq.com/
########## Logs: C:\Programdata\NPrinting\RabbitMQ\Log\rabbit@QLIKSERVER3.log
###### ## C:\Programdata\NPrinting\RabbitMQ\Log/rabbit@QLIKSERVER3-sasl.log
Starting broker... completed with 0 plugins.
This command will basically run RabbitMQ, in your command prompt session, so you will get more details about the actual problem.
We have seen that you might run into this issue if you are using some variables that RabbitMQ is also using which will result in some kind of conflict.
To have a list of the variables RabbitMQ uses you can visit this page http://www.rabbitmq.com/relocate.html
In addition to this page we have noticed that the variable %LOGS% is also used to build %RABBITMQ_LOGS% (present in the link mentioned above).
Note: changing the log location is not advised and may damage your NPrinting installation. Please keep the default log folder location.
5. After server or service restart, RabbitMQ service doesn't start anymore or start and stop immediately. If the service has ever worked before it might be some kind of corruption in the database
To fix this issue you can simply open the Rabbit CMD and type
- rabbitmq-service.bat remove
- Remove or rename the directory C:\Programdata\NPrinting\RabbitMQ\
- rabbitmq-service.bat install This will recreate C:\Programdata\NPrinting\RabbitMQ\
- rabbitmq-service.bat start
If the service doesn't start after those manipulations you can try running this command :
- rabbitmq-server.bat in order to get a more detailed error
Another thing to be checked is the right version of .net Framework which need to correspond with the Nprinting System Requirements
If you see any error logging related to .net, for instance in the windows event logs, the following steps have to be done:
Update or repair the .net Framework. After that open the Rabbit CMD to perform the following two commands in the CMD Prompt in order to recreate the permission.
- rabbitmqctl.bat add_user remote remote
- rabbitmqctl.bat set_permissions remote ".*" ".*" ".*"