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

Request for explicit proxy support #122

Open
joaoluis-pdm opened this issue Sep 20, 2022 · 1 comment
Open

Request for explicit proxy support #122

joaoluis-pdm opened this issue Sep 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@joaoluis-pdm
Copy link
Contributor

joaoluis-pdm commented Sep 20, 2022

Jean-Baptiste MARCILLE-ext requested explicit proxy support, to resolve issue with:

...
10.131.4.1:8080 - [2022-09-16T19:08:24.308Z] GET:/ 200 1.221ms
[POST] https://fgt.pharmaledger.pdmfc.com/bricking/traceability/put-brick Error: connect ETIMEDOUT 213.63.130.240:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '[213.63.130.240](http://213.63.130.240/)',
  port: 443
}
...

19 de setembro de 2022 07:08

· curl -k –noproxy ‘*’ -XGET https://fgt.pharmaledger.pdmfc.com/ fails because of a timeout

· curl -k -XGET https://fgt.pharmaledger.pdmfc.com/ indeed returns the homepage (http(s)_proxy environment variables are set in the pod and curl uses them)

19 de setembro de 2022 14:39

What I can do is forward your question to the OpenDSU team, so I am sending this email to Sinica.

What is the proper way to configure and run an apihub so that all OpenDSU operations use an explicit http(s) proxy for some domains ?
(Seems that nodejs does not honor the http(s)_proxy environment variables transparently).

@joaoluis-pdm joaoluis-pdm added the enhancement New feature or request label Sep 20, 2022
@joaoluis-pdm
Copy link
Contributor Author

The OpenDSU team suggested the following workaround:

    create a new proxy service http://my-proxy/*  statically configured to proxy all requests to [https://fgt.pharmaledger.pdmfc.com/](https://fgt.pharmaledger.pdmfc.com/any-path)* (adjust local name, port number, etc, as needed.)
    (This could be done creating a new pod to run nginx or apache or other proxy software of your preference, in the same network as your MAH pod).
    inside the MAH runing container files, the file /fgt-workspace/apihub-root/external-volume/config/bdns.hosts should currently have

"traceability": {
    "replicas": [],
    "brickStorages": [
      "https://fgt.pharmaledger.pdmfc.com"
    ],
    "mqEndpoints": [
       "https://fgt.pharmaledger.pdmfc.com/"
    ],
    "anchoringServices": [
      "https://fgt.pharmaledger.pdmfc.com/"
    ],
    "notifications": [
      "https://fgt.pharmaledger.pdmfc.com/"
    ]
  },

Replace those entries with

"traceability": {
    "replicas": [],
    "brickStorages": [
      "http://my-proxy"
    ],
    "mqEndpoints": [
       "http://my-proxy/"
    ],
    "anchoringServices": [
      "http://my-proxy/"
    ],
    "notifications": [
      "http://my-proxy/"
    ]
  },

(I guess that this can be done on your private helm-charts configuration files).

Best regards,

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

No branches or pull requests

1 participant