stompgem / stomp

A ruby gem for sending and receiving messages from a Stomp protocol compliant message queue. Includes: failover logic, ssl support.
http://stomp.github.com
Apache License 2.0
152 stars 80 forks source link

Windows/port bug? #27

Closed MaartenG closed 12 years ago

MaartenG commented 12 years ago

I'm trying out Stomp on a Windows machine, where out of the box ActiveMQ starts on port 8161. Stomp will refuse to connect:

irb(main):009:0> client = Stomp::Client.new "stomp://localhost:8161" TypeError: can't convert nil into String

If I try an incorrect port number instead, like 8162, I get this

irb(main):008:0> client = Stomp::Client.new "stomp://localhost:8162" Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2)

I also see no connection attempt appear in the ActiveMQ log on the try with the correct port. So what's happening in trying to connect to the correct host/port that it responds with a nil error?

MaartenG commented 12 years ago

My bad, I just discovered that I have to start Stomp support in ActiveMQ before this will work.

gmallard commented 12 years ago

Thanks. Glad you figured out you need to configure STOMP in AMQ.

The ECONNREFUSED makes sense of course.

But that other error could be a little more friendly I think. Something like: Yeah, you connected, but it does not look like a STOMP server to me.

If you have time, please open a "need friendly message" issue.

Otherwise we might forget this.

MaartenG commented 12 years ago

I will do that, thanks