Discussion:
TDI7.0 - how to run a-l via command line without closing CE
(too old to reply)
gcdollar
2010-07-05 22:50:39 UTC
Permalink
Hi,

I'm not sure if this has been asked before, as I couldn't find an
answer by searching the forum.
My question is how to run assembly lines via command line without
having to closing the config editor? If CE is not closed, an exception
will be thrown: javax.jms.JMSException: Cannot start a queue manager
for JMS. However, closing and reopening CE over and over again can be
annoying when trying to debug.
Does any one know how to get around with this? Thanks!
Deyan Popov
2010-07-06 06:47:29 UTC
Permalink
If you already have a running TDI Server (the CE starts one), you
should not run ibmdisrv in the same solution folder, because
it will try to start a new TDI Server and the two instances will fight
over the System Queue files and you will see a JMS error.

Use the CLI instead to connect to the already running TDI Server:

cd <install dir>/bin
tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c ../rs.xml -r al

The above command line runs AssemblyLine "al" from config file
"rs.xml" which is located in the TDI install directory.

Regards,
Deyan Popov
gcdollar
2010-07-06 23:52:34 UTC
Permalink
Post by Deyan Popov
If you already have a running TDI Server (the CE starts one), you
should not run ibmdisrv in the same solution folder, because
Thanks Deyan for your help. It works. However, I also added -listen
option to get the log. The actual log content is printed in the
commandline window, but not in tdisrvctl.log under <TDI_Install_Dir>
\logs\ directory and ibmdi.log is not updated. How can I make
tdisrvctl.log have the same or similar info. as ibmdi.log?

Also, my assembly line calls another assembly line, when I run the
first assembly line using tdisrvctl, at the end it prints:
CTGDIS080I Terminated successfully (0 errors).
CTGDJB023E Could not start AssemblyLines on the server localhost:1099.
CTGDJB001W The command did not complete successfully. See previous
messages or error logs for details.

Does it mean it could not run the second assembly line? How can I fix
this?

Many thanks.
Post by Deyan Popov
it will try to start a new TDI Server and the two instances will fight
over the System Queue files and you will see a JMS error.
cd <install dir>/bin
tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c ../rs.xml -r al
The above command line runs AssemblyLine "al" from config file
"rs.xml" which is located in the TDI install directory.
Regards,
Deyan Popov
gcdollar
2010-07-06 23:56:11 UTC
Permalink
Post by Deyan Popov
If you already have a running TDI Server (the CE starts one), you
Forgot to mention that I edited the tdisrvctl-log4j.properties as
follows, but it still doesn't print anything similar as ibmdi.log. I
couldn't find any helpful info. from the InfoCenter on this.

log4j.rootCategory=INFO, Default
log4j.appender.Default=org.apache.log4j.FileAppender
log4j.appender.Default.layout=org.apache.log4j.PatternLayout
log4j.appender.Default.layout.ConversionPattern=%d{ISO8601} %-5p
[tdisrvctl] - %m%n
log4j.appender.Default.file=C:/Program Files/IBM/TDI/V7.0/logs/
tdisrvctl.log
log4j.appender.Default.append=false
log4j.appender.Default.layout=org.apache.log4j.PatternLayout
log4j.appender.Default.layout.ConversionPattern=%d{ISO8601} %-5p [%c]
- %m%n
log4j.logger.com.ibm.di.config=WARN
log4j.logger.com.ibm.di.loader=WARN
Post by Deyan Popov
should not run ibmdisrv in the same solution folder, because
it will try to start a new TDI Server and the two instances will fight
over the System Queue files and you will see a JMS error.
cd <install dir>/bin
tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c ../rs.xml -r al
The above command line runs AssemblyLine "al" from config file
"rs.xml" which is located in the TDI install directory.
Regards,
Deyan Popov
Deyan Popov
2010-07-07 06:55:46 UTC
Permalink
You should export the configuration out of the CE before you use it.

I forgot to warn you that the CLI is not that mature and has its
peculiarities, so it is a good idea to copy the configuration files in
the configs folder (see the "api.config.folder" property in
solution.properties).

The behaviour of the -listen option depends on the context:
When you start an AssemblyLine it listens only for the logs produced
by that AssemblyLine. When you start a config instance, it listens for
the logs of all AssemblyLines started by that config instance.

Say you have a rs.xml in the configs folder. You can load/start a
config instance from that file and listen for its logs:

tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c rs.xml -listen

Then start an AssemblyLine using another command prompt:

tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c rs.xml -r al

In the first window you should see the logs from the execution of the
AssemblyLine.

