Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TDI Java API issue - Starting Assembly Line with Listener

680 views
Skip to first unread message

russell....@gmail.com

unread,
Apr 27, 2009, 4:25:25 PM4/27/09
to
Good afternoon,
I am trying to use the TDI Server Java API to connect to a remote TDI
server and start an Assembly Line with a listener. I'm not having any
issues starting the Assembly Line without a listener, but when I start
it with a listener, I'm receiving timeout errors:

2009-04-27 14:51:59,088 ERROR [com.ibm.di.api] - CTGDKD284E
RemoteException on assemblyLineCycleDone method.:
java.rmi.ConnectException: Connection refused to host: 192.168.0.11;
nested exception is:
java.net.ConnectException: Connection timed out
2009-04-27 14:55:08,060 ERROR [com.ibm.di.api] - CTGDKD286E
RemoteException on messageLogged method.: java.rmi.ConnectException:
Connection refused to host: 192.168.0.11; nested exception is:
java.net.ConnectException: Connection timed out
2009-04-27 14:55:08,060 ERROR [com.ibm.di.api] - CTGDKD374E Exception
caught on messageLogged method: com.ibm.di.api.DIException: CTGDKD286E
RemoteException on messageLogged method.: Connection refused to host:
192.168.0.11; nested exception is:
java.net.ConnectException: Connection timed out
2009-04-27 14:51:59,089 ERROR [AssemblyLine.AssemblyLines/CSVtoXML.19]
- CTGDIS266E Error in EndCycle. Exception occurred:
com.ibm.di.api.DIException: CTGDKD284E RemoteException on
assemblyLineCycleDone method.: Connection refused to host:
192.168.0.11; nested exception is:
java.net.ConnectException: Connection timed out

We are using SSL to connect to the server, and have had no issues
except for starting an Assembly Line with a listener. In the Appendix
C of IBM's Help, the following is stated:

"You need to provide the object representing your listener class and
specify whether SSL is used for communication with the Server or not
(you must specify how the Server API is configured on the Server side
- otherwise the communication for that listener will fail)."

The call I am making to start the Assembly Line is as follows:

configInstance.startAssemblyLine(assemblyLineName, null,
AssemblyLineListenerBase.createInstance(myALListener,true), true);

As you can see, we do specify "true" that SSL is being used, but I'm
wondering if there's some other configuration that needs to be done to
allow listeners on Assembly Lines?

Any help would be greatly appreciated.

Thank you,
Russell Goldstein

Deyan Popov

unread,
May 3, 2009, 3:48:31 AM5/3/09
to
Normally when you start an AssemblyLine using a Java program, the Java
program makes calls to TDI. In that case TDI is the SSL server side
and the Java program is the SSL client side.
With listeners, however, TDI calls back the Java program to notify it
of interesting events. So the Java program must also act as an SSL
server and TDI will also act as an SSL client. This means you have to
provide an SSL key (in a keystore) for the Java program so that it can
work as an SSL server.
Normally (when SSL client authentication is disabled) you would
configure only a truststore for the Java program:
javax.net.ssl.trustStorePassword=...
javax.net.ssl.trustStore=...
But if you enable SSL client authentication (set
"api.remote.ssl.client.auth.on=true" in global.properties/
solution.properties) or use listeners, you have to configure also a
keystore for the Java program:
javax.net.ssl.keyStorePassword=...
javax.net.ssl.keyStore=...
That keystore must contain a public-private key pair. Furthermore you
have to ensure that the TDI Server trusts the key pair. One way to do
that is to import the certificate for that key pair in the TDI
truststore (ideally you would only import the signer certificate of
the root Certificate Authority).
To test the scenario you could use the sample .jks files provided with
TDI - testserver.jks and serverapi/testadmin.jks. testserver.jks
(password is "server") can be used for keystore and truststore of the
TDI Server and testadmin.jks (password is "administrator") can be used
for keystore and truststore of the Java program.
Hope this helps.
0 new messages