Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/315.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python RabbitMQ管理API调用失败:HTTP 500:内部服务器错误_Python_Rabbitmq_Celery - Fatal编程技术网

Python RabbitMQ管理API调用失败:HTTP 500:内部服务器错误

Python RabbitMQ管理API调用失败:HTTP 500:内部服务器错误,python,rabbitmq,celery,Python,Rabbitmq,Celery,我使用芹菜花和RabbitMQ作为消息代理。然而,我却犯了一个严重的错误 错误-RabbitMQ管理API调用失败:HTTP 500:内部服务器错误 每次尝试访问RabbitMQ管理接口()或芹菜代理()上的RabbitMQ队列时 以下是详细的日志信息: =错误报告===2017年1月15日::23:12:19===webmachine错误:path=“/api/queues/%2F”{ERROR,{ERROR,function_子句, [{mochijson2,json_encode_stri

我使用芹菜花和RabbitMQ作为消息代理。然而,我却犯了一个严重的错误

错误-RabbitMQ管理API调用失败:HTTP 500:内部服务器错误

每次尝试访问RabbitMQ管理接口()或芹菜代理()上的RabbitMQ队列时

以下是详细的日志信息:

=错误报告===2017年1月15日::23:12:19===webmachine错误:path=“/api/queues/%2F”{ERROR,{ERROR,function_子句, [{mochijson2,json_encode_string_unicode, [{error,[],},{encoder,null,false},“,”, [{file,“src/mochijson2.erl”},{line,274}]}, {mochijson2'-json_encode_proplist/2-fun-0-',3, [{file,“src/mochijson2.erl”},{line,198}]}, {lists,foldl,3,[{file,“lists.erl”},{line,1248}]}, {mochijson2,json_encode_proplist,2, [{file,“src/mochijson2.erl”},{line,202}]}, {mochijson2'-json_encode_proplist/2-fun-0-',3, [{file,“src/mochijson2.erl”},{line,199}]}, {lists,foldl,3,[{file,“lists.erl”},{line,1248}]}, {mochijson2,json_encode_proplist,2, [{file,“src/mochijson2.erl”},{line,202}]}, {mochijson2'-json_encode_array/2-fun-0-',3, [{file,“src/mochijson2.erl”},{line,189}]}}

RabbitMQ web管理为我提供了:

获取了响应代码500,正文为{“错误”:“内部服务器” 错误”,“原因”:“{Error,{Error,function\u子句,\n [{mochijson2,json\u encode\u string\u unicode\n [{error,[],},\n{encoder,null,false},\n “\”],\n[{file,“src/mochijson2.erl”},{line,274}]},\n {mochijson2',-json_encode_proplist/2-fun-0-',3,\n [{file,“src/mochijson2.erl”},{line,198}]}\n {lists,foldl,3,[{file,“lists.erl”},{line,1248}]},\n {mochijson2,json_encode_proplist,2,\n [{file,“src/mochijson2.erl”},{line,202}]}\n {mochijson2',-json_encode_proplist/2-fun-0-',3,\n [{file,“src/mochijson2.erl”},{line,199}]}\n {lists,foldl,3,[{file,“lists.erl”},{line,1248}]},\n {mochijson2,json_encode_proplist,2,\n [{file,“src/mochijson2.erl”},{line,202}]}\n {mochijson2',-json_encode_array/2-fun-0-',3,\n [{file,“src/mochijson2.erl”},{line,189}]}]}}\n}

我正在使用:

  • Ubuntu 14.04
  • Python 2.7.6
  • 花0.9.1
  • 芹菜4.0.2
  • RabbitMQ 3.6.6
  • Erlang/OTP 19
RabbitMQ管理插件已启用(RabbitMQ插件启用RabbitMQ_管理)

以下是rabbitmqctl状态的输出:

[{pid,28609},{正在运行_应用程序, [{rabbitmq_管理,“rabbitmq管理控制台”,“3.6.6”}, {amqp_客户端,“RabbitMQ amqp客户端”,“3.6.6”}, {rabbitmq_管理_代理,“rabbitmq管理代理”,“3.6.6”}, {rabbitmq_web_dispatch,“rabbitmq web Dispatcher”,“3.6.6”}, {rabbit,“RabbitMQ”,“3.6.6”}, {os_mon,“CPO CXC 138 46”,“2.4.1”}, {webmachine,“webmachine”,“1.10.3”}, {mochiweb,“MochiMedia Web服务器”,“2.13.1”}, {ssl,“Erlang/OTP ssl应用程序”,“8.1”}, {公钥,“公钥基础设施”,“1.3”}, {crypto,“crypto”,“3.7.2”}, {rabbit_common,[],“3.6.6”}, {xmerl,“XML解析器”,“1.3.12”}, {asn1,“Erlang asn1编译器版本4.0.4”,“4.0.4”}, {syntax_tools,“syntax tools”,“2.1.1”}, {mnesia,“mnesia CXC 138 12”,“4.14.2”}, {编译器,“ERTS CXC 138 10”,“7.0.3”}, {ranch,“TCP协议的套接字接受池”,“1.2.1”}, {inets,“inets CXC 138 49”,“6.3.4”}, {sasl,“sasl CXC 138 11”,“3.0.2”}, {stdlib,“ERTS CXC 138 10”,“3.2”}, {kernel,“ERTS CXC 138 10”,“5.1.1”}},{os,{unix,linux},{erlang_版本, “Erlang/OTP 19[erts-8.2][source][64位][smp:4:4][async threads:64][kernel poll:true]\n”},{memory, [{总计112070616}, {connection_readers,471152}, {连接作者,171664}, {连接通道,494680}, {connection_other,407232}, {queue_procs,534792}, {queue_slave_procs,0}, {插件,2121728}, {其他程序,12017232}, {mnesia,93584}, {mgmt_db,5114688}, {msg_index,49304}, {其他,1902144}, {binary,52694768}, {代码24783822}, {原子,1033401}, {other_system,10180425}]},{alarms,[]},{listeners,[{clustering,25672,“::”},{amqp,5672,“::”}, {vm_memory_high_watermark,0.4},{vm_memory_limit,6691391078}, {disk_free_limit,50000000},{disk_free,59039645696}, {文件描述符, [{total_limit,3996}, {使用总数,23}, {sockets_limit,3594}, {sockets_used,20}]},{processs,[{limit,1048576},{used,454}]},{run_queue,0},{uptime,2498},{kernel,{net_ticktime,60}]

以下是我如何经营芹菜:

启动3名芹菜工人:

celery worker -A celeryapp --config celeryconfig --workdir /proj -l DEBUG --soft-time-limit=3500 --time-limit=3600 --autoscale=2,1 -S /proj/states.db -s /proj/celerybeat-schedule.db -f /proj/logs/celery_worker_1_%n%I.log --pidfile /tmp/celery_w1.pid -n worker1@%d
celery worker -A celeryapp --config celeryconfig --workdir /proj -l DEBUG --soft-time-limit=3500 --time-limit=3600 --autoscale=2,1 -S /proj/states.db -s /proj/celerybeat-schedule.db -f /proj/logs/celery_worker_2_%n%I.log --pidfile /tmp/celery_w2.pid -n worker2@%d
celery worker -A celeryapp --config celeryconfig --workdir /proj -l DEBUG --soft-time-limit=3500 --time-limit=3600 --autoscale=2,1 -S /proj/states.db -s /proj/celerybeat-schedule.db -f /proj/logs/celery_worker_3_%n%I.log --pidfile /tmp/celery_w3.pid -n worker3@%d
开始芹菜节拍:

celery beat -A celeryapp --config celeryconfig --workdir /proj -l DEBUG -s /proj/celerybeat-schedule.db -f /proj/logs/celery_%n%I.log --pidfile /tmp/celery.pid
开始芹菜花:

celery flower -A celeryapp --workdir=/proj/ --broker=amqp://guest:guest@localhost:5672// --broker-api=http://guest:guest@localhost:15672/api/ --db=/proj/flower.db --logging=debug --basic-auth=guest:guest

我在RabbitMQ的Github上发布了这个问题,但它是您的Elang版本,有点旧了

使用最新版本进行更新,管理UI需要新的Erlang版本


您使用的是哪个Erlang版本?键入此命令
erl-eval'erlang:display(erlang:system_info(otp_release)),halt()。-noshell
erlang版本为“R16B03”。它现在更新为erlang/otp 19,但问题仍然存在。我安装了新版本“erlang/otp 19[erts-8.2][source 64位]”但问题仍然存在。您能用新的
rabbitmqctl状态更新问题吗?
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install erlang