Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orca hangs when generating graphs behind a proxy server #7

Open
Pell17 opened this issue Jul 28, 2021 · 0 comments
Open

orca hangs when generating graphs behind a proxy server #7

Pell17 opened this issue Jul 28, 2021 · 0 comments

Comments

@Pell17
Copy link

Pell17 commented Jul 28, 2021

I'm using the docker image and need to use a proxy server to access the Internet. When executing the image with the --plot parameter, it hangs at the place where I hit ^C below.

2021-07-28 18:52:08 [INFO] Plotting data ...
2021-07-28 18:52:08 [INFO] Starting plotly-orca pod knb-plotly-orca-23
2021-07-28 18:52:16 [DEBUG] Rendering graph from //plotly-templates/bandwidth.jq
2021-07-28 18:52:16 [DEBUG] pod knb-client-idle-23 client metrics avg : 4.22 0.00 4.11 0.04 0.00 6142 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-idle-23 server metrics avg : 1.84 0.00 1.41 0.00 0.00 6260 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-tcp-p2p-23 client metrics avg : 4.03 0.00 6.15 0.01 0.00 6146 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-tcp-p2p-23 server metrics avg : 1.67 0.00 11.24 0.00 0.00 6257 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-udp-p2p-23 client metrics avg : 11.29 0.00 12.68 0.02 0.00 6146 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-udp-p2p-23 server metrics avg : 2.12 0.00 9.88 0.00 0.00 6257 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-tcp-p2s-23 client metrics avg : 3.62 0.00 6.01 0.05 0.00 6143 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-tcp-p2s-23 server metrics avg : 1.56 0.00 10.79 0.00 0.00 6257 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-udp-p2s-23 client metrics avg : 4.55 0.00 12.51 0.04 0.00 6151 11
2021-07-28 18:52:16 [DEBUG] pod knb-client-udp-p2s-23 server metrics avg : 2.43 0.00 10.45 0.00 0.00 6259 11
^C2021-07-28 19:05:16 [ERROR] Trapped CTRL-C, trying to exit gracefully ...

The reason is that it's creating a pod with a plotly-orca container from quay.io/plotly/orca. This image is trying to download plotly from the Internet, but fails as it doesn't use the proxy server.
I created a workaround locally by adding the corresponding environment variables to the pod spec in knb:

        cat <<-EOF | kubectl apply $NAMESPACEOPT -f - >/dev/null|| fatal "Cannot create pod $POD_NAME"
        apiVersion: v1
        kind: Pod
        metadata:
          labels:
            app: $POD_NAME
          name: $POD_NAME
        spec:
          containers:
          - name: plotly-orca
            image: quay.io/plotly/orca
            env:
              - name: HTTP_PROXY
                value: "http://my-proxy:8080"
              - name: HTTPS_PROXY
                value: "http://my-proxy:8080"
          restartPolicy: Never
        EOF

I haven't checked if orca uses http or https so I added both. Naturally there should be a better solution, e.g. a proxy option or allowing the http(s)_proxy variables to be passed in with "-e" to docker run and inserting them into the pod spec if given.
Thanks for a great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant