Welcome! Log In Create A New Profile

Advanced

Can someone explain me why "curl: (7) Failed to connect to 127.0.0.1 port 2000: Connection refused" ?

May 13, 2020 05:52AM
Hi!,

I do not understand why it says "curl: (7) Failed to connect to 127.0.0.1 port 2000: Connection refused" :
curl -X POST -F 'first_name=pinco' -F 'last_name=pallo' -F 'company_name=Company' -F 'email=pinco.pallo@company.com' -F 'tel=111111111' 127.0.0.1:2000/puser/add curl: (7) Failed to connect to 127.0.0.1 port 2000: Connection refused.

In server-gorillamux.go : CONN_PORT = "2000"

in /etc/nginx/conf.d/default.conf :

upstream golang-webserver {
ip_hash;
server 127.0.0.1:2000;
}

server {
#listen 2999;
server_name ggc.world;

root /puser/add; // Is this correct?

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:50m;

location / {
#proxy_pass http://127.0.0.1:8080;
proxy_pass http://golang-webserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
}
}

Looking forward to your kind help.
Marco
Subject Author Posted

Can someone explain me why "curl: (7) Failed to connect to 127.0.0.1 port 2000: Connection refused" ?

MarcoI May 13, 2020 05:52AM

Re: Can someone explain me why "curl: (7) Failed to connect to 127.0.0.1 port 2000: Connection refused" ?

MarcoI May 13, 2020 10:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready