how to connect a bluemix app to on-premise db/as400?

后端 未结 3 925
无人共我
无人共我 2021-01-27 11:47

trying to connect a bluemix app (java liberty profile) to our on-premise db/as400 using a secure gateway. Denying or allowing all connection, doesn\'t change the error message.

相关标签:
3条回答
  • 2021-01-27 12:32

    Reading your logs, the error message

    Connection refused

    is meaning that the Driver is working fine, but there is a connection issue and in your case, using the Secure Gateway, you should investigate both the AS400 server and the Secure gateway instance

    • #1 is the TCP port 15XXX (the one tried to connect to by the driver following the JDBC url) mapped correctly on the Secure Gateway instance
    • #2a if the #1 is true, is the AS400 server listening on the same TCP port for incoming connections?
    • #2b if #2a is false, is the AS400 server listening on a different TCP port?
    • #3 according to the TCP port listened on by the AS400 server (#2a or #2b) is this port mapped correctly on the Secure Gateway instance, allowing the requests sent to the TCP 15XXX through the Secure Gateway routed correctly to the right port on the AS400 server?
    • #4 if #3 is true, has the AS400 server an internal firewall preventing incoming connections?
    0 讨论(0)
  • 2021-01-27 12:41

    Updating based on further discussion in comments.

    Getting empty reply from server on your cURL command to the cloud host:port should be generating logs on your SG Client. It should be the equivalent of a successful connection due to how a database would respond to this sort of connection.

    This seems to narrow down the issue to how the request is being created in your Bluemix app. Another comment on the initial question suggests that your driver only accepts select ports as input, so the issue might originate there.

    0 讨论(0)
  • 2021-01-27 12:43

    The JT400 JDBC driver communicates with the IBM i system using the IBM i Host Servers, which each run on different ports. You will need to forward all of these ports through your secure gateway in order for it to work. See this doc for more info (you'll need as-database, as-central, and as-signon at a minimum).

    If you need to change the ports used by the app to connect, you can do so by creating an AS400 object and using setServicePort to change the default ports. Then pass the AS400 object to connect instead of using the system, user name, and password.

    0 讨论(0)
提交回复
热议问题