https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
m

miniature-fish-36638

01/09/2024, 6:32 PM
Hello All, I have a support question. Who/Where would be best to ask?
h

happy-autumn-40938

01/09/2024, 7:24 PM
Hi Colin
m

miniature-fish-36638

01/09/2024, 7:25 PM
Hi
h

happy-autumn-40938

01/09/2024, 7:25 PM
I want to make sure I'm caught up on the issues you're facing (coming from our in-app chat support)...
you're using Growthbook Cloud but self-hosting a proxy instance, right?
m

miniature-fish-36638

01/09/2024, 7:26 PM
Yes
The issue is this is where I am stuck with the proxy
h

happy-autumn-40938

01/09/2024, 7:26 PM
localhost looks suspect
m

miniature-fish-36638

01/09/2024, 7:27 PM
I am able to access it via this url
h

happy-autumn-40938

01/09/2024, 7:27 PM
basically the GB app cannot communicate with localhost
m

miniature-fish-36638

01/09/2024, 7:27 PM
And here are the environment variables I have set
Copy code
Environment:
      GROWTHBOOK_API_HOST:                                 <https://cdn.growthbook.io>
      SERVICE_NAME:                                        growthbook-proxy
      PROXY_ENABLED:                                       1
      PROXY_HOST_PUBLIC:                                  
      SECRET_API_KEY:                                      <set to the key 'SECRET_API_KEY' in secret 'growthbook-proxy-secrets'>  Optional: false
      NEW_RELIC_METADATA_KUBERNETES_CLUSTER_NAME:          breeze-eks-staging
      NEW_RELIC_METADATA_KUBERNETES_NODE_NAME:              (v1:spec.nodeName)
      NEW_RELIC_METADATA_KUBERNETES_NAMESPACE_NAME:        growthbook (v1:metadata.namespace)
      NEW_RELIC_METADATA_KUBERNETES_POD_NAME:              growthbook-proxy-chart-78d7c5c897-7w5dd (v1:metadata.name)
      NEW_RELIC_METADATA_KUBERNETES_CONTAINER_NAME:        growthbook
      NEW_RELIC_METADATA_KUBERNETES_CONTAINER_IMAGE_NAME:  growthbook/proxy:latest
      NEW_RELIC_METADATA_KUBERNETES_DEPLOYMENT_NAME:       growthbook-proxy-chart
h

happy-autumn-40938

01/09/2024, 7:28 PM
can you please click Edit in your SDK Connection and show what's present for the GB Proxy field. Feel free to obfuscate the string if anythign sensitive is there
m

miniature-fish-36638

01/09/2024, 7:30 PM
I can’t seem to find editing the SDK connection, do you know where that would be?
h

happy-autumn-40938

01/09/2024, 7:30 PM
it shoudl be on the top-right of the screen you sent me, the same one which shows "localhost" in the proxy box
b

brief-honey-45610

01/09/2024, 7:31 PM
(Side note — Colin, I thought you were completely self-hosting?)
h

happy-autumn-40938

01/09/2024, 7:31 PM
you may not have permissions to edit
m

miniature-fish-36638

01/09/2024, 7:32 PM
I might not have the permissions
I am asking one of my team members to see if I can get higher permissions
h

happy-autumn-40938

01/09/2024, 7:33 PM
sounds good. basically that field should be the public facing proxy URL, otherwise GB Cloud will not be able to establish a handshake with a localhost connection
m

miniature-fish-36638

01/09/2024, 7:34 PM
Got it, thanks.
I will give an update once I can change that
👍 1
thankyou 1
I updated it and it worked now.
h

happy-autumn-40938

01/09/2024, 8:29 PM
hey, awesome
glad that's working for you now
b

brief-honey-45610

01/09/2024, 8:30 PM
Great
m

miniature-fish-36638

01/10/2024, 10:12 PM
I have some follow up issues that have come up after the sdk got connected.
It all shows as connected but we are getting this 400 error
{"message":"No channel found"}
h

happy-autumn-40938

01/10/2024, 10:23 PM
broadly speaking, this warning is about Streaming Updates not being configured correctly. Are you wanting to use streaming updates for the end user?
it might be helpful to turn on
VERBOSE_DEBUGGING=1
in your proxy's env vars to dig in a bit further, then searching your logs for "No channel found".
m

miniature-fish-36638

01/12/2024, 7:04 PM
I will enable that and get back to you.
I enabled that and this is the logs I am getting now
Copy code
yarn run v1.22.19
$ wsrun -p @growthbook/proxy -c start
@growthbook/proxy
 | $ node dist/index.js
 | GrowthBook proxy running over HTTP1.1, port 3300
 | (node:48) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
 | (Use `node --trace-deprecation ...` to show where the warning was created)
 | {"level":50,"time":1705344997986,"pid":48,"hostname":"growthbook-proxy-chart-9b5447dc6-lhf7t","msg":"connection polling error: status code is 400"}
 | {"level":50,"time":1705344997987,"pid":48,"hostname":"growthbook-proxy-chart-9b5447dc6-lhf7t"}
 | {"level":30,"time":1705344997987,"pid":48,"hostname":"growthbook-proxy-chart-9b5447dc6-lhf7t","msg":"using in-memory cache"}
r

rhythmic-agent-34208

01/16/2024, 9:08 PM
Which version of the proxy are you running?
Is there any networking or gateway issue that could be causing it?
h

happy-autumn-40938

01/16/2024, 9:10 PM
It still looks like that initial handshake is unsuccessful. The proxy will still minimally run, but you won't be able to do streaming updates until this is resolved. If you'd like to dig in further, this is the specific call being made by the proxy is basically:
Copy code
const url = `${growthbookApiHost}/api/v1/sdk-connections?withProxy=1&limit=100&offset=0`;
      const headers = {
        Authorization: `Bearer ${secretApiKey}`,
        "User-Agent": `GrowthBook Proxy`,
      };
You could try recreating this call in postman or similar using your specific environment variables to see whether you're getting back a 200 or 400 error. It kind of boils down to a few possible issues though: • api host or api key is not set correctly • api host or api key is not being parsed from your environment correctly • a networking or container-level issue is preventing the call from being made properly • custom SSL is being applied at the network level (would require setting
NODE_TLS_REJECT_UNAUTHORIZED=0
in env vars)
m

miniature-fish-36638

01/24/2024, 6:56 PM
Thanks for the response. Would anything else need to be done besides setting that env var since we are using custom SSL?
h

happy-autumn-40938

01/29/2024, 6:15 PM
I don't believe so, but hard to say. We also support SSL termination on the proxy, but it doesn't always play nicely with custom SSL
m

miniature-fish-36638

01/30/2024, 7:40 PM
Do you know what other issues could cause that error, I set that and still got the same error
h

happy-autumn-40938

01/30/2024, 8:13 PM
It's pretty hard to say what the issue could be as there are a mixture of network and infrastructure configurations on top. A few independent ways to slowly test your way towards a solution could be: • simplify the infra-level configuration for GB + Proxy. No internal SSL, no auth headers, etc. Start adding back layers and see where it breaks. • or, try replicating the failing call (see snippet above) from your own custom nodeJS/Express pod and see if it fails without the proxy. if it passes, try implementing the GB proxy NPM package into your new Express service to see if adding it back breaks things
4 Views