Reputation: 415
There is a rest service in DST cloud (dst.ibm.com), I need to call it from the node.js back end code in Bluemix. It errors on "connection time out". I have set up the secure gateway service in bluemix. And also installed Docker and run the gateway client on the DST server. But it still doesn't work.
I am not sure if I can share the config details here. There is one parameter I'm not sure of. The "Client port" param in the destination. I set it as "9000".
Can you share how to debug it please? Thanks a lot. Jen
Upvotes: 0
Views: 237
Reputation: 303
Based on the information you've provided, I'm not sure if you should be using a Cloud Destination versus an On-Premises Destination. I'll provide brief descriptions of each and then explain how they would be used, respectively.
On-Premises Destination - you have some service/resource located in a network that doesn't have public access and you need your public application to reach it. A common use case would be having a database in an on-premises network and your cloud application needs to be able to make queries to that database. These connections will be limited by the Access Control List on the Secure Gateway Client.
Cloud Destination - you have some application/service running on a machine that doesn't have access to public internet, but needs to make a request to some application in public internet.
Using On-Premises Destinations
To use an on-premises destination, you will create a destination and provide it with the hostname/IP (Resource Host) of where the service you need to access is running, as well as the port (Resource Port) it will be listening on. Upon creation, the destination will be associated with a Cloud Host and Port. This Cloud Host and Port are what your cloud application will be sending requests to. This will receive the request, send it to the Secure Gateway Client, which will then send it to the Resource Host and Port that your provided during the creation of the destination.
For example, lets say your database is running on 9.49.38.22 and is listening for HTTP connections on port 1234. When you create a destination in SG with that information, we will provide you with a Cloud Host and Port like 'secure.gateway.server:15003'. Your cloud application would then send a request to 'secure.gateway.server:15003' which would be sent down to the client which would open a connection to 9.49.38.22:1234 with the request.
Using Cloud Destinations
To use a cloud destination, you will create a destination and provide it with the hostname/IP (Resource Host) of where the public service you need to access is running, the port (Resource Port) it will be listening on, and the port you would like your local application to send requests to (Client Port). The Secure Gateway Client, on connection to the gateway, will begin listening on the Client Ports you have provided. When a request is received on one of these ports, the client will send the request to the Secure Gateway Server which will then send the request to the Resource Host and Port associated with the destination.
Upvotes: 1