Regards,
Deyan Popov
gcdollar
2010-07-07 23:11:39 UTC
Permalink
Thanks Deyan.
I'm able to get the log from all the assembly lines of the config in
the command line prompt. However, why the tdisrvctl.log is always
empty? How can I get it to contain all the logs that's shown in the
commandline prompt? Thank you.
Post by Deyan Popov
You should export the configuration out of the CE before you use it.
I forgot to warn you that the CLI is not that mature and has its
peculiarities, so it is a good idea to copy the configuration files in
the configs folder (see the "api.config.folder" property in
solution.properties).
When you start an AssemblyLine it listens only for the logs produced
by that AssemblyLine. When you start a config instance, it listens for
the logs of all AssemblyLines started by that config instance.
Say you have a rs.xml in the configs folder. You can load/start a
tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c rs.xml -listen
tdisrvctl -K ../serverapi/testadmin.jks -P administrator -T ../
serverapi/testadmin.jks -W administrator -op start -c rs.xml -r al
In the first window you should see the logs from the execution of the
AssemblyLine.
Regards,
Deyan Popov
Deyan Popov
2010-07-08 08:57:37 UTC
Permalink
tdisrvctl.log contains only messages produced by the CLI. It is used
to debug problems with the CLI itself.
Currently the -listen option logs only on the console.

To get an AssemblyLine-specific log you can configure a Log Appender
just for that AssemblyLine (in the CE -> open the AL -> "Options..." -
http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDI.doc_7.1/aloptions.htm

Regards,
Deyan Popov
s***@gslab.com
2019-12-04 13:56:25 UTC
Permalink
My A.L. is running from the above command but I'm getting this exception
----------------------------------------------------------------------------
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: C:\Program Files\IBM\TDI\V7.1.1\logs\tdisrvctl.log (Access is denied.)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:205)
at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at com.ibm.di.cli.RemoteServerCommand.serverControlCommand(RemoteServerCommand.java:259)
at com.ibm.di.cli.RemoteServerCommand.main(RemoteServerCommand.java:230)

CTGDJB016I Connected to server localhost:1099.
CTGDJB017I Config started: C:\Users\GS-2216\Documents\TDI\Revision\RevisionAssignments\Runtime-RevisionAssignments\RevisionAssignments.xml
CTGDJB021I AssemblyLine started: MyAssemblyLine.
--------------------------------------------------------
--
Confidentiality Notice and Disclaimer: This email (including any
attachments) contains information that may be confidential, privileged
and/or copyrighted. If you are not the intended recipient, please notify
the sender immediately and destroy this email. Any unauthorized use of the
contents of this email in any manner whatsoever, is strictly prohibited. If
improper activity is suspected, all available information may be used by
the sender for possible disciplinary action, prosecution, civil claim or
any remedy or lawful purpose. Email transmission cannot be guaranteed to be
secure or error-free, as information could be intercepted, lost, arrive
late, or contain viruses. The sender is not liable whatsoever for damage
resulting from the opening of this message and/or the use of the
information contained in this message and/or attachments. Expressions in
this email cannot be treated as opined by the sender company management –
they are solely expressed by the sender unless authorized.
Eddie Hartman
2019-12-04 19:25:26 UTC
Permalink
Post by s***@gslab.com
My A.L. is running from the above command but I'm getting this exception
----------------------------------------------------------------------------
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: C:\Program Files\IBM\TDI\V7.1.1\logs\tdisrvctl.log (Access is denied.)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:205)
at java.io.FileOutputStream.<init>(FileOutputStream.java:127)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at com.ibm.di.cli.RemoteServerCommand.serverControlCommand(RemoteServerCommand.java:259)
at com.ibm.di.cli.RemoteServerCommand.main(RemoteServerCommand.java:230)
CTGDJB016I Connected to server localhost:1099.
CTGDJB017I Config started: C:\Users\GS-2216\Documents\TDI\Revision\RevisionAssignments\Runtime-RevisionAssignments\RevisionAssignments.xml
CTGDJB021I AssemblyLine started: MyAssemblyLine.
--------------------------------------------------------
--
Confidentiality Notice and Disclaimer: This email (including any
attachments) contains information that may be confidential, privileged
and/or copyrighted. If you are not the intended recipient, please notify
the sender immediately and destroy this email. Any unauthorized use of the
contents of this email in any manner whatsoever, is strictly prohibited. If
improper activity is suspected, all available information may be used by
the sender for possible disciplinary action, prosecution, civil claim or
any remedy or lawful purpose. Email transmission cannot be guaranteed to be
secure or error-free, as information could be intercepted, lost, arrive
late, or contain viruses. The sender is not liable whatsoever for damage
resulting from the opening of this message and/or the use of the
information contained in this message and/or attachments. Expressions in
this email cannot be treated as opined by the sender company management –
they are solely expressed by the sender unless authorized.
This looks a permissions problem. You can either adjust the permissions for the Solution Directory (which looks to be your installation folder). Permissions is one reason why I recommend NOT setting the Solution Directory to your install dir.

So either you move your SolDir (and edit the $SDI_INSTALLDIR/bin/DefaultSolDir script to the the TDI_SOLDIR environment variable to the new location, as well as updating the Server Document for the 'Default' Server in the CE, so the SolDir is correct).

Or, you change the permissions of 'logs' sub-folder of your installation directory.

Or, you start tdisrvctl and TDI/SDI with admin privileges.

/Eddie

Loading...