Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

AS400 DB2 Default Port

Hello,

 

I am trying to do a sample job where in it would pull data from an AS400 DB2 instance and place it into a SQL Server DB instance. I can connect successfully to the SQL Server instance by creating a metadata for it but cannot connect to the AS400 DB2 instance. We figured it has something to do with the firewall but we need to know the port # on the AS400 for us to connect to the DB2 instance. For those who have done this, can you let me know what port should we open for this for us to connect successfully?

 

Thanks!

Labels (2)
6 Replies
Anonymous
Not applicable
Author

The tDBxxx components for As400 don't require port parameter, maybe you can try 446?

Regards
Shong
Anonymous
Not applicable
Author

Thanks for the response. However, we need to open a port on the AS400 side so we can have our talend compoent that sits on a VM server connect to its DB. Because of security concerns, we cannot just open any port, we have to be specific. Hence, I am asking 0683p000009MACn.png

Anonymous
Not applicable
Author

The AS400 JDBC driver does not require a port parameter to connect to DB, which DB version are you using and what's the error message?

Anonymous
Not applicable
Author

The database I am connecting is AS400 DB2.

Anonymous
Not applicable
Author

This is the error while connecting while creating the metadata:

 

Connection failure. You must change the Database Settings.
java.lang.RuntimeException: java.sql.SQLException: The application requester cannot establish the connection. (connect timed out)
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:195)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1106)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:316)
at org.talend.metadata.managment.repository.ManagerConnection.check(ManagerConnection.java:289)
at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$62.runWithCancel(DatabaseForm.java:3983)
at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$62.runWithCancel(DatabaseForm.java:1)
at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$1.runnableWithCancel(AProgressMonitorDialogWithCancel.java:77)
at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$ARunnableWithProgressCancel$1.call(AProgressMonitorDialogWithCancel.java:161)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: The application requester cannot establish the connection. (connect timed out)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:561)
at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3342)
at com.ibm.as400.access.AS400JDBCDriver.prepareConnection(AS400JDBCDriver.java:1414)
at com.ibm.as400.access.AS400JDBCDriver.initializeConnection(AS400JDBCDriver.java:1251)
at com.ibm.as400.access.AS400JDBCDriver.connect(AS400JDBCDriver.java:390)
at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:186)
... 9 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.ibm.as400.access.PortMapper.getSocketConnection(PortMapper.java:266)
at com.ibm.as400.access.PortMapper.getServerSocket(PortMapper.java:161)
at com.ibm.as400.access.AS400ImplRemote.signonConnect(AS400ImplRemote.java:2363)
at com.ibm.as400.access.AS400ImplRemote.signon(AS400ImplRemote.java:2278)
at com.ibm.as400.access.AS400.sendSignonRequest(AS400.java:3142)
at com.ibm.as400.access.AS400.promptSignon(AS400.java:2706)
at com.ibm.as400.access.AS400.signon(AS400.java:4035)
at com.ibm.as400.access.AS400.connectService(AS400.java:1184)
at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3334)
... 14 more

SKakaraparthi1611576719

Hi Shong,

I am also getting the same error when trying to AS400 using port number from Talend Studio.

However, we need to open a port on the AS400 side so we can have our talend compoent that sits on a VM server connect to its DB. Because of security concerns, we cannot just open any port, we have to be specific. Could you please suggest.

 

Exception in component tDBConnection_1 (demo)

java.lang.RuntimeException: The application requester cannot establish the connection. (Connection was dropped unexpectedly.)

at datalake_kafkamonitoring.demo_0_1.demo.tDBConnection_1Process(demo.java:504)

at datalake_kafkamonitoring.demo_0_1.demo.runJobInTOS(demo.java:2200)

at datalake_kafkamonitoring.demo_0_1.demo.main(demo.java:2000)