(111: Connection refused) while connecting to upstream

Hi All,
Currently i have deployed the “Kong Community” version on my local m/c and running under the docker along with same i had expose a Node.Js web-service on 8090 port. same time i am using KONGA as portal to mane the API.

So here is details…

Step1: KONG - docker-compose.yaml

version: ‘2.1’

volumes:
kong_data: {}

networks:
kong-net:

services:
kong-migrations:
image: "{KONG_DOCKER_TAG:-kong:latest}" command: kong migrations bootstrap depends_on: db: condition: service_healthy environment: KONG_DATABASE: postgres KONG_PG_DATABASE: {KONG_PG_DATABASE:-kong}
KONG_PG_HOST: db
KONG_PG_PASSWORD: {KONG_PG_PASSWORD:-kong} KONG_PG_USER: {KONG_PG_USER:-kong}
networks:
- kong-net
restart: on-failure

kong-migrations-up:
image: "{KONG_DOCKER_TAG:-kong:latest}" command: kong migrations up && kong migrations finish depends_on: db: condition: service_healthy environment: KONG_DATABASE: postgres KONG_PG_DATABASE: {KONG_PG_DATABASE:-kong}
KONG_PG_HOST: db
KONG_PG_PASSWORD: {KONG_PG_PASSWORD:-kong} KONG_PG_USER: {KONG_PG_USER:-kong}
networks:
- kong-net
restart: on-failure

kong:
image: “{KONG_DOCKER_TAG:-kong:latest}" user: "{KONG_USER:-kong}”
depends_on:
db:
condition: service_healthy
environment:
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_ADMIN_LISTEN: ‘0.0.0.0:8001’
KONG_CASSANDRA_CONTACT_POINTS: db
KONG_DATABASE: postgres
KONG_PG_DATABASE: {KONG_PG_DATABASE:-kong} KONG_PG_HOST: db KONG_PG_PASSWORD: {KONG_PG_PASSWORD:-kong}
KONG_PG_USER: ${KONG_PG_USER:-kong}
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
networks:
- kong-net
ports:
- “8000:8000/tcp”
- “8001:8001/tcp”
- “8443:8443/tcp”
- “8444:8444/tcp”
healthcheck:
test: [“CMD”, “kong”, “health”]
interval: 10s
timeout: 10s
retries: 10
restart: on-failure

db:
image: postgres:9.5
environment:
POSTGRES_DB: {KONG_PG_DATABASE:-kong} POSTGRES_PASSWORD: {KONG_PG_PASSWORD:-kong}
POSTGRES_USER: {KONG_PG_USER:-kong} healthcheck: test: ["CMD", "pg_isready", "-U", "{KONG_PG_USER:-kong}"]
interval: 30s
timeout: 30s
retries: 3
restart: on-failure
stdin_open: true
tty: true
networks:
- kong-net
volumes:
- kong_data:/var/lib/postgresql/data

Step 2: running the kong

docker-compose -f docker-compose.yaml up

Step3: Hosting API using KONGA

Step 4: Executing the API using POSTman getting following error

Step5: POSTMAN output

Step6: Node.js Service Output

End Point: http://127.0.0.1:8090/tokenVerification/

Response:

{
“responseType”: “INVALID”,
“status”: “UN-SUCCESS”,
“message”: “Un-Successfully Validated”
}

Execution Environment

  • Windows Firewall is off
  • All Port (inbound and outbound) is open
  • Docker running on windows 10

Kindly Assist.

Thanks & Regards
Jaiswar Vipin Kumar R.

  1. verify the End Point: http://127.0.0.1:8090/tokenVerification/ is running and necessary firewalls are open any connection reset timeout set at endpoint side
  2. reboot the kong ingress pod then try to test again

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