question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using CML behind a proxy

See original GitHub issue

Hi

Everything running on my GitLab runner must go through a proxy to get anything from the outside world. So, I set the corresponding variables as usual:

stages: 
    - cml_run
    
cml:
    stage: cml_run
    image: dvcorg/cml-py3:latest
    
    script:
        - export http_proxy=proxy:8080
        - export https_proxy=proxy:8080
        - export no_proxy=localhost,127.0.0.1

        - pip3 install -r requirements.txt
        - python train.py > report.md
        
        - cml-publish roc_curve.png --md >> report.md
        - cml-send-comment report.md

However, this results in an error at cml-publish:

$ cml-publish roc_curve.png --md >> report.md
internal/url.js:257
  throw new ERR_INVALID_URL(input);
  ^
TypeError [ERR_INVALID_URL]: Invalid URL: proxy:8080
    at onParseError (internal/url.js:257:9)
    at new URL (internal/url.js:333:5)
    at Object.getProxyUrl (/cml/node_modules/@actions/http-client/proxy.js:17:20)
    at HttpClient._getAgent (/cml/node_modules/@actions/http-client/index.js:404:27)
    at HttpClient.getAgent (/cml/node_modules/@actions/http-client/index.js:358:21)
    at Object.getProxyAgent (/cml/node_modules/@actions/github/lib/internal/utils.js:36:15)
    at Object.<anonymous> (/cml/node_modules/@actions/github/lib/utils.js:34:22)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32) {
  input: 'proxy:8080',
  code: 'ERR_INVALID_URL'

I tried to prefix the variables with http/https since it is complaining about an invalid URL but this just gave me another error:

$ cml-publish roc_curve.png --md >> report.md
FetchError: request to https://asset.cml.dev/ failed, reason: connect ECONNREFUSED 123.45.67.890:443
    at ClientRequest.<anonymous> (/cml/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (events.js:326:22)
    at TLSSocket.socketErrorListener (_http_client.js:428:9)
    at TLSSocket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'

The IP is anonymized above. Any idea how to make CML play nicely with the proxy?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DavidGOrtegacommented, Apr 21, 2021

@pirnerjonas @rene-rex priority 0 now 😉

1reaction
DavidGOrtegacommented, Apr 21, 2021

@pirnerjonas @rene-rex @0x2b3bfa0

while we had a solution for GL the problem is fundamentally GH. Basically they have the same blocker:

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I seutp a proxy? this is deployed on an ESXi 6.5 host ...
Login to your CML deployment and then click on Tools on the top right corner of Lab Manger page. · On the pop-up...
Read more >
Configuring proxy hosts for CML workspace connections
If your CDP Private Cloud deployment uses network proxy, you can configure proxy hosts that the workloads can use for connections with Cloudera...
Read more >
Guide to using proxies - Apache Maven
You can configure a proxy to use for some or all of your HTTP requests with Maven. The username and password are only...
Read more >
How do I use Maven through a proxy? - Stack Overflow
Essentially you need to ensure the proxies section in either the global settings ( [maven install]/conf/settings.xml ), or user settings ...
Read more >
Configuring proxy settings - IBM
If you use a proxy server for internet connections, you can configure IBM Business ... Configuring proxy settings requires updating the 100Custom.xml files....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found