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.

In this process, the message notification and time-consuming tasks are handled using the open source RABBITMQ as the Message Center server.

But a little bit more disgusting, I this component is to be executed 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're right, it's such an old machine.


Ii. problems to be faced

Installing RABBITMQ on Windows Server 2008 and CentOS has been a success. Without any obstructions, this time the installation on Windows Server 2003 encountered a problem:

1, the first installation of Erlang, no matter what 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 3.3.5 when the problem. That is, you cannot locate the program input point Inet_pton on the dynamic link library Ws2_32.dll. For example, with:


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 a lot of QQ group asked also no fruit.

So I started to search the English page. Find such a URL: http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/16499

The dialogue between these two people gives me a lot of critical information. The key thing is:

From the information you provided it's likely that's caused bythe Erlang distributed networking not working on wind OWS 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 you can find the shortest set of steps that provokes the error thenthat should is enough to give the Erlang Developers a handle 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 only Erlang can run the system, it can also very good drip work ^_^!

The developers of Erlang are also expected to know the problem, which has not changed in the last few years to the latest version 17.3. They are not expected to fix the bug. Even Microsoft has stopped supporting Windows Server 2003.

So I once again downloaded a r16b03 Windows 32-bit Binary


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



This gives me a bit of a headache, is it just the last way I can try? This is the first time in this Windows Server 2003 compiled Erlang source code ...

I thought for a while and suddenly thought that this error is not the RABBITMQ service ... I faint, the next time should observe the error of the newspaper, this is obviously RABBITMQ register service problem.

。 It should have nothing to do with Erlang.

。。

It may be that uninstalling the RABBITMQ does not uninstall the Clean service and registration form.

So I directly restore my system to the previous clean image, and install again. Ok.!!


Iv. Methods of Solution

1. Installation of Erlang 32-bit. Yes: HTTP://WWW.ERLANG.ORG/DOWNLOAD_RELEASE/22, I installed the 16b03 32bit.

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

3, install RABBITMQ 3.3.5. Yes: https://www.rabbitmq.com/install-windows.html

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

Very easy, this is installed, then create a new user (it is best to delete the default guest user). Create a new virtual machine vhost to set the user's permissions on the virtual machine:



All right. A test procedure for C # is attached below:

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 runs 32bit on the program. The hardware effect must not be played. The possibility could not be very high either. Fortunately, our old system is too small for concurrency. 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.