[rabbitmq-discuss] Installation Trouble on Windows - "The handle is invalid"

Ann Witbrock (c) awitbrock at vmware.com
Thu Jul 28 14:00:00 BST 2011


Chris, 
Happy to hear you now have RabbitMQ service running ok. 

Thanks for your detailed description. 
To avoid many of these problems, we created the windows installer, which is the preferred way of installing fresh  (the site should say so when we release our next RabbitMQ version) . 

We are aware that the troubleshooting and uninstall need to be improved, and also our site navigation. 

Your comments will be helpful in making useful changes to that side of the problem. 

Regards, 
Ann 


----- Original Message -----

From: "Christopher Moloney" <cmoloney at vt.edu> 
To: "Ann Witbrock (c)" <awitbrock at vmware.com>, emile at rabbitmq.com 
Cc: rabbitmq-discuss at lists.rabbitmq.com 
Sent: Thursday, 28 July, 2011 4:09:34 AM 
Subject: Re: [rabbitmq-discuss] Installation Trouble on Windows - "The handle is invalid" 


Hello Emile and Ann, 
  
Thanks for your help.  Your suggestions were enough to help me solve my problems and get the server up and running. If you would like to know more detail about what went wrong form me you can keep reading. 
  
I did not have an older version installed before my problems began. I installed for the first time Monday per the windows install instructions (not using the binary), but that didn’t work. I went through the install instructions several times and I think I was making a mess and causing conflicts with various erlang installations and directories for the rabbitmq server. Eventually I understood the process and I wascertain to make sure to set the %ERLANG_HOME% and % RABBITMQ_SERVER% path variables, then add %ERLANG_HOME%\bin and % RABBITMQ_SERVER%\sbin to path, and copy the C:\Windows .erlang.cookie over to replace the cookie in my C:\Users\cmoloney folder. However by this point I think my problem was with the windows service. 
  
During the multiple installs, I tried to remove the services and use the binary install. Running the binary, the windows service was not removed. I thought the fresh install would overwrite the current service. It did not. The existing service remained and it referenced the old erlang directory. First, I tried to edit the path in the windows service, but could not. Then I looked up how to remove a service and found the SC DELETE command. I used it to remove the service, which it seemed to do because it is no longer in the list. However when I try to install rabbitmq now I am told the “service is already present – only updating service parameters” after that no service appears in the list. 
  
Unfortunately I was not aware of the “rabbitmq-service.bat remove” command when I ran SC DELETE. I do think the presence of some registry values was the root of the problem. I did not discover the trouble shooting page until late in the game, which is odd because I was staring at the install page for hours and the trouble shooting is at the bottom of the install page. For people like me I would say put a link to “Trouble Shooting” at the end of each install section where you have “more info” links. Also I looked for FAQs, Support/Trouble shooting in the nav at the top and did not see it. Eventually I turned to google to search rabbitmq troubleshooting. The first page returned is RabbitMQ – Installation, which I ignored the first time through because of the page title, but later I notice that the text below the title contained troubleshooting. 
  
Another suggestion would be to make a brief mention of “rabbitmq-service remove” in the install section (along with the link trouble shooting) because when I encountered a problem I didn’t continue reading the documentation and overlooked the remove command. Perhaps I should have looked it all over but being hasty I breezed over it, which resulted in more problems. 
  
Based on your advice I first checked my registry.  There was a bunch of stuff associated with rabbitmq in the directory where Emile suggested it would be. 
  
I checked to see if epmd.exe was running. It was, so I killed it. 
  
I began by backing up the registry. I uninstalled erlang. I deleted the rabbitmq registry entries under ErlSrv. I went to add remove programs, found RabbitMQ still had a trace there, removed it. I removed the path variables. I removed the directory in APP_DATA. 
  
Then I restarted. I installed erlang and rabbitmq from the windows package. I restarted after the install. 
The windows install binary did not add the %RABBITMQ_SERVER% variable or add " ;%RABBITMQ_SERVER%\sbin " to path. I added these things. I am running windows 7 on a 64bit machine. 
  
