Cannot connect after a fresh install on Windows

1,419 views
Skip to first unread message

Hrusikesh Panda

unread,
Feb 9, 2016, 12:09:52 PM2/9/16
to rabbitmq-users
I never had any prior versions of Erlang VM or RabbitMQ Server. This is a completely fresh install.

What I did:
  • Downloaded and installed otp_win64_18.2.1.exe
  • Downloaded and installed rabbitmq-server-3.6.0.exe
  • The Rabbit MQ Service is started and running
  • ERLANG_HOME variable is set 
  • Allowed Windows Firewall All ports, inbound full access
So everything went fine it seems. However, 

Exception information: 
    Exception type: ConnectFailureException 
    Exception message: Connection failed
   at RabbitMQ.Client.Impl.SocketFrameHandler.Connect(ITcpClient socket, AmqpTcpEndpoint endpoint, Int32 timeout)
   at RabbitMQ.Client.Impl.SocketFrameHandler..ctor(AmqpTcpEndpoint endpoint, Func`2 socketFactory, Int32 connectionTimeout, Int32 readTimeout, Int32 writeTimeout)
   at RabbitMQ.Client.Framing.Impl.ProtocolBase.CreateFrameHandler(AmqpTcpEndpoint endpoint, Func`2 socketFactory, Int32 connectionTimeout, Int32 readTimeout, Int32 writeTimeout)
   at RabbitMQ.Client.ConnectionFactory.CreateFrameHandler()
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(IList`1 hostnames)
No connection could be made because the target machine actively refused it 127.0.0.1:5672
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
   at RabbitMQ.Client.TcpClientAdapter.EndConnect(IAsyncResult asyncResult)
   at RabbitMQ.Client.Impl.SocketFrameHandler.Connect(ITcpClient socket, AmqpTcpEndpoint endpoint, Int32 timeout)


I'm not sure what I'm missing.

I'm running Windows 7 x64 with SP1.

Hrusikesh Panda

unread,
Feb 9, 2016, 12:15:13 PM2/9/16
to rabbitmq-users
Also note that logs folder is completely empty %APPDATA%\RabbitMQ\log

Ashutosh R

unread,
Feb 9, 2016, 2:55:58 PM2/9/16
to rabbitmq-users
Have you installed raabitmq management plugin? I suppose it is required to access web interface.

Michael Klishin

unread,
Feb 9, 2016, 3:08:58 PM2/9/16
to rabbitm...@googlegroups.com
On 9 February 2016 at 20:15:16, 'Hrusikesh Panda' via rabbitmq-users (rabbitm...@googlegroups.com) wrote:
> Also note that logs folder is completely empty %APPDATA%\RabbitMQ\log

Whi ch either means that RabbitMQ logs elsewhere or that the node was never started.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Hrusikesh Panda

unread,
Feb 9, 2016, 3:47:18 PM2/9/16
to rabbitmq-users
Thanks Ashutosh, Michael for your replies.

The management interface works if I run the server as a console app via rabbitmq-server.bat

I see the RabbitMQ service running, so will that not suffice? I was assuming that will run the broker as Windows service and thus the console app will not be needed.

Michael Klishin

unread,
Feb 9, 2016, 3:59:22 PM2/9/16
to rabbitm...@googlegroups.com
On 9 February 2016 at 23:47:20, 'Hrusikesh Panda' via rabbitmq-users (rabbitm...@googlegroups.com) wrote:
> I see the RabbitMQ service running, so will that not suffice?
> I was assuming that will run the broker as Windows service and
> thus the console app will not be needed.

How do you check that it is running?

What does `rabbitmqctl.bat status` output?

Hrusikesh Panda

unread,
Feb 9, 2016, 4:08:48 PM2/9/16
to rabbitmq-users
services.msc shows its running. 

`rabbitmqctl.bat status` shows this:

Status of node rabbit@computer123 ...
Error: unable to connect to node rabbit@
computer123: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@
computer123]
rabbit@
computer123:
  * connected to epmd (port 4369) on 
computer123
  * epmd reports: node 'rabbit' not running at all
                  other nodes on 
computer123: ['RabbitMQ']
  * suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-21936@
computer123'
- home dir: P:\
- cookie hash: 5OcTEsvfXK4065PbXA0omw==

Michael Klishin

unread,
Feb 9, 2016, 4:11:34 PM2/9/16
to rabbitm...@googlegroups.com
On 10 February 2016 at 00:08:51, 'Hrusikesh Panda' via rabbitmq-users (rabbitm...@googlegroups.com) wrote:
> * epmd reports: node 'rabbit' not running at all
> other nodes on computer123: ['RabbitMQ']

That means RabbitMQ is not running.

First things to check would be http://www.rabbitmq.com/windows-quirks.html

Hrusikesh Panda

unread,
Feb 9, 2016, 4:19:25 PM2/9/16
to rabbitmq-users
Already checked the quirks page. I don't see any of those problems.

Michael Klishin

unread,
Feb 9, 2016, 4:23:42 PM2/9/16
to rabbitm...@googlegroups.com
On 10 February 2016 at 00:19:27, 'Hrusikesh Panda' via rabbitmq-users (rabbitm...@googlegroups.com) wrote:
> Already checked the quirks page. I don't see any of those problems.

If we don't have any RabbitMQ logs, then some kind of Windows event or service log may
have a clue. 

Hrusikesh Panda

unread,
Feb 9, 2016, 4:25:36 PM2/9/16
to rabbitmq-users
Windows Event log doesn't have anything. And logs directory is empty. So are there any other places I should be looking at?

Or maybe I should try to magic bullet solution to all windows problems - reboot the box! :)

Michael Klishin

unread,
Feb 9, 2016, 4:26:50 PM2/9/16
to rabbitm...@googlegroups.com
On 10 February 2016 at 00:19:27, 'Hrusikesh Panda' via rabbitmq-users (rabbitm...@googlegroups.com) wrote:
> If we don't have any RabbitMQ logs, then some kind of Windows
> event or service log may
> have a clue.

also, you can try re-installing the service via `rabbitmqctl.bat`, as mentioned on
http://www.rabbitmq.com/configure.html 

Michael Klishin

unread,
Feb 9, 2016, 4:29:23 PM2/9/16
to rabbitm...@googlegroups.com
On 10 February 2016 at 00:26:45, Michael Klishin (mkli...@pivotal.io) wrote:
> So are there any other places I should be looking at?

I'm not a Windows expert. Try re-installing the service and running `rabbitmq-server.bat` in a
console, perhaps that will  report something.

Hrusikesh Panda

unread,
Feb 9, 2016, 5:10:50 PM2/9/16
to rabbitmq-users
Uninstall/reinstall seems to have made some progress but not much:

Status of node rabbit@computer123 ...
Error: unable to connect to node rabbit@computer123: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@computer123]
rabbit@computer123:
  * connected to epmd (port 4369) on computer123
  * epmd reports node 'rabbit' running on port 25672
  * TCP connection succeeded but Erlang distribution failed
  * suggestion: hostname mismatch?
  * suggestion: is the cookie set correctly?
  * suggestion: is the Erlang distribution using TLS?
current node details:
- node name: 'rabbitmq-cli-3804@computer123'
- home dir: P:\
- cookie hash: Rk2R4OnAFdBt4YoLsK92TQ==

I synced the cookie manually but don't know what to do about the other 2 suggestions. I know there are config options to handle those, but shouldn't the defaults cover this simple scenario?

Michael Klishin

unread,
Feb 9, 2016, 5:14:48 PM2/9/16
to rabbitm...@googlegroups.com
On 10 February 2016 at 01:10:52, 'Hrusikesh Panda' via rabbitmq-users (rabbitm...@googlegroups.com) wrote:
> I synced the cookie manually but don't know what to do about the
> other 2 suggestions. I know there are config options to handle
> those, but shouldn't the defaults cover this simple scenario?

The suggestions are alternatives. It's the cookie location that's incorrect 99% of the time.
`rabbitmq-plugins` uses the same authentication mechanism, so it needs to be fixed
even if you don't touch rabbitmqctl for a  while.
Reply all
Reply to author
Forward
0 new messages