eu-digital-green-certificates / dgca-issuance-web

Repository for the dgca issuance web app.
Apache License 2.0
107 stars 135 forks source link

Proxy error: Could not proxy request /dgca-businessrule-service/valuesets #113

Open Raykuilu opened 2 years ago

Raykuilu commented 2 years ago

Hello everyone. I am struggling to start server with this proxy error:

Proxy error: Could not proxy request /dgca-businessrule-service/valuesets from 127.0.0.1:3000 to http://localhost:8080. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Running on the Windows 10 Ubuntu emulation.

Any suggestion ?

krzyczak commented 2 years ago

This one is easy. It's preconfigured for docker I think. Just change the value in the package.json at line 61 from:

"proxy": "http://localhost:8080",

to

"proxy": "http://localhost:3000",

or whatever your port is.

krzyczak commented 2 years ago

I've got another problem though. When all is configured properly and I try loading the main page it fails with the following error (same endpoint): (Failed) GET http://localhost:3002/dgca-businessrule-service/valuesets 431 (Request Header Fields Too Large)

From console:

curl -i 'http://localhost:3000/dgca-businessrule-service/valuesets'

HTTP/1.1 431 Request Header Fields Too Large
x-powered-by: Express
connection: close
date: Thu, 28 Oct 2021 11:54:36 GMT
transfer-encoding: chunked

Anyone any ideas?

krzyczak commented 2 years ago

I am laso getting the same error when trying to issue a certificate (after switching to one of the previous commits):

(Failed) POST http://localhost:3002/dgca-issuance-service/dgci/issue 431 (Request Header Fields Too Large)
Raykuilu commented 2 years ago

This one is easy. It's preconfigured for docker I think. Just change the value in the package.json at line 61 from:

"proxy": "http://localhost:8080",

to

"proxy": "http://localhost:3000",

or whatever your port is.

I already tried this but still the same proxy error.

marchino321 commented 2 years ago

This one is easy. It's preconfigured for docker I think. Just change the value in the package.json at line 61 from:

"proxy": "http://localhost:8080",

to

"proxy": "http://localhost:3000",

or whatever your port is.

I already tried this but still the same proxy error.

me too

tommasogiannoni commented 2 years ago

Same error after change of localhost... Status Code: 431 Request Header Fields Too Large

tommasogiannoni commented 2 years ago

It is possible that the proxy is private ? there is a "src/setupProxy.js" in the git .ignore. Just a question.

RhAbder commented 2 years ago

fed up with this 431 error

franck2210 commented 2 years ago

Anyone resolve it?

danygi79 commented 2 years ago

after compile:

Compiled successfully!

You can now view dgca-issuance-web in the browser.

Local: http://localhost:3000 On Your Network: http://192.168.5.220:3000

after first web browse request:

Proxy error: Could not proxy request /dgca-businessrule-service/valuesets from 127.0.0.1:3000 to http://127.0.0.1:8080. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

I undestend why ...

franck2210 commented 2 years ago

after compile:

Compiled successfully!

You can now view dgca-issuance-web in the browser.

Local: http://localhost:3000 On Your Network: http://192.168.5.220:3000

after first web browse request:

Proxy error: Could not proxy request /dgca-businessrule-service/valuesets from 127.0.0.1:3000 to http://127.0.0.1:8080. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

I undestend why ...

I did not understand which service I had to start

Blascox92 commented 2 years ago

fed up with this 431 error

same you stuck there

dranduil commented 2 years ago

Hello everyone. I am struggling to start server with this proxy error:

Proxy error: Could not proxy request /dgca-businessrule-service/valuesets from 127.0.0.1:3000 to http://localhost:8080. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Running on the Windows 10 Ubuntu emulation.

Any suggestion ?

io ci sono riuscito e fatto, vi spiego il passaggio

vi scaricate la versione 1.0.10 poi aprite il pompt dei comandi

entrate nella cartella del progetto

cd <nome-progetto> una volta dentro , assicuratevi di avere Docker installato, altrimenti scaricatelo una volta installato docker il passaggio successivo sarà quello di creare VM con docker quindi digiterete questo:

docker-compose up -d

aspettate un pò perché vi dovrà scaricare tutta la roba sul container virtuale che vi creerà.

una volta fatto questo aprite la dashaboard di docker e andate su Containers/APP lì troverete un contenitore chiamato dgca-issuance-web-1010 se siete arrivati fin qui ... bene! siamo a metà strada. se cliccate sul contenitore vi si aprira una lista di sub contenitori . e ci concentreremo su dgca-issuance-web e vedrete delle icone, premete sull'icona >_ , vi si aprirà il terminale. se provate ad accedere su localhost:8080 vi renderete conto che non vi fa entrare perché vi chiederà una password.

che faremo noi? beh, creeremo un nuovo utente quindi nel terminale che vi si è aperto in precedenza cliccando su >_ dobbiamo installare questo apache2-utils e lo installeremo con i comandi di linux, in questo modo : apt-get install apache2-utils molto bene! ora basterà creare un utente nostro . sul terminale scrivete questo : htpasswd -c /etc/nginx/.htpasswd nome-utente ovviamente il nome-utente va sostituito con quello che voi volete , ok ? una volta fatto partire il comando vi chiederà di inserire una password, e vi richiederà di inserirla nuovamente.

fatto ciò , ragazzi è fatta! potete accedere a localhost:8080 e inserirete i vostri dati utente come le avete creati , accedete e il piatto è pronto, purtroppo il codice qr non è valido , qualcuno ha delle idee?