facebook/mcrouter

start mcrouter with flavor, start up with error " invalid ports",please help

Closed this issue · 2 comments

[root@lin-188-171 mcrouter]# cat myflavor-standalone
{
"libmcrouter_options": {
"config_file": "/root/mcrouter/mcrouter.conf",
"async_dir": "/root/mcrouter/spool"
},
"standalone_options": {
"log_file": "/root/mcrouter/mcrouter.log",
"ports": "11200"
}
}
[root@lin-188-171 mcrouter]#
[root@lin-188-171 mcrouter]# mcrouter myflavor-standalone
E0828 11:12:40.998445 26729 mcrouter_config.cpp:30] CRITICAL: Couldn't initialize from standalone flavor file myflavor-standalone
I0828 11:12:40.998965 26729 main.cpp:389] mcrouter myflavor-standalone
E0828 11:12:40.998986 26729 main.cpp:318] invalid ports
mcrouter 6.0.0
usage: mcrouter [options] -p port(s) -f config

libmcrouter options:

startup with options in command is OK:
[root@lin-188-171 mcrouter]# nohup mcrouter -p 11200 -f /root/mcrouter/mcrouter.conf -a /root/mcrouter/spool >/root/mcrouter/mcrouter.log 2>&1 &
[1] 26730
[root@lin-188-171 mcrouter]# ps -ef | grep mcrouter.
root 26730 26631 0 11:15 pts/0 00:00:00 mcrouter -p 11200 -f /root/mcrouter/mcrouter.conf -a /root/mcrouter/spool
root 26740 26631 0 11:15 pts/0 00:00:00 grep mcrouter.
[root@lin-188-171 mcrouter]# more mcrouter.log
nohup: 忽略输入
I0828 11:15:44.177534 26730 main.cpp:389] mcrouter -p 11200 -f /root/mcrouter/mcrouter.conf -a /root/mcrouter/spool
I0828 11:15:44.177777 26730 main.cpp:490] mcrouter 6.0.0 startup (26730)
I0828 11:15:44.177839 26730 server.cpp:157] Spawning AsyncMcServer
I0828 11:15:44.193786 26730 McrouterInstance.cpp:558] reconfigured 1 proxies with 8 clients (660b2fc28d964bf5aa3f7486b7a9eea4)

due to the invalid config item:"async_dir"
change to "async_spool", now it's OK

error log mislead me, use validate-config could location the point.