anil614sagar / openapi2apigee

OpenAPI to Apigee API Proxy using Node.js Utility
MIT License
33 stars 45 forks source link

bug: socket hang up #28

Open rajeevchaturvedi2007 opened 7 years ago

rajeevchaturvedi2007 commented 7 years ago

When I am trying to run command -generateApi, it will through error -socket hang up. Is any one have any idea?

anil614sagar commented 7 years ago

Are you using windows OS ?

anil614sagar commented 7 years ago

It might be network / proxy / firewall issue.

seantdg commented 7 years ago

Hi @anil614sagar ,

I can reproduce this issue on the office network.

`{ "code": "ECONNRESET", "name": "Error", "message": "Error downloading file \"http://petstore.swagger.io/v2/swagger.json\" socket hang up", "stack": "Error: Error downloading file \"http://petstore.swagger.io/v2/swagger.json\" socket hang up at ono (/usr/local/lib/node_modules/openapi2apigee/node_modules/swagger-parser/node_modules/ono/lib/index.js:67:20) at ClientRequest. (/usr/local/lib/node_modules/openapi2apigee/node_modules/swagger-parser/node_modules/json-schema-ref-parser/lib/read.js:195:16) at ClientRequest.emit (events.js:95:17) at Socket.socketCloseListener (http.js:1522:9) at Socket.emit (events.js:117:20) at TCP.close (net.js:465:12)

Error: socket hang up at createHangUpError (http.js:1472:15) at Socket.socketCloseListener (http.js:1522:23) at Socket.emit (events.js:117:20) at TCP.close (net.js:465:12)" }`

Please could you confirm you are not seeing this error?

seantdg commented 7 years ago

Please note - I am able to curl http://petstore.swagger.io/v2/swagger.json successfully

rajeevchaturvedi2007 commented 7 years ago

This is not network/Proxy issue, others also getting the same error outside my networks.