cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access my server hosting api, getting connect ECONNREFUSED 0.0.0.0:3455, server on localho

SOLVED
Highlighted
New Contributor

Unable to access my server hosting api, getting connect ECONNREFUSED 0.0.0.0:3455, server on localho

I am new to swaggerhub.  I have a 2 valid swagger.json showing my 2 of my API definitions on the UI.  One of my API server is on localhost with host (0.0.0.0.:3455) and the other is behind a VPN and I am on my VPN.  When I click the "TRY" button for the APIs I get the following errors: 

 

a) For host 0.0.0.0.:3455, I get : connect ECONNREFUSED 0.0.0.0:3455

b) For the other host, I get a timeout error

 

Appreciate any help to get me move forward.  I want to be able to import APIs from my servers and need to get over this hurdle.

 

Thanks

Raghavan

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Staff

Re: Unable to access my server hosting api, getting connect ECONNREFUSED 0.0.0.0:3455, server on loc

Hi Raghavan,

Thanks for reaching out.  Two things:

 

1) Does your swagger definition list the host as `0.0.0.0:3455`?  It seems like that is not valid--perhaps you're trying to expose your API on all interfaces on a server, but I don't believe you'd want to tell consumers to connect to 0.0.0.0.  Can you please share your intentions?

 

2) For the try-it-out, there are currently two mechanisms that you can use to call your server.  The interactive docs use a proxy, to all you to call services which are not secured with SSL.  Browser security measures do not allow you to call a http server from https (like swaggerhub) so we enable a server-side proxy.  Because of your VPN, however, our external proxy cannot reach your server inside the VPN.

 

The editor view does not use the proxy, so you can currently use that mechanism (with the same limitations as stated above, with respect to HTTPS).

 

We are going to enable an option to disable the proxy for situations like yours.  In the mean time, you can use the editor, however you'llneed to address the hostname first.

 

Please reply if that doesn't answer your questions.

-----
Tony Tam
SmartBear VP of Swagger Products

View solution in original post

2 REPLIES 2
Highlighted
Staff

Re: Unable to access my server hosting api, getting connect ECONNREFUSED 0.0.0.0:3455, server on loc

Hi Raghavan,

Thanks for reaching out.  Two things:

 

1) Does your swagger definition list the host as `0.0.0.0:3455`?  It seems like that is not valid--perhaps you're trying to expose your API on all interfaces on a server, but I don't believe you'd want to tell consumers to connect to 0.0.0.0.  Can you please share your intentions?

 

2) For the try-it-out, there are currently two mechanisms that you can use to call your server.  The interactive docs use a proxy, to all you to call services which are not secured with SSL.  Browser security measures do not allow you to call a http server from https (like swaggerhub) so we enable a server-side proxy.  Because of your VPN, however, our external proxy cannot reach your server inside the VPN.

 

The editor view does not use the proxy, so you can currently use that mechanism (with the same limitations as stated above, with respect to HTTPS).

 

We are going to enable an option to disable the proxy for situations like yours.  In the mean time, you can use the editor, however you'llneed to address the hostname first.

 

Please reply if that doesn't answer your questions.

-----
Tony Tam
SmartBear VP of Swagger Products

View solution in original post

Highlighted
New Contributor

Re: Unable to access my server hosting api, getting connect ECONNREFUSED 0.0.0.0:3455, server on loc

Hi Tony,

 

a) One of my test servers is on localhost.  I tried using "localhost" or "127.0.0.1" for the "host" name, but get the same error. from the interactive API Docs tab.  I tried it from the Editor "Try" button, I get a CORS warning.  My server has enabled CORS support as follows:

 

`Access-Control-Allow-Origin`.*
`Access-Control-Allow-Headers`("Authorization", "Content-Type", "X-Requested-With")
 

Please see attached screenshot.

 

b) For server behind VPN, I get CORS error.  I can check with that engineer to see if they have CORS enabled.

 

c) I also want to be able to import my API swagger definitions from my servers for which I believe swaggerhub needs to connect to our servers.  With the above context, please suggest how to go about this.

New Here?
Join us and watch the welcome video:
Announcements