Bad GateWay Error while adding Datasource

Hello community,

Am trying to learn this influxDB and Garafana since then I did start with a tutorial which is https://dzone.com/articles/real-time-performance-monitoring-in-net-core-with , I have done exactly the same as the guy has mentioned in the tutorial but the difference is that am not using Docker, so basically am using a MacBook Pro with parallel desktop to have windows 7 OS as well, I did install grafana on my windows OS,
but the problem is that when am trying to add a datasource it says Bad GateWay but the port that am selecting is free also firewall is off,the rest of settings are like exactly like the tutorial.

am trying the developer tools of chrome to check the result of the request:
The request is :

  1. Request URL:

http://localhost:3000/api/datasources/2

  1. Request Method:

PUT

  1. Status Code:

200 OK

  1. Remote Address:
  1. Referrer Policy:

no-referrer-when-downgrade

  1. Response Headersview source

  2. Content-Length:

420

  1. Content-Type:

application/json

  1. Date:

Wed, 29 Aug 2018 06:38:48 GMT

  1. Request Headersview source

  2. Accept:

application/json, text/plain, /

  1. Accept-Encoding:

gzip, deflate, br

  1. Accept-Language:

en-US,en;q=0.9,fa;q=0.8

  1. Connection:

keep-alive

  1. Content-Length:

351

  1. Content-Type:

application/json;charset=UTF-8

  1. Cookie:

grafana_user=admin; grafana_remember=3a870f381a165432a949d9ef3753e4181c2012768684e23b81b2635da9578f367f; grafana_sess=fbb777d56e017de7

  1. Host:

localhost:3000

  1. Origin:

http://localhost:3000

  1. Referer:

http://localhost:3000/datasources/edit/2

  1. User-Agent:

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

  1. X-Grafana-Org-Id:

1

  1. Request Payloadview source

    1. {id: 2, orgId: 1, name: “Influx”, type: “influxdb”, typeLogoUrl: “”, access: “proxy”,…}

    2. access:“proxy”

    3. basicAuth:false

    4. basicAuthPassword:""

    5. basicAuthUser:""

    6. database:“appmetricsdemo”

    7. id:2

    8. isDefault:true

    9. jsonData:{keepCookies: []}

    10. name:“Influx”

    11. orgId:1

    12. password:""

    13. readOnly:false

    14. secureJsonFields:{}

    15. type:“influxdb”

    16. typeLogoUrl:""

    17. url:“http://127.0.0.1:8086

    18. user:""

    19. version:11

    20. withCredentials:false

The settings of the request is :

  1. Request URL:

http://localhost:3000/api/frontend/settings

  1. Request Method:

GET

  1. Status Code:

200 OK

  1. Remote Address:
  1. Referrer Policy:

no-referrer-when-downgrade

  1. Response Headersview source

  2. Cache-Control:

no-cache

  1. Content-Type:

application/json; charset=UTF-8

  1. Date:

Wed, 29 Aug 2018 06:38:48 GMT

  1. Expires:

-1

  1. Pragma:

no-cache

  1. Transfer-Encoding:

chunked

  1. Request Headersview source

  2. Accept:

application/json, text/plain, /

  1. Accept-Encoding:

gzip, deflate, br

  1. Accept-Language:

en-US,en;q=0.9,fa;q=0.8

  1. Connection:

keep-alive

  1. Cookie:

grafana_user=admin; grafana_remember=3a870f381a165432a949d9ef3753e4181c2012768684e23b81b2635da9578f367f; grafana_sess=fbb777d56e017de7

  1. Host:

localhost:3000

  1. Referer:

http://localhost:3000/datasources/edit/2

  1. User-Agent:

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

  1. X-Grafana-Org-Id:

1

  1. Request URL:

http://localhost:3000/api/datasources/proxy/2/query?db=appmetricsdemo&q=SHOW%20RETENTION%20POLICIES%20on%20"appmetricsdemo"&epoch=ms

  1. Request Method:

GET

  1. Status Code:

502 Bad Gateway

  1. Remote Address:
  1. Referrer Policy:

no-referrer-when-downgrade

  1. Response Headersview source

  2. Cache-Control:

no-cache

  1. Content-Length:

0

  1. Date:

Wed, 29 Aug 2018 06:38:49 GMT

  1. Expires:

-1

  1. Pragma:

no-cache

  1. Request Headersview source

  2. Accept:

application/json, text/plain, /

  1. Accept-Encoding:

gzip, deflate, br

  1. Accept-Language:

en-US,en;q=0.9,fa;q=0.8

  1. Connection:

keep-alive

  1. Cookie:

grafana_user=admin; grafana_remember=3a870f381a165432a949d9ef3753e4181c2012768684e23b81b2635da9578f367f; grafana_sess=fbb777d56e017de7

  1. Host:

localhost:3000

  1. Referer:

http://localhost:3000/datasources/edit/2

  1. User-Agent:

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

  1. X-Grafana-NoCache:

true

  1. X-Grafana-Org-Id:

1

  1. Query String Parametersview sourceview URL encoded

  2. db:

appmetricsdemo

  1. q:

SHOW RETENTION POLICIES on “appmetricsdemo”

  1. epoch:

ms

this is the returned result. Actually I have been working on it for 2 days. please help me to get it done.Thanks a lot.

The grafana version that am using is : v5.2.2

Even I did try this on my windows 2016 server and have the same issue.