最近在使用rabbitmq
python端用pika连接
出现错误:
=ERROR REPORT==== 18-Dec-2012::19:02:56 ===
exception on TCP connection <0.30342.255> from 127.0.0.1:44552
{bad_header,<<65,77,81,80,0,0,9,1>>}
但是运行的时候出错
参考:
http://rubydoc.info/github/ruby-amqp/amqp/master/file/docs/Troubleshooting.textile
发现服务器的rabbitmq版本太旧了
于是乎:
测试下看看:
启动:
停止:
启动管理插件命令:
重启 rabbitmq
打开 http://servername:15672/
图片见附件
python端用pika连接
出现错误:
=ERROR REPORT==== 18-Dec-2012::19:02:56 ===
exception on TCP connection <0.30342.255> from 127.0.0.1:44552
{bad_header,<<65,77,81,80,0,0,9,1>>}
但是运行的时候出错
参考:
http://rubydoc.info/github/ruby-amqp/amqp/master/file/docs/Troubleshooting.textile
发现服务器的rabbitmq版本太旧了
# rabbitmqctl status
Status of node rabbit@master ...
[{running_applications,[{rabbit,"RabbitMQ","1.7.2"},
{mnesia,"MNESIA CXC 138 12","4.4.12"},
{os_mon,"CPO CXC 138 46","2.2.4"},
{sasl,"SASL CXC 138 11","2.1.8"},
{stdlib,"ERTS CXC 138 10","1.16.4"},
{kernel,"ERTS CXC 138 10","2.13.4"}]},
{nodes,[rabbit@master]},
{running_nodes,[rabbit@master]}]
…done.
于是乎:
apt-get remove rabbitmq-server
apt-get auto remove
apt-get install erlang-base
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.1/rabbitmq-server_3.0.1-1_all.deb
dpkg -i rabbitmq-server_3.0.1-1_all.deb
测试下看看:
# rabbitmqctl status
Status of node rabbit@master ...
[{pid,21265},
{running_applications,[{rabbit,"RabbitMQ","3.0.1"},
{os_mon,"CPO CXC 138 46","2.2.4"},
{mnesia,"MNESIA CXC 138 12","4.4.12"},
{sasl,"SASL CXC 138 11","2.1.8"},
{stdlib,"ERTS CXC 138 10","1.16.4"},
{kernel,"ERTS CXC 138 10","2.13.4"}]},
{os,{unix,linux}},
{erlang_version,"Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:30] [hipe] [kernel-poll:true]\n"},
{memory,[{total,25288968},
{connection_procs,2784},
{queue_procs,5568},
{plugins,0},
{other_proc,9035696},
{mnesia,61664},
{mgmt_db,0},
{msg_index,16960},
{other_ets,759608},
{binary,1984},
{code,12359386},
{atom,1188033},
{other_system,1857285}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,1662112563},
{disk_free_limit,1000000000},
{disk_free,1369849856},
{file_descriptors,[{total_limit,924},
{total_used,3},
{sockets_limit,829},
{sockets_used,1}]},
{processes,[{limit,1048576},{used,123}]},
{run_queue,0},
{uptime,88}]
...done.
启动:
rabbitmq-server –detached
停止:
rabbitmqctl stop
启动管理插件命令:
rabbitmq-plugins enable rabbitmq_management
重启 rabbitmq
打开 http://servername:15672/
图片见附件