strongloop / strong-mq

MQ API with cluster integration, implemented over various message queues.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testcases related to stomp is failing

salamani opened this issue · comments

Hi,
I have installed stong-mq on ppc64le machine, I have rabbitmq running enabled stomp plugin.
The plugin list on rabbitmq is as follow :
$ rabbitmq-plugins list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@pts00449-vm19
|/
[E ] amqp_client 0.0.0
[E ] cowboy 1.0.3-rmq0.0.0-gitb8e4115
[E ] cowlib 1.0.1-rmq0.0.0-git7d8a571
[e ] mochiweb 2.7.0-rmq0.0.0-git680dba8
[E ] rabbit_common 0.0.0
[E ] rabbitmq_management 0.0.0
[e ] rabbitmq_management_agent 0.0.0
[E ] rabbitmq_stomp 0.0.0
[E ] rabbitmq_test 0.0.0
[e ] rabbitmq_web_dispatch 0.0.0
[E ] rabbitmq_web_stomp 0.0.0
[E ] ranch 1.1.0-rmq0.0.0-git741bfb7
[E ] sockjs 0.3.4-rmq0.0.0-git99fd953
[e ] webmachine 1.10.3-rmq0.0.0-gite9359c7

Testing is failing as follow :
$npm test

strong-mq@1.0.0 test /root/strongloop/strong-mq
mocha --reporter spec

(node) child_process: options.customFds option is deprecated. Use options.stdio instead.

open with amqp
- should error on a connect failure

clusters
with native
â should send all messages
â should send messages to all processes
â should filter work queues by name
â should support PushQueue first or PullQueue first
â should filter topic queues by name
â should filter subscriptions by topic
with amqp
events.js:141
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at exports._errnoException (util.js:837:11)
at TCP.onread (net.js:544:26)
â should send all messages
â should send messages to all processes
â should filter work queues by name
â should support PushQueue first or PullQueue first
â should filter topic queues by name
â should filter subscriptions by topic

regardless of provider
create
â should create native with no options
â should throw if options has no provider
â shold throw if options has unknown provider
â shold throw if url has unknown provider

stomp provider
with options object
â should have a provider property
1) should open and close
2) should open and close a push queue
3) should open and close a pull queue
4) should open and double close a push queue
5) should open and double close a pull queue
6) should open and double close a pub queue
7) should open and double close a sub queue
8) should allow subscribe before publish
when open and close are misused
- should throw or ignore multiple open
- should throw or ignore close when never opened
- should throw on close after closed
on work queue push then pull
9) should deliver strings
10) "after each" hook

â 10 of 163 tests failed:

  1. stomp provider with options object should open and close:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  2. stomp provider with options object should open and close a push queue:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  3. stomp provider with options object should open and close a pull queue:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  4. stomp provider with options object should open and double close a push queue:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  5. stomp provider with options object should open and double close a pull queue:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  6. stomp provider with options object should open and double close a pub queue:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  7. stomp provider with options object should open and double close a sub queue:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  8. stomp provider with options object should allow subscribe before publish:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  9. stomp provider with options object on work queue push then pull should deliver strings:
    Error: connect ECONNREFUSED 127.0.0.1:61613
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at TCPConnectWrap.afterConnect as oncomplete

  10. stomp provider with options object on work queue push then pull "after each" hook:
    Error: timeout of 2000ms exceeded
    at null. (/root/strongloop/strong-mq/node_modules/mocha/lib/runnable.js:167:14)
    at Timer.listOnTimeout (timers.js:89:15)

npm ERR! Test failed. See above for more details.
I have run all testcases in rabbitmq and related to plugins which are all passing.
Can you please let me know how can I contribute to this issue.

Regards,
Salamani

Its unlikely that strong-mq does anything you need. What are you doing that you think it will help with?

Can you please let me know how can I contribute to this issue.

Enable debugging and perhaps you will get more info: https://github.com/strongloop/strong-mq/blob/master/lib/dbg.js#L3

@sam-github Thanks for your response. I am working with @salamani on the issue.
We were trying to get this component to work on ppc64le platform.

The initial issue was that the rabbitmq stomp service was not starting properly. Once, that was resolved, the above tests were returning a "Bad CONNECT". From the rabbitmq logs:
=ERROR REPORT==== 8-Dec-2015::15:51:38 ===
STOMP error frame sent:
Message: "Bad CONNECT"
Detail: "Access refused for user ''\n"
Server private detail: none

Tried to change rabbitmq configuration to create and use default_user. However, that did not help.

However, the following change to strong-mq/node_modules/stomp-client/lib/client.js helped and all tests succeeded post that.
41,42c41,42
< this.user = (user || '');

< this.pass = (pass || '');

this.user = (user || 'guest');
this.pass = (pass || 'guest');

This file is however part of the stomp-client node module and I am trying to understand how the user / pass values are passed to it.

Is there any rabbitmq config change or a change to any strong-mq configuration file that can help in fixing the errors?

Thanks!

Priya

The following configuration change to rabbitmq fixed the issue:
rabbitmqctl add_user '' ''
rabbitmqctl set_permissions -p / '' "." "." ".*"
The above code change (hard coded values) are not required post this config update to rabbitmq server

@chandadharap @cgole we shouldn't be spending time on this

@seth-priya so, you can close this issue if you resolved it as a system config issue?