ealeksandrov/NodeAPI

Request to NodeAPI container timing out

neelp1 opened this issue · 3 comments

I used the Docker setup (not the manual setup) as stated in the readme then I used
http POST http://localhost:1337/api/oauth/token grant_type=password client_id=android client_secret=SomeRandomCharsAndNumbers username=myapi password=abc1234
but received
http: error: Request timed out (30s).

and also tried using Postman like in here #32 but stays on "sending request" status.

Has anyone come across this issue using the Docker setup?

Hey neelp1,
===== Please check step =====

  1. git clone https://github.com/ealeksandrov/NodeAPI.git
  2. docker-compose up -d --build
  3. docker exec nodeapi_node_api_1 node generateData.js
  4. postman -> https://documenter.getpostman.com/view/1836801/nodeapi/RW1hhG1N

Still getting the no response. I turned off ssl verification and turned off use my system's proxy. Possibly something wrong with the container?

screen shot 2018-05-09 at 3 39 49 pm

However, images seem ok by looking at the logs:
{"level":"info","message":"Express server listening on port 1337","timestamp":"2018-05-09T05:05:07.288Z"} {"level":"error","message":"Connection error: failed to connect to server [mongo:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 172.19.0.2:27017]","timestamp":"2018-05-09T05:05:07.678Z"} {"level":"info","message":"Connected to DB!","timestamp":"2018-05-09T05:05:27.957Z"} {"level":"info","message":"New user - myapi:abc1234","timestamp":"2018-05-09T05:05:28.125Z"} {"level":"info","message":"New client - android:SomeRandomCharsAndNumbers","timestamp":"2018-05-09T05:05:28.126Z"}

When I try it with simple commands from README it works fine:

Screenshot 2019-10-23 at 20 20 04

Unfortunately I can't help more, since I don't use Docker. At least we can see that the problem is not in package.