throttle icon indicating copy to clipboard operation
throttle copied to clipboard

Node exception on using throttle --profile 3gslow

Open RaghuveerAddagada opened this issue 7 years ago • 3 comments

throttle --profile 3gslow (node:21528) UnhandledPromiseRejectionWarning: Error: Command failed: sudo tc qdisc add dev ifb0 root handle 1:0 netem delay 100ms rate 400kbit What is "rate"? Usage: ... netem [ limit PACKETS ] [ delay TIME [ JITTER [CORRELATION]]] [ distribution {uniform|normal|pareto|paretonormal} ] [ drop PERCENT [CORRELATION]] [ corrupt PERCENT [CORRELATION]] [ duplicate PERCENT [CORRELATION]] [ reorder PRECENT [CORRELATION] [ gap DISTANCE ]]

at makeError (/usr/lib/node_modules/@sitespeed.io/throttle/node_modules/execa/index.js:172:9)
at Promise.all.then.arr (/usr/lib/node_modules/@sitespeed.io/throttle/node_modules/execa/index.js:277:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

(node:21528) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:21528) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

RaghuveerAddagada avatar Jun 01 '18 09:06 RaghuveerAddagada

Hi @RaghuveerA thanks for the report! What NodeJS version are you using and what's your OS?

Thanks Peter

soulgalore avatar Jun 01 '18 09:06 soulgalore

node --version v8.11.2

lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.9 (Final) Release: 6.9 Codename: Final

RaghuveerAddagada avatar Jun 01 '18 10:06 RaghuveerAddagada

Ok it seems then that netem is different on CentOS that Ubuntu, I've only tried it there since our Docker containers in sitespeed.io is ubuntu based (see rate). If you have time to track down how we can make it work on CentOS to that would be great!

Best Peter

soulgalore avatar Jun 01 '18 10:06 soulgalore