1

Since the containment I am working from home with the use of a VPN and I am not able to request an Authentication API for my solution.

I am working on a .Net Core application with two docker container, one is the application the second is the DB2 database and we have an Authentication API the client gave us that we installed on one of our local machine. So everything is currently in the same network once I am connecting through the VPN I guess (I am not a network expert).

Right now, the develop branch is working on the integration server and on my coworker's PC and he is also working from home through the VPN so we are in the same conditions with the same code. But I have this error when trying to authenticate :

Connection refused error

The only difference should come from my environment then and I have something different indeed : - his environment

His configuration

And mine :

enter image description here

As you can see, I have http_proxy configured and I don't know from where it is coming. It keeps the docker container from getting access to internet so I removed it with a export http_proxy= and was then able to retrieve the ping package with apt-get install iputils-ping. With this configuration I can ping 8.8.8.8, ping the local machine where the API is installed, I can even curl the http authentication URL but I am still unable to connect when trying to launch the authentication on the app or the swagger. I think the problem is located somewhere between the Visual Studio environment/configuration, the docker containers and the network but I can't found out where.

Here is my docker-compose.yml :

version: '3.4'

services:
  db2server:
    env_file: .\DB2\env_file
    privileged: true
    build:
      context: .\DB2
    ports:
      - 50001:50001
      - 55001:55001
    volumes:
      - .\DB2\data:/database
      - .\DB2\scripts:/var/setup
      - .\DB2\sql:/var/sql
  openhostservice:
    build:
      context: .
      dockerfile: OpenHostService/Dockerfile
    image: ${DOCKER_REGISTRY-}openhostservice
    depends_on:
      - db2server
    ports:
      - 32780:80
networks:
    default:
        external:
            name: ******

I tried with and without our proxy configuration on the global Windows system setting, with and without http_proxy.

MowKette
  • 45
  • 6

1 Answers1

1

See commentaries in this SO post, maybe the system thinks that empty environment variable is not the same as not set variable, thus, please, use unset http_proxy command (and the same for another environment variables). If it will not help, provide environment configurations with images with higher resolution (now the text is not readable enough).

Nick Veld
  • 143
  • 1
  • 1
  • 12
  • Thank you ! I didn't know for the unset http_proxy command but it helped me to find my problem. It came from the .docker/config.json (a file I didn't know about) which had the proxy set in and it seems that removing the http_proxy from a terminal only does it for this instance but not really on the container. This is what bothered me, the fact that I could curl from the terminal but still not access the API URL. – MowKette Mar 30 '20 at 10:13