That did the trick. The server runs and I went through the tutorials today. 
  
Thanks for your advice. I guess, my suggestions would be to add links to trouble shooting at the foot of each operating system’s install guide (and perhaps to the header nav) and to mention the “rabbitmq-service remove” 
  
  
When I was going through the tutorials I got this error message back with every submission to the server: 
C:\Python27\...\pika\callback.py:69: UserWarning: CallbackManager.add: Duplicate callback found for “0:Connection.CloseOk” 
I am not sure if it is associated with my initial problem or if I mistakenly defined the connection twice without clearing the connection. Does that error message mean anything to you? 
  
Thanks again. 

Chris 



On Wed, Jul 27, 2011 at 3:18 AM, Ann Witbrock (c) < awitbrock at vmware.com > wrote: 





Hi Chris, 
I'm sorry our troubleshooting instructions weren't able to help you. 
  
Does the rabbitmq service still appear in your list of services? 
Is epmd.exe still running in your processes? You may like to kill that. 
Did you make any change to the cookie or was that ok? 
  
It sounds like you had an older version already installed. Is that correct? 
If so, you may need to install the older version combination in order to stop and remove the old service. 
After removing the service you should be able to uninstall rabbitmq, remove directories (including mnesia and logs if you want) and uninstall erlang, and remove any environment variables you dont want (eg from path and ERLANG_HOME). 
Double check there is no RabbitMQ service present and that epmd.exe is not running. You may wish to reboot. 
  
After that a clean fresh install should work ok. Our "experimental" installer works quite well, just ensure you stop, remove and start the service again (or reboot) after adding plugins. Also remember you may need to run some steps as administrator (elevated permission). 
  
Ann 
  



From: "Christopher Moloney" < cmoloney at vt.edu > 
To: rabbitmq-discuss at lists.rabbitmq.com 
Sent: Wednesday, 27 July, 2011 1:16:54 AM 
Subject: [rabbitmq-discuss] Installation Trouble on Windows - "The handle is        invalid" 





Hello, 
I am new to rabbitmq and these sorts of messaging services. I am having trouble installing RabbitMQ on window7. I would like to use it in conjunction with django-celery to manage a task queue. 
I looked around the archives but I didn’t see anything that offered a solution to my problem. 
Here is a summary of what I have done thus far. First I installed erlang 5.8.4 and rabbitmq 2.5.1 and followed the procedure on the windows install page. Everything seemed to go well, however when I tried to run the server it continually returned node down. In the hello world example using pika I got the message that the connection was actively refused by the machine. So first I checked my firewall to make sure port 5672 was open. Then, I made sure my C:/Windows .erlang.cookie matched the on in my user directory. 
Starting the server I would get a boot error that was not very descriptive: error, badmatch error. 
So I decided to try to uninstall and run the prepackaged windows binaries. Well then there was a windows service error mismatch because I had installed erlang 5.8.4 and the windows binaries used 5.8.3.   The windows service was point to the wrong directory. Service.msc does not allow you to edit the path. I used the SC DELETE command at the terminal to remove the RabbitMQ service imaging that a fresh install would replace the service value with the correct location. 
Since then I have not been able to add the service back. When I attempt to run ‘rabbitmq-service install’ get the message: Warning, could not set correct service description (comment) Error: The handle is invalid. 
The same message comes up when I run any of the commands. I have tried to wipe all traces of erlang and rabbit from my machine to start again, but it has not been possible. I would really like to resolve this matter and get the messaging server up and running. 
Any suggestions? I appreciate any assistance. 
Thanks. 
Chris 
_______________________________________________ 
rabbitmq-discuss mailing list 
rabbitmq-discuss at lists.rabbitmq.com 
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss 






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110728/a31bf2ab/attachment.htm>


More information about the rabbitmq-discuss mailing list