我试图让rabbitmq-delayed-message-exchange插件在centos 7上运行,但是当我尝试发布延迟消息时,我遇到错误'function not function'。当它尝试运行erlang:system_time(milli_seconds)
时,该错误似乎是一个错误问题。我根本不知道erlang,但是从我可以解决的问题来看,它看起来好像没有导入或未安装erlang模块。任何帮助都会很棒! :d
=ERROR REPORT==== 28-Sep-2016::15:51:59 ===
** Generic server rabbit_delayed_message terminating
** Last message in was {delay_message,
{exchange,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
'x-delayed-message',true,false,false,
[{<<"x-delayed-type">>,longstr,<<"direct">>}],
undefined,undefined,
{[],[]}},
{delivery,false,false,<0.4340.2>,
{basic_message,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
[<<"papyrus.hopeline.staging.requeue">>],
{content,60,
{'P_basic',undefined,undefined,
[{<<"x-delay">>,signedint,600000}],
undefined,undefined,undefined,undefined,undefined,
undefined,undefined,undefined,undefined,undefined,
undefined},
<<32,0,0,0,0,13,7,120,45,100,101,108,97,121,73,0,9,
39,192>>,
rabbit_framing_amqp_0_9_1,
[<<"{\"_id\":\"579f380d9f3a78d60cb2063d\",\"__v\":2,\"created\":\"2016-08-01T11:52:45.346Z\",\"client\":{\"_id\":\"579f380d9f3a78d60cb2063b\"},\"assignedTo\":[{\"_id\":\"57ebd50f9e4a04b45444a639\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:34:55.441Z\"},{\"_id\":\"57ebd52b9e4a04b45444a63b\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:35:23.292Z\"}],\"assigned\":false}">>]},
<<85,201,10,44,175,144,74,190,136,41,55,79,176,130,
253,85>>,
false},
undefined,noflow},
600000}
** When Server state == {state,not_set}
** Reason for termination ==
** {'function not exported',
[{erlang,system_time,[milli_seconds],[]},
{rabbit_delayed_message,internal_delay_message,4,
[{file,"src/rabbit_delayed_message.erl"},{line,179}]},
{rabbit_delayed_message,handle_call,3,
[{file,"src/rabbit_delayed_message.erl"},{line,122}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
=ERROR REPORT==== 28-Sep-2016::15:51:59 ===
** Generic server <0.4340.2> terminating
** Last message in was {'$gen_cast',
{method,
{'basic.publish',0,
<<"papyrus.hopeline.staging.requeue">>,
<<"papyrus.hopeline.staging.requeue">>,
false,false},
{content,60,none,
<<32,0,0,0,0,13,7,120,45,100,101,108,97,121,
73,0,9,39,192>>,
rabbit_framing_amqp_0_9_1,
[<<"{\"_id\":\"579f380d9f3a78d60cb2063d\",\"__v\":2,\"created\":\"2016-08-01T11:52:45.346Z\",\"client\":{\"_id\":\"579f380d9f3a78d60cb2063b\"},\"assignedTo\":[{\"_id\":\"57ebd50f9e4a04b45444a639\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:34:55.441Z\"},{\"_id\":\"57ebd52b9e4a04b45444a63b\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:35:23.292Z\"}],\"assigned\":false}">>]},
flow}}
** When Server state == {ch,running,rabbit_framing_amqp_0_9_1,2,<0.4153.2>,
<0.4338.2>,<0.4153.2>,
<<"172.30.0.13:41896 -> 172.30.0.11:5672">>,
{lstate,<0.4339.2>,false},
none,1,
{[],[]},
{user,<<"developers">>,
[administrator],
[{rabbit_auth_backend_internal,none}]},
<<"/">>,<<>>,
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
{state,
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]}}},
erlang},
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
{set,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
<0.4154.2>,
{state,fine,5000,#Ref<0.0.0.136584>},
false,1,
{{0,nil},{0,nil}},
[],
{{0,nil},{0,nil}},
[{<<"publisher_confirms">>,bool,true},
{<<"exchange_exchange_bindings">>,bool,true},
{<<"basic.nack">>,bool,true},
{<<"consumer_cancel_notify">>,bool,true},
{<<"connection.blocked">>,bool,true},
{<<"authentication_failure_close">>,bool,true}],
none,0,none,flow,[]}
** Reason for termination ==
** {{{undef,
[{erlang,system_time,[milli_seconds],[]},
{rabbit_delayed_message,internal_delay_message,4,
[{file,"src/rabbit_delayed_message.erl"},{line,179}]},
{rabbit_delayed_message,handle_call,3,
[{file,"src/rabbit_delayed_message.erl"},{line,122}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},
{gen_server,call,
[rabbit_delayed_message,
{delay_message,
{exchange,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
'x-delayed-message',true,false,false,
[{<<"x-delayed-type">>,longstr,<<"direct">>}],
undefined,undefined,
{[],[]}},
{delivery,false,false,<0.4340.2>,
{basic_message,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
[<<"papyrus.hopeline.staging.requeue">>],
{content,60,
{'P_basic',undefined,undefined,
[{<<"x-delay">>,signedint,600000}],
undefined,undefined,undefined,undefined,
undefined,undefined,undefined,undefined,
undefined,undefined,undefined},
<<32,0,0,0,0,13,7,120,45,100,101,108,97,121,73,0,9,
39,192>>,
rabbit_framing_amqp_0_9_1,
[<<"{\"_id\":\"579f380d9f3a78d60cb2063d\",\"__v\":2,\"created\":\"2016-08-01T11:52:45.346Z\",\"client\":{\"_id\":\"579f380d9f3a78d60cb2063b\"},\"assignedTo\":[{\"_id\":\"57ebd50f9e4a04b45444a639\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:34:55.441Z\"},{\"_id\":\"57ebd52b9e4a04b45444a63b\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:35:23.292Z\"}],\"assigned\":false}">>]},
<<85,201,10,44,175,144,74,190,136,41,55,79,176,130,253,85>>,
false},
undefined,noflow},
600000},
infinity]}},
[{gen_server,call,3,[{file,"gen_server.erl"},{line,188}]},
{rabbit_exchange_type_delayed_message,route,2,
[{file,"src/rabbit_exchange_type_delayed_message.erl"},{line,53}]},
{rabbit_exchange,route1,3,[{file,"src/rabbit_exchange.erl"},{line,381}]},
{rabbit_exchange,route,2,[{file,"src/rabbit_exchange.erl"},{line,371}]},
{rabbit_channel,handle_method,3,
[{file,"src/rabbit_channel.erl"},{line,943}]},
{rabbit_channel,handle_cast,2,
[{file,"src/rabbit_channel.erl"},{line,457}]},
{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1032}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
=ERROR REPORT==== 28-Sep-2016::15:51:59 ===
Error on AMQP connection <0.4153.2> (172.30.0.13:41896 -> 172.30.0.11:5672, vhost: '/', user: 'developers', state: running), channel 2:
{{{undef,
[{erlang,system_time,[milli_seconds],[]},
{rabbit_delayed_message,internal_delay_message,4,
[{file,"src/rabbit_delayed_message.erl"},{line,179}]},
{rabbit_delayed_message,handle_call,3,
[{file,"src/rabbit_delayed_message.erl"},{line,122}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},
{gen_server,call,
[rabbit_delayed_message,
{delay_message,
{exchange,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
'x-delayed-message',true,false,false,
[{<<"x-delayed-type">>,longstr,<<"direct">>}],
undefined,undefined,
{[],[]}},
{delivery,false,false,<0.4340.2>,
{basic_message,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
[<<"papyrus.hopeline.staging.requeue">>],
{content,60,
{'P_basic',undefined,undefined,
[{<<"x-delay">>,signedint,600000}],
undefined,undefined,undefined,undefined,undefined,
undefined,undefined,undefined,undefined,undefined,
undefined},
<<32,0,0,0,0,13,7,120,45,100,101,108,97,121,73,0,9,39,
192>>,
rabbit_framing_amqp_0_9_1,
[<<"{\"_id\":\"579f380d9f3a78d60cb2063d\",\"__v\":2,\"created\":\"2016-08-01T11:52:45.346Z\",\"client\":{\"_id\":\"579f380d9f3a78d60cb2063b\"},\"assignedTo\":[{\"_id\":\"57ebd50f9e4a04b45444a639\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:34:55.441Z\"},{\"_id\":\"57ebd52b9e4a04b45444a63b\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:35:23.292Z\"}],\"assigned\":false}">>]},
<<85,201,10,44,175,144,74,190,136,41,55,79,176,130,253,85>>,
false},
undefined,noflow},
600000},
infinity]}},
[{gen_server,call,3,[{file,"gen_server.erl"},{line,188}]},
{rabbit_exchange_type_delayed_message,route,2,
[{file,"src/rabbit_exchange_type_delayed_message.erl"},{line,53}]},
{rabbit_exchange,route1,3,[{file,"src/rabbit_exchange.erl"},{line,381}]},
{rabbit_exchange,route,2,[{file,"src/rabbit_exchange.erl"},{line,371}]},
{rabbit_channel,handle_method,3,
[{file,"src/rabbit_channel.erl"},{line,943}]},
{rabbit_channel,handle_cast,2,[{file,"src/rabbit_channel.erl"},{line,457}]},
{gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1032}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
=WARNING REPORT==== 28-Sep-2016::15:51:59 ===
Non-AMQP exit reason '{{{undef,
[{erlang,system_time,[milli_seconds],[]},
{rabbit_delayed_message,internal_delay_message,4,
[{file,"src/rabbit_delayed_message.erl"},
{line,179}]},
{rabbit_delayed_message,handle_call,3,
[{file,"src/rabbit_delayed_message.erl"},
{line,122}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,585}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]},
{gen_server,call,
[rabbit_delayed_message,
{delay_message,
{exchange,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
'x-delayed-message',true,false,false,
[{<<"x-delayed-type">>,longstr,<<"direct">>}],
undefined,undefined,
{[],[]}},
{delivery,false,false,<0.4340.2>,
{basic_message,
{resource,<<"/">>,exchange,
<<"papyrus.hopeline.staging.requeue">>},
[<<"papyrus.hopeline.staging.requeue">>],
{content,60,
{'P_basic',undefined,undefined,
[{<<"x-delay">>,signedint,600000}],
undefined,undefined,undefined,undefined,
undefined,undefined,undefined,undefined,
undefined,undefined,undefined},
<<32,0,0,0,0,13,7,120,45,100,101,108,97,121,73,0,
9,39,192>>,
rabbit_framing_amqp_0_9_1,
[<<"{\"_id\":\"579f380d9f3a78d60cb2063d\",\"__v\":2,\"created\":\"2016-08-01T11:52:45.346Z\",\"client\":{\"_id\":\"579f380d9f3a78d60cb2063b\"},\"assignedTo\":[{\"_id\":\"57ebd50f9e4a04b45444a639\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:34:55.441Z\"},{\"_id\":\"57ebd52b9e4a04b45444a63b\",\"user\":{\"_id\":\"571e37f0cbd7a8ae2b73e925\",\"name\":\"Jason Royle\"},\"created\":\"2016-09-28T14:35:23.292Z\"}],\"assigned\":false}">>]},
<<85,201,10,44,175,144,74,190,136,41,55,79,176,
130,253,85>>,
false},
undefined,noflow},
600000},
infinity]}},
[{gen_server,call,3,
[{file,"gen_server.erl"},{line,188}]},
{rabbit_exchange_type_delayed_message,route,2,
[{file,
"src/rabbit_exchange_type_delayed_message.erl"},
{line,53}]},
{rabbit_exchange,route1,3,
[{file,"src/rabbit_exchange.erl"},{line,381}]},
{rabbit_exchange,route,2,
[{file,"src/rabbit_exchange.erl"},{line,371}]},
{rabbit_channel,handle_method,3,
[{file,"src/rabbit_channel.erl"},{line,943}]},
{rabbit_channel,handle_cast,2,
[{file,"src/rabbit_channel.erl"},{line,457}]},
{gen_server2,handle_msg,2,
[{file,"src/gen_server2.erl"},{line,1032}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}'
答案 0 :(得分:2)
解决方法是升级erlang版本,因为erlang模块的system_time函数仅在版本18中存在。要在centos上安装最新版本,我使用this rpm package升级到版本19.1。 / p>