Resolution of connection issue using Test_Login

Command Line Utility

Test_Login is a command line utility supplied with the Cradle Suite to help diagnose connection problems between the Cradle client and CDS (Cradle Database Server).

Steps

  1. At a command prompt cd %CRADLEHOME%\bin\exe\windows\or cd $CRADLEHOME/bin/exe/linux-ia32 or linux-x86_64
  2. Execute test_login.exe or ./test_login.exe
  3. Agree to continue with 'y'
  4. For a basic test select 3 to login to the DEMO project as MANAGER
  5. Select 7 to start the test
  6. This will then tell you the method being used to find the CDS for now press 'y'
  7. Move through the stages pressing 'y' each time and observe the result

    running of test_login.exe to diagnose issues
    Test_Login

If all is well the process will complete without errors.

If there is a problem an error will be raised (for example if a connection can’t be established because the CDS is not accessible or running Stage 1 would fail. At this point a user could try different CDS connection methods to diagnose the issue.

The ability to try different users and projects allow elimination of problematic installations or bad users.

Further information on the options in Test_Login can be found in the help.

 

What’s CRADLE_ERRORSTACK?

Environment Variable or Command-line Switch Stack-tracing

As with many complex products Cradle monitors its internal operation and on the rare occasion that something goes wrong it writes information to a log. CRADLE_ERRORSTACK controls how much information is logged internally and output on these occasions.

If in the unfortunate case a Cradle tool crashes, there will often be a log produced in the %CRADLEHOME%\logs\errors directory. This will enable 3SL Support to diagnose simple cases such as a lack of memory on the machine. If the case is more complex, the development team may need to know at which point the program was processing at the time the error occurred. CRADLE_ERRORSTACK will enable additional internal logging that will output a simple execution stack trace into the log. This can aid diagnosis and resolution.

Switching Stack Trace On and Off

CRADLE_ERRORSTACK is an environment variable. You can set it via the control panel’s Advanced system settings (see the screenshot).

In Linux if you are editing the environment config files bashrc, profile, etc for either the system /etc/profile or the user ~/.bashrc then use:

export CRADLE_ERRORSTACK=true

Or as we now set CRADLEHOME in /etc/profile.d/cradle.sh you can put the ‘CRADLE_ERRORSTACK=true’ variable in this file.

Or you could start the Cradle tool from within a command shell, (On Windows®) press windows key type cmd and then in the shell set CRADLE_ERRORSTACK=true, then launch the tool e.g. "%CRADLEHOME%\bin\exe\windows\work.exe". You can also set a -errorstack parameter to your command line option, i.e. work.exe -errorstack to start WorkBench with the stack on.

Turning on CRADLE_ERRORSTACK environment variable
Environment Variables

Should I leave CRADLE_ERRORSTACK on?

Generally there is no need to leave the stack trace on all the the time. There is a small performance hit if you do, so unless you are having problems we don’t advise you leave it enabled.

What if that still does not sort the issue?

3SL Support may ask you to turn on tracing which produces a complete execution trail from the product. This has a large overhead and uses disk space and is only in used in the very trickiest of issues. Rest assured, it’s unlikely you’ll have to use  it, but if you do there is a post here that explains tracing.

Article UpdateD

27/04/2021 – Using CRADLE_ERRORSTACK in Linux

Silent Installs

What is a silent install and how do I do it with Cradle?

Silent installs are  installations which do not require user interaction.

To perform a silent installation you will need to create a “setup.iss” file, this is created when making your recording for the silent installation by opening the command prompt and running setup.exe -r. After completing the installation you will have the “setup.iss” file in your system drive e.g C:\Windows.

Record silent install
Record silent install

You can now perform a silent installation with your recorded settings!

On the machine you would like to do the silent installation, place your setup.iss file in the same directory as the setup.exe. For full installations or server only installs, you will also need your security code which you place within a text file such as “code.txt“. You must only enter the Security Code on the first line and add a carriage return. For client only installs the file can be blank.

Now you have your files ready, open the command prompt navigate to your setup.exe directory and enter the following setup.exe code.txt -s

Run silent install
Run silent install

You are now running your silent installation!
Remember when you have finished you will need to restart the machine.

Please note this does not work with Toolsuite

If you would like more information on this please go to Cradle Documentation – Installation Guide – Windows and to Chapter 8. Or click here for Installation Types

 

 

How do I manage my Linux Cradle server when I have no GUI?

Managing your Cradle server via Command Line

Quite often you may find that the server machine you install the CDS and CWS on may not have a graphic user interface, in this case you can manage your Cradle server via a command line

How to Install a Security Code

The c_config command allows you to update a Cradle Security Code

Format
c_config -i code
Example
c-config -i BWEr-DSWe...

How to Start/Stop/Restart the Cradle Database Servers

The c_start command allows you to start, stop, restart or test the Cradle Database Server (CDS) and/or Cradle Web Server (CWS).

Format
c_start {start | stop | restart | test} {cds | cws | all}
Example
c_start start cds
Variations
CommandResult
c_start startstart cds + cws
c_start start cdsstart cds only
c_start start cwsstart cws only
c_start start allstart cds + cws
c_start stopstop cds + cws
c_start stop cdsstop cds only
c_start stop cwsstop cws only
c_start stop allstop cds + cws
c_start restartrestart cds + cws
c_start restart cdsrestart cds only
c_start restart cwsrestart cws only
c_start restart allrestart cds + cws
c_start testgive process numb of cds + cws
c_start test cdsonly give process numb of cds
c_start test cwsonly give process numb of cws
c_start test allgive process numb of cds + cws

How to Manage Cradle Projects

The c_prj command is used to create, delete, lock and unlock Cradle projects.

Format
c_prj.exe [-create
              -code <projcode>
              -title <project title>
              -path <project location>
              [-pid <project PID>]
              [-schema <schema name>]]
          [-delete
              -code <projcode>
              -password <MANAGER password>
              [-method {all | pdb | reg_only}]]
          [-lock
              -auth <user>,<password>,<projcode>
              [-allow_user <user>]]
          [-unlock
              -auth <user>,<password>,<projcode>]
Examples
c_prj.exe -create -code TEST -title "Test Project" -path /home/apps/temp/projects/test -pid TEST01 -schema empty

Will create a project with a project code of TEST, a title of Test Project in the /home/apps/temp/projects location with a PID of TEST01 using the empty schema.

c_prj.exe -delete -code TEST -password MANAGER PASSWORD -method all

Will delete the TEST project along with the registry entry, database files and directories.

 

Multiple Cradle Database Servers and How to Connect to Them

Multiple Cradle Database Server (CDS) Environments

Cradle supports multiple Cradle database servers,  in a single environment, based on the CDS Host Access List. The following file contains a list of the TCP/IP hostnames of the hosts that the CDS will respond to:

Windows – %CRADLEHOME%\admin\cds_hosts

Linux – $CRADLEHOME/admin/cds_hosts

The file is empty by default, which mean a CDS will respond to all hosts.

Two or more Cradle systems may be installed and operate in the same network by ensuring that each CDS has a non-empty Host Access List that defines the lists of hosts that are to be serviced by that CDS.  Multiple Cradle systems are consequently achieved by ensuring that the hosts used to run the CDSs appear in the Host Access List of only one CDS.

multiple CDS on single network
Multiple CDS on the same network

Clients Connecting to Multiple CDS

Each Cradle client such as WorkBench may be executed on a host which is in the Host Access List of more than one CDS. In this case, WorkBench should be told which CDS it is to connect to, for example by using the command-line option: -cds hostname

Methods of connecting Cradle tools to a CDS

There are several methods of specifying which CDS, when you have multiple Cradle database servers, a client is to use, or alternatively a client can attempt automatic CDS discovery.

-cds command line option

Cradle tools for example the WorkBench client, supports a -cds command line option that takes an argument which is interpreted to be either the hostname or IP address of the machine where the CDS is executing.

-cds hostname

If invoked with this command line option, the WorkBench client does not attempt CDS discovery via broadcast, but instead attempts to link directly to the CDS on the specified machine.

CRADLE_CDS_HOST environment variable

If a -cds command line option has not been specified, the WorkBench client tests for the presence of a CRADLE_CDS_HOST environment variable, and if defined, uses its value as the hostname or IP address of the host executing the CDS.

In this case, WorkBench does not attempt CDS discovery via broadcast, but instead attempts to link directly to the CDS on the specified machine.

Automatic CDS discovery by broadcast

If a CDS host has not been specified through other means (such as via the –cds command-line option, or CRADLE_CDS_HOST environment variable), a Cradle client such as WorkBench will attempt to locate a CDS automatically by broadcasting. If the client can connect to two or more CDSs and is using this method, the client will connect to which ever CDS responds quickest.

For a more in-depth look at environments with multiple Cradle database servers,  please refer to our online help.

May 2017 Newsletter

May Already

Since our last newsletter: We sincerely hope that those of you who celebrate Easter had a nice break and are not too full of Easter Eggs!   We’ve also had an Activity Diagram to celebrate St. George’s day and tried to conquer the Universe on Star Wars Day with some Functional Modelling. That aside development continues on Cradle 7.3.

New Voices

We’ve expanded the writing team to include authors from elsewhere in the 3SL team. Because this is a blog, there is more emphasis on people’s personal insights into the Cradle product. This should make the style and tone more varied and hopefully more interesting to read.

As you may have already seen the 3SL-Blog is groaning full of new articles. These are mainly “Hints and Tips” and longer RM/SE articles. Increasingly we’ve found that some of the support questions that arrive here in 3SL towers are very similar. To that end we’re publishing them under the FAQ section.

If you have a burning question and would like to see an article covering a particular topic, drop us a line at social-customer@threesl.com and we’ll see what we can do. On the other hand, if you have a novel use of Cradle that you’re happy to share with us, drop us a line with the article, screen shots and accreditation details and we may feature it.

Non Graphic Interfaces

There is widespread understanding of the WorkBench and even Web Access interaction with Cradle. It is, after all the main way we interact with the data. However, there are many occasions when we want some of the data from Cradle but don’t want to or can’t use a screen to interact. This month we’re highlighting c_table.

c_table

This command line utility can be used to produce Reports, Matrices, Metrics, Graphs or Queries in a tabular form. This can be an HTML, RTF, CSV or SVG output. If every morning you need to go into a meeting, or stand at your ‘toolbox talk’ with a printed report detailing the number of ‘Issues’ with a category of ‘Raised’ you can do this by running one command. Creating a desktop short cut to run the command / batch file you need not start WorkBench just to run the query and publish the result. Even more cunningly a script could be triggered at 8:00am every morning to create the document for you.  Our blog article “Batch File Reporting in Cradle” adds more detail.

CompeteFor

If you are working or bidding on large infrastructure projects,  Cradle is now available through the CompeteFor procurement portal. Whatever the size of your Requirements Management or Systems Engineering task, Cradle is there from Concept to Creation.

Social Media

Twitter

May Day 2017 Madness Giveaway. Thanks to all those who re-Tweeted and followed @threesl, during our Twitter #FreebieFriday giveaway and congratulations to @baguettio, who won a copy of Cradle RM Desktop. It was really great to see re-Tweets from around the globe.

Hints of the Month

Here are some links to helpful topics since our last newsletter, they should improve your Cradle experience:

When working in large teams or over a long period an item’s edit history is very useful. See the LinkedIn discussion Who Changed That? When? Why?

When you have many items to submit all in one go, selecting them on the screen and submitting them is not practical. This article Configuration Management – Submit by Query discusses the alternative.

You can read Hints & Tips in the 3SL Blog.

Batch File Reporting in Cradle

Publishing Reports

Do you want to run your reports faster or wish you could run them overnight or at weekends so they are ready when you arrive at work in the morning? With batch file reports, you can do this quickly and easily.

What is a Batch File?

A batch file contains a series of DOS commands, and is commonly written to automate frequently performed tasks including publishing reports and documents. Instead of typing the same commands over and over in a Command Prompt, you can simply double-click the batch file or use Windows Task Scheduler to set it running during down times e.g. over night or weekends which then creates all the reports you require.

The following report will show you how to create a batch file for these reports.

How to Write a Batch File for Reporting

Using a plain text application like Notepad, you need to first set the folder the application to be used is in. In this case, it is in the same place all Cradle applications are held, the command does need to be surrounded by quotes

“%CRADLEHOME%\bin\exe\windows\c_table.exe”

You then need the login information to the project that you would normally would when using a Command Prompt.

-login admin,ADMIN,demo or -login reqman,REQMAN,demo

After these 2 necessary parts, you need the options for the report; you can find these options in our online Help System for c_table. If you are already in the Command Prompt in the correct location then just type in c_table and you will see the Information popup.

Information on command options for c_table to use in batch file reporting
C_Table Command Options

Once you have finished writing you batch file, the command should look something like this:

"%CRADLEHOME%\bin\exe\windows\c_table.exe" -login reqman,REQMAN,demo -file "C:\Temp\Project_Setup_Demo.rtf" -report Project_Setup -rloc project -format rtf

You can use c_table to publish data from a matrix:

"%CRADLEHOME%\bin\exe\windows\c_table.exe" -login reqman,REQMAN,demo -file "C:\Temp\Coverage.htm" -matrix "Requirement Coverage" -mloc project -format html

Metrics can be published in the same way:

"%CRADLEHOME%\bin\exe\windows\c_table.exe" -login reqman,REQMAN,demo -file "C:\Temp\Project Analysis.htm" -metric "Project Analysis" -metloc project -format html

Graphs can be displayed in html, rtf or svg

"%CRADLEHOME%\bin\exe\windows\c_table.exe" -login reqman,REQMAN,demo -file "C:\TempVerified Requirements.htm" -graph "Verified requirements" -gloc project -gprint batch -gprloc project -format html

You can publish queries using different views:

"%CRADLEHOME%\bin\exe\windows\c_table.exe" -login reqman,REQMAN,demo -file "C:\Temp\Requirements All.rtf" -query "Requirements - All" -qloc project -view "Requirement - Complete" -vloc project -format rtf

You can also publish comma separated data into a csv file:

"%CRADLEHOME%\bin\exe\windows\c_table.exe" -login reqman,REQMAN,demo -file "C:\Temp\Requirememts_All.csv" -query "Requirements - All" -qloc project -view "Requirement - Complete" -vloc project -format csv

Remember to put quotes around any options with spaces in them e.g. “Requirements – All”

Save this file using the DOS extension of .bat e.g. batch file reports.bat

How to Run a Batch File for Reports

Running a batch file is simple, as long as all the options in the commands are correct; just double click on the .bat file. You will see a Command Prompt open and as each report finished, the next will begin.

Command prompt with some of the command lines used in the Batch File Reports
Command Lines for Batch File Reporting
Showing some of the reports from the batch files within the set folder. The folder in this case is the Temp folder on the C drive
Reports in the Temp Folder

As you will see running batch file reports is quicker and easier. You can also then add any reports you require to the file. The newly added reports are then also published the next time you run the batch file.

If you wish to use Task Scheduler for out of hour’s usage, you can find information here on the Microsoft website.

You can also use batch files for import and exporting through the c_io, publishing documents through Document Publisher  and converting CSV information into a Cradle import/export file for loading into a Cradle PDB using the CSV Converter Utility.

Frequent Commands – A Tip

Over and over and over again

If you frequently run the same item commands, or you want to guide users to use a particular subset of commands, add them to the Cradle ‘View’. These are termed “View commands”.

When defining a Cradle Views, you can add commands to appear at the ‘Item icon’. When the view is run this enables different users to be guided to commands for their role in the project. Combined with a phase and they can, run the appropriate query and they can get straight into creating children, linked items, updating link details, or whatever is appropriate for their role. Spending a little while now, arranging the process steps for your users can give a significant gain in productivity.

Using View Commands
View Commands

For more information on creating views and view commands you may find this Cradle help article useful.

Article updated 17/09/2018 – Added link to Cradle online help