mcrouter icon indicating copy to clipboard operation
mcrouter copied to clipboard

Problem starting mcrouter, error on invalid ports

Open shahar-fleischman opened this issue 6 years ago • 8 comments

I saw this issue https://github.com/facebook/mcrouter/issues/85 And tried to set the validate option

mcrouter)# ./mcrouter /mcrouter/mcrouter E0127 06:31:40.325755 22492 mcrouter_config.cpp:38] CRITICAL: Couldn't initialize from standalone flavor file /mcrouter/mcrouter E0127 06:31:40.325983 22492 StandaloneUtils.cpp:124] invalid ports 39.0.0-master mcrouter usage: [options] -p port(s) --config file:

Standalone config file:

{ "libmcrouter_options": { "default_route": “/reg1/dc1/“, "config_file": "/mcrouter/mcrouter.config", "server_timeout_ms": "10000", "num_proxies": "24" }, "standalone_options": { "log_path": "/mcrouter/mcrouter.log", "validate-config": "exit", "port": "5000" } }

Please help.

shahar-fleischman avatar Jan 27 '19 11:01 shahar-fleischman

Hey, I think that the command you're running does not match the usage doc, please run "./mcrouter --help" and make sure you're providing the right arguments.

orishu avatar Jan 28 '19 20:01 orishu

Hi

I've looked at the help before, and even tried to run with the minimal 2 options needed: { "libmcrouter_options": { "config_file": "/mcrouter/mcrouter.config" }, "standalone_options": { "ports": "5000" } }

And still got the same error of invalid port(s). I also did a check and ran mcrouter with options from CLI and checked the live config file to verify how the options look when using a flavor file, and got the same results.

shahar-fleischman avatar Jan 29 '19 09:01 shahar-fleischman

Can you please re-post the exact command you are running, the config file name and contents, and the output?

orishu avatar Jan 29 '19 17:01 orishu

Running: ./mcrouter /mcrouter/mcrouter

content of /mcrouter/mcrouter-standalone: { "libmcrouter_options": { "config_file": "/mcrouter/mcrouter.config" }, "standalone_options": { "ports": "5000" } }

do you also need /mcrouter/mcrouter.config ?

shahar-fleischman avatar Jan 30 '19 14:01 shahar-fleischman

can you try running it from the directory where the flavor file resides?

$ cd /mcrouter
$ <path-to-mcrouter-binary> mcrouter

orishu avatar Jan 30 '19 21:01 orishu

I think I've found the problem. if your mcrouter exe is in the same dir as the standalone config and the flavor file is named mcrouter-standalone you will encounter this problem. If you either move the flavor file to another dir, or change it's name to something else other than mcrouter-standalone(example bla-standalone) it will work. After that I the got real errors.

shahar-fleischman avatar Jan 31 '19 08:01 shahar-fleischman

I still wish the error will be related to the problem. It was hard to identify it like that. Is it a bug, or should it be a feature request ?

shahar-fleischman avatar Feb 03 '19 13:02 shahar-fleischman

I agree that the error message can be improved. Feel free to open an issue.

orishu avatar Feb 04 '19 17:02 orishu