Logo Help Center

Troubleshooting RabbitMQ in Enterprise Server 10

Troubleshooting RabbitMQ in Enterprise Server 10

This article describes some of the steps that can be followed when troubleshooting the RabbitMQ integration in Enterprise Server.

Enabling logging

To troubleshoot RabbitMQ traffic, enable the LOG_RABBITMQ_SERVICES option in the configserver.php file of Enterprise Server.

//    Used for logging RabbitMQ Web services in the service log folder. When enabled, RabbitMQ requests 
//    that are fired by Enterprise Server to RabbitMQ Server as well as the corresponding responses are logged.
//    Enterprise Server integrates with RabbitMQ via two protocols:
//    1. REST for administration tasks (such as creating queues, users and permissions).
//    2. AMQP to push messages (events) into the queues.
//    The services (requests and responses) are logged in the server log folder (OUTPUTDIRECTORY) and have a
//    RabbitMQ_ prefix and a .txt file extension.
//    This log feature is disabled by default and can be temporarily enabled for troubleshooting RabbitMQ traffic.
//    Note that clients read messages from RabbitMQ directly, but that traffic is not logged here.
define ('LOG_RABBITMQ_SERVICES', false);

Low level communication errors

To identify low level communication errors, click the Inspect entry in the context menu of the page to open the Developer Tools of the Web browser. When an error exists, it is shown in red text in the Console tab of the Developer Tools.

Below are some of the errors that may appear and how to resolve them.

Scenario 1

Error: 'ws://rabbitmq:15674/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Possible cause: The port 15674 may not be served.

Possible solution: Enable the Stomp plugin:

rabbitmq-plugins enable rabbitmq_web_stomp

For more information, see the RabbitMQ documentation: RabbitMQ Web-Stomp Plugin.

Scenario 2

Mixed Content: The page at 'https://myenterprise.local/Enterprise/server/wwtest/rabbitmq/ ent_events_monitor.php?user=woodwing&pass=ww' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://localhost:15674/ws'. This request has been blocked; this endpoint must be available over WSS.

Possible cause: The Web browser does not allow the Events Monitor to run over SSL (HTTPS) while connecting to RabbitMQ over non-SSL.

Possible solution: Make sure you have an SSL option specified for the MESSAGE_QUEUE_CONNECTIONS option in configserver.php that has a wss prefix:

new MessageQueueConnection( 'RabbitMQ', 'STOMPWS', 'wss://rabbitmq:15673/ws', true, 'woodwing', 'ww' ),

Alternatively, the Events Monitor could be run over a non-SSL connection. In that case make sure the URL has a http prefix. In this example the URL should start with http://myenterprise.local.

Scenario 3

XMLHttpRequest cannot load https://myenterprise.local/Enterprise/index.php?protocol=JSON&_=1461341384416. Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://myenterprise.local' that is not equal to the supplied origin. Origin 'http://localhost' is therefore not allowed access.

Possible cause: The Web browser does not allow to download the Events Monitor from one location while connecting to another location.

Possible solution: Check the MESSAGE_QUEUE_CONNECTIONS setting in the configserver.php file.

Make sure that the URLs are matching the URL used in the address bar of the Web browser. In this example the URL should start with https://myenterprise.local.

Scenario 4

Error: WebSocket connection to 'wss://myenterprise.local/ws' failed: Error during WebSocket handshake: Unexpected response code: 404.

Possible cause: You may be running RabbitMQ and Enterprise Server on the same machine whereby Apache and RabbitMQ are both serving the same port.

Possible solution: Specify the 15673 port for MESSAGE_QUEUE_CONNECTIONS option in configserver.php:

new MessageQueueConnection( 'RabbitMQ', 'STOMPWS','wss://rabbitmq:15673/ws', true, 'woodwing', 'ww' ),

Alternatively, change port 443 into 444 for Apache settings in httpd-ssl.conf:

Listen 444

<VirtualHost _default_:444>

Scenario 5

Error: WebSocket connection to 'wss://myenterprise.local/ws' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

Possible solution: Restart RabbitMQ.

Was this article helpful?
0 out of 1 found this helpful / Created: / Updated:
Have more questions? Submit a request


Please sign in to leave a comment.