Windows Server 2003 64bit SP2 under Installation RABBITMQ

Source: Internet
Author: User
Tags rabbitmq

I. BACKGROUND

Recently made a small base component, the main role is asynchronous message notification, cache maintenance, and time-consuming task processing.

Where message notification and time-consuming tasks are handled using open source RABBITMQ as the message Hub server.

But a bit more disgusting, I this component is to run in the existing system, that is, to upgrade the existing system, I use this component, and, in addition to the database server, all servers are Windows Server 2003 Enterprise Edition SP2 64bit, you are not wrong, it is such an ancient machine ...


Ii. problems to be faced

The previous installation of RABBITMQ on Windows Server 2008 and CentOS was smooth and did not encounter any obstructions, and this time the installation on Windows Server 2003 encountered a problem:

1, the first installation of Erlang, there is no problem, I installed the OTP 17.3 Windows 64-bit, the address is: http://www.erlang.org/download.html

2, install RABBITMQ the latest version of the 3.3.5 when the problem, that is unable to locate the program input point Inet_pton on the dynamic link library ws2_32.dll, such as:


reported an error related to network address translation ... It doesn't make me think.


Third, the process and thinking of finding the answer

So began to search the Internet, the Chinese page no one in Windows Server 2003 installed above the RABBITMQ, in many QQ group asked also no fruit.

Then began to search English Web page, found such a URL: http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/16499

The dialogue between these two people gave me a lot of key information, the most important thing is:

From the Information you provided it's likely that's caused bythe Erlang distributed networking not working on Windows 2003 64bit. This platform are sufficiently rare that no-one else have reported Thisproblem for Erlang, but I see there was a similar rep ORT in wiresharkcaused by a library ordering problem:https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5160#c16if Can find the shortest set of steps that provokes the error thenthat should is enough to give the Erlang developers a h Andle on Theproblem. I would expect these commands to cause a failure-can youconfirm? Make sure the Erlang Bin directory are in your path:werl-sname testnode <at>%computername%werl-sname foo-remsh te Stnode <at>%computername%if need a working RabbitMQ broker in the meantime then considerinstalling the 32bit ve Rsion of Erlang. I not expect it to suffer fromthe same problem. 

It should be the problem of Erlang, RABBITMQ claims that as long as Erlang can run the system, it can also be very good drip work ^_^!

Erlang developers are also aware of this problem, in the past few years to the latest version of the 17.3 has not been modified, it is estimated that they will not want to fix this bug, even Microsoft stopped supporting Windows Server 2003.

So I re-downloaded a r16b03 Windows 32-bit Binary


Before installing the RABBITMQ and Erlang all uninstalled, and then reinstall Erlang and RABBITMQ, this time in the installation of RABBITMQ again encountered problems:



This makes me a bit of a headache, I only have the last one to try the road? is to recompile the Erlang source code on this Windows Server 2003 ...

I thought for a while, suddenly feel that this error is unable to register RABBITMQ service ... I faint, the next time should observe the error of the newspaper, this is obviously the RABBITMQ registration service problem well ... It should be unrelated to Erlang ...

It is possible that uninstalling RABBITMQ does not uninstall the Clean service and registry.

So I directly restore my system to the previous clean mirror, reinstall, ok!!!


Iv. Methods of Solution

1, install Erlang 32-bit, is: HTTP://WWW.ERLANG.ORG/DOWNLOAD_RELEASE/22, I installed is 16b03 32bit.

2, the new system environment variable Erlang_home, the value is C:\Program Files (x86) \erl5.10.4, that is, as long as you can find Bin/werl.exe.

3, installation Rabbitmq 3.3.5, is: https://www.rabbitmq.com/install-windows.html

4. Increase the path of the Rabbitmqctl.bat (C:\Program Files (x86) \RABBITMQ Server\rabbitmq_server-3.3.5\sbin) to the path system environment variable.

Very simply, this installation is complete, then create a new user (preferably delete the default Guest user), create a new virtual machine vhost, set the user's permissions on the virtual machine:



OK, here's a C # test program:

Send.cs

Namespace rabbitmq.sendreceive{    class program    {        static void Main (string[] args)        {            // ConnectionFactory factory = new ConnectionFactory () {HostName = "192.168.1.103"};            ConnectionFactory factory = new ConnectionFactory ();            Factory. Uri = "Amqp://jiyiqin:[email protected]:5672/cproxy";            using (iconnection conn = factory. CreateConnection ())            {                using (IModel channel = conn. Createmodel ())                {                    channel. Queuedeclare ("Hello", False, False, false, NULL);                    String mesg = "Hello RabbitMQ";                    byte[] BODY = Encoding.UTF8.GetBytes (MESG);                    Channel. Basicpublish ("", "Hello", null, body);                    Console.WriteLine ("[x] Sent {0}", MESG);}}}}    

Receive.cs

Using system;using system.collections.generic;using system.linq;using system.text;using RabbitMQ.Client;using        Rabbitmq.client.events;namespace rabbitmq.sendreceive{class Program {static void Main (string[] args)            {//connectionfactory factory = new ConnectionFactory () {HostName = "192.168.1.103"};            ConnectionFactory factory = new ConnectionFactory (); Factory.            Uri = "Amqp://jiyiqin:[email protected]:5672/cproxy"; using (iconnection conn = factory. CreateConnection ()) {using (IModel CHANNEL = conn. Createmodel ()) {channel.                    Queuedeclare ("Hello", False, False, false, NULL);                    Queueingbasicconsumer consumer = new Queueingbasicconsumer (channel); Channel.                    Basicconsume ("Hello", true, consumer);                    Console.WriteLine ("[*]waiting for Message ...");                     while (true) {    var Queueitem = (Basicdelivereventargs) consumer.                        Queue.dequeue ();                        byte[] BODY = queueitem.body;                        String MESG = Encoding.UTF8.GetString (body);                    Console.WriteLine ("[x] Received {0}", MESG); }                }            }        }    }}

Of course, 64bit hardware above the 32bit program, certainly can not play the hardware effect, may not be very high performance, but fortunately, our ancient system of concurrency and other requirements are too small! Ha ha

End.


Windows Server 2003 64bit SP2 under Installation RABBITMQ

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.