could some one shed some light on an error im gett...
# ask-questions
b
could some one shed some light on an error im getting when trying to set up the proxy - I have it setup and connected, but when I try and
re-check
from the growthbook UI, I get back `
Copy code
{
  "status": 200,
  "healthy": true
}
but it still returns an error of
Error: [proxyVersion] Required
I get a 200 success back with this request as well 🤷 . I tried searching the docs and the repos for where this error comes from, but im not as familiar with the codebase to tell. Can anyone enlighten me as to where the
proxyVersion
should be set?
r
@blue-hair-70812 has opened an issue Close Issue button
b
Hi Travis, I’ll sync with our engineers who work on the proxy and get back to you!
b
thanks!
b
Hi Travis, I forgot to ask-- Are you using the cloud-hosted or self-hosted version? Which SDK are you using?
b
self-hosted. sdk is javascript
👍🏻 1
b
Hi Travis, I'm troubleshooting this with one of our engineers. Are you getting the error only when clicking "re-check", or when trying to actually run the proxy If you could send some more details about what this is blocking, and maybe a screenshot or two, that would help us a lot!
b
i am getting the error when "rechecking":
our blocker is my user is reporting that streaming updates aren't working. the UI says that they are enabled - but when they use our instance they report the streaming never starting.
r
Ahh OK! If the proxy's ​`/healthcheck`​ endpoint returns a ​`proxyVersion: undefined`​ this can happen. And it would be undefined perhaps if using a configuration where the ​`package.json`​ is unavailable for parsing; possibly a docker-specific bug. But it should not affect anything; it doesn't mean anything is actually broken other than the healthcheck itself (which is diagnostic only).
Oops, we were posting at the same time. Let me read your message about streaming...
If the streaming is broken, that's a separate issue from the healthcheck topic. To determine if the streaming is broken, we'd need to look at: 1. The SDK integration details, and 2. Request/response/eventstream on the ​`/sub`​ endpoint in the browser. Would you be able to send screenshots of those?
b
quick question before i try and gather that - for the eventstreaming - does this happen through a websocket?
b
Let me confirm, just a moment
b
FYI - we are running inside Kubernetes and i just want to verify that our ingress doesn't need some special configuration outside of the normal HTTP proxying - This error could just be from a misconfig on my end 😥
r
Ahh OK, no worries! Event streaming happens via Server-Sent Events (SSE) and not websockets. Here's the relevant part from the JavaScript SDK docs: https://docs.growthbook.io/lib/js#streaming-updates
My colleague says tt's unlikely there's anything special needed for k8s ingress.
👍 1
b
It's*
r
Hi Travis, is there anything else we can help with on this topic?
r
Hi @brief-honey-45610 let me bring some light on this issue with SSE When we used cloud integration everything was ok with SSE connection (1 screen) When we moved to self-hosting with proxy solution we lost event stream connection (2 screen) JS SDK integration details: apiHost:“https://growthbook-proxy...” backgroundSync:true clientKey:“...” enableDevMode:true subscribeToChanges: true Do you have any thoughts on which direction we should proceed investigation?
looking 1
Hi @brief-honey-45610 Any thoughts regarding this thread?
r
Hi Oleksandr, I apologize for the delay. I'm working with one of our engineers to troubleshoot this today.
👍 1
Hi Oleksander, now that you are self-hosting, did you install the proxy using ​`docker-compose`​ or did you install it in a standalone Docker container? Did you change the API host that your SDK client connects to? (source) Can you tell me which values you're using for the configuration? You can send any sensitive info via DM or you can redact the values and send here in the thread. List of configuration variables
The Streaming Updates have to be run through the proxy if you're using the self-hosted version of GrowthBook. Is your proxy up and running without issue?
r
Hi @brief-honey-45610 “Did you change the API host that your SDK client connects to?” - Yes to proxy Other questions I will address to our devOps
👍🏻 1
👍 1
Hi @brief-honey-45610 We found root cause why SSE doesn’t work as expected but still struggling with finding appropriate solution The problem with nginx ingress controller we use The following flow that we use doesn’t work: Browser -> СLoud Flare -> Google Load Balancer -> Nginx -> growthobook proxy The following flow(without Nginx) works well: Browser -> СLoud Flare -> Google Load Balancer -> growthobook proxy Could you help us with appropriate ngnix configuration or additional streaming Host Headers CC: @loud-addition-84130
l
hey there. We conducted additional tests by adding these headers to GrowthBookFeatures and began to observe preflight requests (wonder if it correlates somehow). Maybe we need to add something else?:
Copy code
apiHostRequestHeaders: {
        'X-Accel-Buffering': 'no',
        'Content-Type': 'text/event-stream'
      },
      streamingHostRequestHeaders: {
        'X-Accel-Buffering': 'no',
        'Content-Type': 'text/event-stream'
      }
The nginx Ingress configuration is pretty simple:
Copy code
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod-cloudflare
    kubernetes.io/ingress.class: nginx
  labels:
    argocd.argoproj.io/instance: growthbook
  name: growthbook-proxy
  namespace: growthbook

spec:
  rules:
  - host: xxxxxxxx
    http:
      paths:
      - backend:
          service:
            name: growthbook-proxy
            port:
              number: 3300
        path: /
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - xxxxxxxx
    secretName: growthbook-proxy-tls
It’s difficult to troubleshoot because neither Nginx, GrowthBook, or the GrowthBook proxy records any errors in logs. 1st screenshot - without headers 2nd - with last one - working one. without nginx
r
@brief-honey-45610 you can close this issue nginx.ingress.kubernetes.io/proxy-buffering: “off” helped us
1