cuddly-finland-73937
10/11/2023, 4:18 PMSECRET_API_KEY
and to setup in Settings -> API Keys. Does that need to be an Admin
key or can it be just a Read-Only
key?happy-autumn-40938
10/11/2023, 4:28 PMcuddly-finland-73937
10/11/2023, 4:31 PMhappy-autumn-40938
10/11/2023, 4:55 PMpackages/apps/proxy/src/init.ts
to see what the defaults are.cuddly-finland-73937
10/11/2023, 6:14 PM| {"level":50,"time":1697047211013,"pid":67,"hostname":"ip-10-163-18-220.eu-west-1.compute.internal","err":{"type":"TypeError","message":"fetch failed: Connect Timeout Error","stack":"TypeError: fetch failed\n at Object.fetch (node:internal/deps/undici/undici:11576:11)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\ncaused by: ConnectTimeoutError: Connect Timeout Error\n at onConnectTimeout (node:internal/deps/undici/undici:8522:28)\n at node:internal/deps/undici/undici:8480:50\n at Immediate._onImmediate (node:internal/deps/undici/undici:8511:13)\n at process.processImmediate (node:internal/timers:476:21)"},"msg":"polling error"}
I verified the proxy can reach the API server via telnet.happy-autumn-40938
10/11/2023, 6:36 PMSECRET_API_KEY
appropriately?cuddly-finland-73937
10/11/2023, 6:38 PMconst proxyContainerName = createResourceName('dna-growthbook-proxy', RESOURCE_TYPE.EC2_INSTANCE, this.app.project)
growthbookProxyTask.addContainer('DnaGrowthBookProxyContainer', {
image: ecs.ContainerImage.fromRegistry('growthbook/proxy:latest'),
containerName: proxyContainerName,
essential: true,
logging: ecs.LogDrivers.awsLogs({
streamPrefix: 'blah-growthbook-proxy',
logGroup,
}),
environment: proxyEnnvironment,
secrets: proxySecrets,
portMappings: [{
containerPort: 3300,
}],
})
happy-autumn-40938
10/11/2023, 6:40 PMcuddly-finland-73937
10/11/2023, 6:43 PM2023-10-11T10:16:34.242-05:00 yarn run v1.22.19 Link
2023-10-11T10:16:34.338-05:00 $ wsrun -p @growthbook/proxy -c start Link
2023-10-11T10:16:35.519-05:00 @growthbook/proxy Link
2023-10-11T10:16:35.519-05:00 | $ node dist/index.js Link
2023-10-11T10:16:36.627-05:00 | (node:70) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. Link
2023-10-11T10:16:36.627-05:00 | (Use `node --trace-deprecation ...` to show where the warning was created) Link
2023-10-11T10:16:36.629-05:00 | GrowthBook proxy running over HTTP1.1, port 3300 Link
2023-10-11T10:16:36.644-05:00 | /usr/local/src/app/packages/apps/proxy/dist/services/registrar/index.js:152 Link
2023-10-11T10:16:36.702-05:00 | throw new Error("missing required context for polling for connections"); Link
2023-10-11T10:16:36.702-05:00 | ^ Link
2023-10-11T10:16:36.702-05:00 | Link
2023-10-11T10:16:36.703-05:00 | Error: missing required context for polling for connections Link
2023-10-11T10:16:36.703-05:00 | at /usr/local/src/app/packages/apps/proxy/dist/services/registrar/index.js:152:19 Link
2023-10-11T10:16:36.703-05:00 | at Generator.next (<anonymous>) Link
2023-10-11T10:16:36.703-05:00 | at /usr/local/src/app/packages/apps/proxy/dist/services/registrar/index.js:8:71 Link
2023-10-11T10:16:36.703-05:00 | at new Promise (<anonymous>) Link
2023-10-11T10:16:36.704-05:00 | at __awaiter (/usr/local/src/app/packages/apps/proxy/dist/services/registrar/index.js:4:12) Link
2023-10-11T10:16:36.705-05:00 | at initializeRegistrar (/usr/local/src/app/packages/apps/proxy/dist/services/registrar/index.js:130:42) Link
2023-10-11T10:16:36.705-05:00 | at /usr/local/src/app/packages/apps/proxy/dist/app.js:99:47 Link
2023-10-11T10:16:36.705-05:00 | at Generator.next (<anonymous>) Link
2023-10-11T10:16:36.706-05:00 | at /usr/local/src/app/packages/apps/proxy/dist/app.js:31:71 Link
2023-10-11T10:16:36.707-05:00 | at new Promise (<anonymous>) Link
2023-10-11T10:16:36.707-05:00 | Link
2023-10-11T10:16:36.707-05:00 | Node.js v18.18.0 Link
2023-10-11T10:16:36.748-05:00 | error Command failed with exit code 1. Link
2023-10-11T10:16:36.748-05:00 | info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command. Link
2023-10-11T10:16:36.779-05:00 | `yarn start` failed with exit code 1 Link
2023-10-11T10:16:36.818-05:00 error Command failed with exit code 1. Link
happy-autumn-40938
10/11/2023, 6:45 PMGROWTHBOOK_API_HOST
and SECRET_API_KEY
env varscuddly-finland-73937
10/11/2023, 6:46 PMhappy-autumn-40938
10/11/2023, 6:52 PMcuddly-finland-73937
10/11/2023, 6:56 PMenv
in the shell the env variables are for sure set...> env
AWS_EXECUTION_ENV=AWS_ECS_FARGATE
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=/v2/credentials/...
HOSTNAME=ip-10-163-9-nnn.compute.internal
YARN_VERSION=1.22.19
PWD=/usr/local/src/app
ECS_CONTAINER_METADATA_URI_V4=<http://169.254.170.2/v4/xxx>
HOME=/root
LANG=C.UTF-8
GROWTHBOOK_API_HOST=<http://api.growthbook.local:3100>
CACHE_ENGINE=memory
ECS_AGENT_URI=<http://169.254.170.2/api/xxx>
TERM=xterm-256color
ENVIRONMENT=playground
ECS_CONTAINER_METADATA_URI=<http://169.254.170.2/v3/xxx>
SHLVL=1
SECRET_API_KEY=secret_readonly_xxx
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
NODE_VERSION=18.18.0
_=/usr/bin/env
Just replaced some potentially sensitive info with xxx
or ...
happy-autumn-40938
10/11/2023, 8:17 PMECSServiceAverageCPUUtilization
at 80cuddly-finland-73937
10/11/2023, 8:19 PMscalableTaskCount.scaleOnCpuUtilization('CpuUtilizationScaling', {
targetUtilizationPercent: 80,
})
scalableTaskCount.scaleOnMemoryUtilization('MemoryScaling', {
target_utilization_percent=80,
})